Warning throwing error because of bad method name when setting customBars.
[dygraphs.git] / auto_tests / misc / local.html
index 8621669..5bdf428 100644 (file)
@@ -42,6 +42,7 @@
 
   <script type="text/javascript">
   var tc = null;
+  var name = null;
   function processVariables() {
     var splitVariables = function() { // http://www.idealog.us/2006/06/javascript_to_p.html
       var query = window.location.search.substring(1); 
@@ -60,6 +61,7 @@
 
     if (args.testCaseName) {
       var testCases = getAllTestCases();
+      name = args.testCaseName;
       for (var idx in testCases) {
         var entry = testCases[idx];
         if (entry.name == args.testCaseName) {
@@ -69,6 +71,7 @@
         }
       }
     } else if (args.testCase) {
+      name = args.testCase;
       eval("tc = new " + args.testCase + "()");
     }
     if (tc != null) {
 </head>
 <body>
   <div id='graph'></div>
+  <div id="selector"></div>
   <p>This file is really nothing more than all the tests coalesced into a single
-  HTML file. To run a test, open a Javascript console and execute, for
-  instance,</p>
+  HTML file. To run a test, use the selector above, or
+  open a Javascript console and execute, for instance,</p>
   <code>testDrawSimpleRangePlusOne()</code>
 
   <p>Alternatively you can use query args: <ul>
-  <li>testCase - for the name of the test case
+  <li>testCase - for the name of the test case prototype
+  <li>testCaseName - 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>
   <p/>
-  <div id="selector"></div>
 </body>
 <script>
 processVariables();
 addGlobalTestSymbols();
 
 var selector = document.getElementById("selector");
+
 if (selector != null) { // running a test
   var createAttached = function(name, parent) {
     var elem = document.createElement(name);