merge
authorDan Vanderkam <dan@dygraphs.com>
Mon, 25 Jul 2011 22:39:04 +0000 (18:39 -0400)
committerDan Vanderkam <dan@dygraphs.com>
Mon, 25 Jul 2011 22:39:04 +0000 (18:39 -0400)
1  2 
auto_tests/misc/local.html
dygraph-dev.js
dygraph.js

    <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/tickers.js"></script>
+   <script type="text/javascript" src="../tests/scrolling_div.js"></script>
+   <script type="text/javascript" src="../tests/custom_bars.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>
++>>>>>>> master
  </head>
  <body>
    <div id='graph'></div>
diff --cc dygraph-dev.js
@@@ -6,29 -6,22 +6,23 @@@
  (function() {
    var src=document.getElementsByTagName('script');
    var script = src[src.length-1].getAttribute("src");
-   var m = /^(.*)\/[^/]*\.js$/.exec(script);
-   if (!m) {
-     console.error("Can't grok dygraph-dev.js path: " + script);
-   } else {
-     var path = m[1];  // captured group, not the full match.
  
 -  // This list needs to be kept in sync w/ the one in generate-combined.sh
 -  // and the one in jsTestDriver.conf.
 -  var source_files = [
 -    "strftime/strftime-min.js",
 -    "rgbcolor/rgbcolor.js",
 -    "dygraph-layout.js",
 -    "dygraph-canvas.js",
 -    "dygraph.js",
 -    "dygraph-utils.js",
 -    "dygraph-gviz.js",
 -    "dygraph-interaction-model.js",
 -    "dygraph-options-reference.js"  // Shouldn't be included in generate-combined.sh
 -  ];
 +    // This list needs to be kept in sync w/ the one in generate-combined.sh
 +    // and the one in jsTestDriver.conf.
 +    var source_files = [
 +      "strftime/strftime-min.js",
 +      "rgbcolor/rgbcolor.js",
 +      "dygraph-layout.js",
 +      "dygraph-canvas.js",
 +      "dygraph.js",
 +      "dygraph-utils.js",
 +      "dygraph-gviz.js",
 +      "dygraph-interaction-model.js",
 +      "dygraph-options-reference.js"  // Shouldn't be included in generate-combined.sh
 +      , "dygraph-tickers.js"
 +    ];
  
-     for (var i = 0; i < source_files.length; i++) {
-       document.write('<script type="text/javascript" src="' + path + '/' + source_files[i] + '"></script>\n');
-     }
+   for (var i = 0; i < source_files.length; i++) {
+     document.write('<script type="text/javascript" src="' + script.replace('dygraph-dev.js', source_files[i]) + '"></script>\n');
    }
  })();
diff --cc dygraph.js
Simple merge