Commit | Line | Data |
---|---|---|
7165f97b | 1 | <!-- A local source file that allows dygraph developers to test locally. --> |
644eff8b RK |
2 | <html> |
3 | <head> | |
7165f97b RK |
4 | <!-- Standard Dygraph scripts --> |
5 | <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9"> | |
6 | <!--[if IE]> | |
7 | <script type="text/javascript" src="../../excanvas.js"></script> | |
8 | <![endif]--> | |
8d3d15af | 9 | <script type="text/javascript" src="../../dygraph-dev.js"></script> |
7165f97b RK |
10 | |
11 | <!-- Scripts for automated tests --> | |
12 | <script type="text/javascript" src="../lib/jquery-1.4.2.js"></script> | |
13 | <script type="text/javascript" src="../lib/Asserts.js"></script> | |
14 | <script type="text/javascript" src="fake-jstestdriver.js"></script> | |
15 | <script type="text/javascript" src="../tests/Proxy.js"></script> | |
16 | <script type="text/javascript" src="../tests/CanvasAssertions.js"></script> | |
72a74f04 | 17 | <script type="text/javascript" src="../tests/DygraphOps.js"></script> |
7165f97b RK |
18 | <script type="text/javascript" src="../tests/sanity.js"></script> |
19 | <script type="text/javascript" src="../tests/simple_drawing.js"></script> | |
72a74f04 | 20 | <script type="text/javascript" src="../tests/range_tests.js"></script> |
f3cbe61e DV |
21 | <script type="text/javascript" src="../tests/axis_labels.js"></script> |
22 | <script type="text/javascript" src="../tests/multi_csv.js"></script> | |
063e83ba | 23 | <script type="text/javascript" src="../tests/to_dom_coords.js"></script> |
9c831431 | 24 | <script type="text/javascript" src="../tests/interaction_model.js"></script> |
48e614ac | 25 | <script type="text/javascript" src="../tests/tickers.js"></script> |
6788e30b | 26 | <script type="text/javascript" src="../tests/scrolling_div.js"></script> |
502d5996 | 27 | <script type="text/javascript" src="../tests/custom_bars.js"></script> |
0cb9bd91 | 28 | <script type="text/javascript" src="../tests/css.js"></script> |
87bbdb4d | 29 | <script type="text/javascript" src="../tests/selection.js"></script> |
77b5e09d | 30 | <script type="text/javascript" src="../tests/rolling_average.js"></script> |
f35016e8 | 31 | <script type="text/javascript" src="../tests/error_bars.js"></script> |
c9faeafd | 32 | <script type="text/javascript" src="../tests/annotations.js"></script> |
9ca829f2 | 33 | <script type="text/javascript" src="../tests/update_options.js"></script> |
48e614ac DV |
34 | <script type="text/javascript" src="../tests/utils_test.js"></script> |
35 | <script type="text/javascript" src="../tests/multiple_axes.js"></script> | |
87bbdb4d DV |
36 | |
37 | ||
6788e30b RK |
38 | <script type="text/javascript"> |
39 | var tc = null; | |
40 | function processVariables() { | |
41 | var splitVariables = function() { // http://www.idealog.us/2006/06/javascript_to_p.html | |
42 | var query = window.location.search.substring(1); | |
43 | var args = {}; | |
44 | var vars = query.split("&"); | |
45 | for (var i = 0;i < vars.length; i++) { | |
46 | var pair = vars[i].split("="); | |
47 | args[pair[0]] = pair[1]; | |
48 | } | |
49 | return args; | |
50 | } | |
51 | ||
52 | var args = splitVariables(); | |
53 | var test = args.test; | |
54 | var command = args.command; | |
55 | ||
56 | if (args.testCase) { | |
57 | eval("tc = new " + args.testCase + "()"); | |
58 | if (args.command) { | |
59 | if (args.command == "runAllTests") { | |
60 | console.log("Running all tests for " + args.testCase); | |
61 | tc.runAllTests(); | |
62 | } | |
63 | if (args.command == "runTest") { | |
64 | console.log("Running test " + args.testCase + "." + args.test); | |
65 | tc.runTest(args.test); | |
66 | } | |
67 | } | |
68 | } | |
69 | } | |
70 | </script> | |
644eff8b RK |
71 | </head> |
72 | <body> | |
73 | <div id='graph'></div> | |
3914c8e1 | 74 | <p>This file is really nothing more than all the tests coalesced into a single |
644eff8b | 75 | HTML file. To run a test, open a Javascript console and execute, for |
3914c8e1 DV |
76 | instance,</p> |
77 | <code>testDrawSimpleRangePlusOne()</code> | |
6788e30b RK |
78 | |
79 | <p>Alternatively you can use query args: <ul> | |
80 | <li>testCase - for the name of the test case | |
81 | <li>test - for the name of the test (use command=runTest) | |
82 | <li>command - either runTest or runAllTests. | |
83 | </ul> | |
84 | Example: <code>local.html?testCase=ScrollingDivTestCase&test=testNestedDiv_Scrolled&command=runTest</code> | |
644eff8b | 85 | </body> |
6788e30b RK |
86 | <script> |
87 | processVariables(); | |
3914c8e1 | 88 | addGlobalTestSymbols(); |
6788e30b | 89 | </script> |
644eff8b | 90 | </html> |