<script type="text/javascript" src="../tests/multi_csv.js"></script>
<script type="text/javascript" src="../tests/to_dom_coords.js"></script>
<script type="text/javascript" src="../tests/interaction_model.js"></script>
+ <script type="text/javascript" src="../tests/scrolling_div.js"></script>
+ <script type="text/javascript">
+ var tc = null;
+ function processVariables() {
+ var splitVariables = function() { // http://www.idealog.us/2006/06/javascript_to_p.html
+ var query = window.location.search.substring(1);
+ var args = {};
+ var vars = query.split("&");
+ for (var i = 0;i < vars.length; i++) {
+ var pair = vars[i].split("=");
+ args[pair[0]] = pair[1];
+ }
+ return args;
+ }
+
+ var args = splitVariables();
+ var test = args.test;
+ var command = args.command;
+
+ if (args.testCase) {
+ eval("tc = new " + args.testCase + "()");
+ if (args.command) {
+ if (args.command == "runAllTests") {
+ console.log("Running all tests for " + args.testCase);
+ tc.runAllTests();
+ }
+ if (args.command == "runTest") {
+ console.log("Running test " + args.testCase + "." + args.test);
+ tc.runTest(args.test);
+ }
+ }
+ }
+ }
+ </script>
</head>
<body>
<div id='graph'></div>
instance,<br>
<code>tc = new SimpleDrawingTestCase() ;<br>
tc.runTest("testDrawSimpleRangePlusOne")</code>
+
+ <p>Alternatively you can use query args: <ul>
+ <li>testCase - for the name of the test case
+ <li>test - for the name of the test (use command=runTest)
+ <li>command - either runTest or runAllTests.
+ </ul>
+ Example: <code>local.html?testCase=ScrollingDivTestCase&test=testNestedDiv_Scrolled&command=runTest</code>
</body>
+<script>
+processVariables();
+</script>
</html>