<li>From there, you start the test server and capture at least one slave
browser.
<ol>
- <li>Run <code>java -jar ./auto_tests/lib/JsTestDriver.jar --port
+ <li>Run <code>java -jar ./auto_tests/lib/JsTestDriver-1.3.2.jar --port
9876</code></li>
<li>Open <a href="http://localhost:9876/capture">
http://localhost:9876/capture</a> in the browser you want to use for
your test.</li>
</ol>
</li>
- <li>Run generate-combined.sh before every run since it's required (can we fix
- this?</li>
- <li>Run the tests with <code>java -jar ./auto_tests/lib/JsTestDriver.jar
+ <li>Run the tests with <code>java -jar ./auto_tests/lib/JsTestDriver-1.3.2.jar
--tests all</code></li>
</ul>
-<!-- A local source file that allows me to test locally. -->
+<!-- A local source file that allows dygraph developers to test locally. -->
<html>
<head>
-<script type="text/javascript" src="../../dygraph-combined.js"></script>
-<script type="text/javascript" src="../../dygraph.js"></script>
-<script type="text/javascript" src="../../dygraph-canvas.js"></script>
-<script type="text/javascript" src="../lib/jquery-1.4.2.js"></script>
-<script type="text/javascript" src="../lib/Asserts.js"></script>
-<script type="text/javascript" src="fake-jstestdriver.js"></script>
-<script type="text/javascript" src="../tests/Proxy.js"></script>
-<script type="text/javascript" src="../tests/CanvasAssertions.js"></script>
-<script type="text/javascript" src="../tests/sanity.js"></script>
-<script type="text/javascript" src="../tests/simple_drawing.js"></script>
+ <!-- Standard Dygraph scripts -->
+ <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
+ <!--[if IE]>
+ <script type="text/javascript" src="../../excanvas.js"></script>
+ <![endif]-->
+ <script type="text/javascript" src="../../strftime/strftime-min.js"></script>
+ <script type="text/javascript" src="../../rgbcolor/rgbcolor.js"></script>
+ <script type="text/javascript" src="../../dygraph-canvas.js"></script>
+ <script type="text/javascript" src="../../dygraph.js"></script>
+
+ <!-- Scripts for automated tests -->
+ <script type="text/javascript" src="../lib/jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="../lib/Asserts.js"></script>
+ <script type="text/javascript" src="fake-jstestdriver.js"></script>
+ <script type="text/javascript" src="../tests/Proxy.js"></script>
+ <script type="text/javascript" src="../tests/CanvasAssertions.js"></script>
+ <script type="text/javascript" src="../tests/sanity.js"></script>
+ <script type="text/javascript" src="../tests/simple_drawing.js"></script>
</head>
<body>
<div id='graph'></div>
// found = 1 when prior loop found p1.
// found = 2 when prior loop found p2.
var priorFound = 0;
- for (var callNum in proxy.calls__) {
- var call = proxy.calls__[callNum];
+ for (var i = 0; i < proxy.calls__.length; i++) {
+ var call = proxy.calls__[i];
// This disables lineTo -> moveTo pairs.
if (call.name == "moveTo" && priorFound > 0) {
*
* @author konigsberg@google.com (Robert Konigsberg)
*/
-var DEAD_SIMPLE_DATA = [[ 20061010, 2100 ]];
-var ZERO_TO_FIFTY = [[ 20061010, 0 ] , [ 20061011, 50 ]];
+var DEAD_SIMPLE_DATA = [[ 10, 2100 ]];
+var ZERO_TO_FIFTY = [[ 10, 0 ] , [ 20, 50 ]];
var SanityTestCase = TestCase("dygraphs-sanity");
assertNotNull(graph);
};
+// TODO(konigsberg): Move the following tests to a new package that
+// tests all kinds of toDomCoords, toDataCoords, toPercent, et cetera.
+
/**
* A sanity test of sorts, by ensuring the dygraph is created, and
* isn't just some piece of junk object.
assertEquals([0, 50], g.yAxisRange(0));
};
+/**
+ * Test when the expected and actual values are within a certain
+ * range (delta). If they're exactly apart by delta, that is considered
+ * acceptable.
+ */
function assertEqualsDelta(msg, expected, actual, delta) {
var args = this.argsWithOptionalMsg_(arguments, 4);
*
* @author konigsberg@google.com (Robert Konigsberg)
*/
-var ZERO_TO_FIFTY = [[ 20061010, 0 ] , [ 20061011, 50 ]];
+var ZERO_TO_FIFTY = [[ 10, 0 ] , [ 20, 50 ]];
var SimpleDrawingTestCase = TestCase("simple-drawing");
Dygraph.getContext = _origFunc;
};
-SimpleDrawingTestCase.prototype.testDrawSimple = function() {
- var graph = document.getElementById("graph");
- var g = new Dygraph(graph, ZERO_TO_FIFTY, {});
-}
-
-SimpleDrawingTestCase.prototype.testDrawSimpleRangeEquals = function() {
- var graph = document.getElementById("graph");
- var g = new Dygraph(graph, ZERO_TO_FIFTY, {valueRange: [0,50]});
-}
-
SimpleDrawingTestCase.prototype.testDrawSimpleRangePlusOne = function() {
var opts = {
drawXGrid: false,
server: http://localhost:9876
load:
- - dygraph-combined.js
- dygraph.js
- dygraph-canvas.js
+ - rgbcolor/rgbcolor.js
+ - strftime/strftime-min.js
- auto_tests/tests/*.js