Add huxley screenshot tests

Summary:
Add in a testing page, which just renders the location hash in the body. Use
this to make some screenshot tests in huxley. Note, these screenshots were made
in Firefox on a Linux computer, so running the tests somewhere else might
produce something else.

Test Plan:
- Serve KaTeX (`make serve`)
- Run a Selenium Server (I used selenium 2.40.0)
- Run `huxley` from the test/huxley/ directory
- Ensure that all of the tests pass

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D7258
This commit is contained in:
Emily Eisenberg
2014-03-11 16:29:45 -06:00
parent b9bd88764c
commit a7820b12ff
25 changed files with 66 additions and 0 deletions

22
test/huxley/test.html Normal file
View File

@@ -0,0 +1,22 @@
<!doctype html>
<html>
<head>
<title>Huxley test</title>
<script src="/katex.js" type="text/javascript"></script>
<link href="/fonts/fonts.css" rel="stylesheet" type="text/css">
<link href="/katex.less.css" rel="stylesheet" type="text/css">
<style type="text/css">
#math {
font-size: 4em;
}
</style>
</head>
<body>
<div id="math"></div>
<script type="text/javascript">
var hash = window.location.hash.slice(1);
var mathNode = document.getElementById("math");
katex.process(hash, mathNode);
</script>
</body>
</html>