projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e4cee28
)
Namespace the canvas proxy in auto tests.
author
Robert Konigsberg
<konigsberg@google.com>
Thu, 7 Feb 2013 14:25:11 +0000
(09:25 -0500)
committer
Robert Konigsberg
<konigsberg@google.com>
Thu, 7 Feb 2013 14:25:11 +0000
(09:25 -0500)
auto_tests/tests/custom_bars.js
patch
|
blob
|
blame
|
history
auto_tests/tests/error_bars.js
patch
|
blob
|
blame
|
history
auto_tests/tests/missing_points.js
patch
|
blob
|
blame
|
history
auto_tests/tests/simple_drawing.js
patch
|
blob
|
blame
|
history
auto_tests/tests/to_dom_coords.js
patch
|
blob
|
blame
|
history
diff --git
a/auto_tests/tests/custom_bars.js
b/auto_tests/tests/custom_bars.js
index
493e86c
..
2169ade
100644
(file)
--- a/
auto_tests/tests/custom_bars.js
+++ b/
auto_tests/tests/custom_bars.js
@@
-6,16
+6,16
@@
*/
var CustomBarsTestCase = TestCase("custom-bars");
*/
var CustomBarsTestCase = TestCase("custom-bars");
-
var
_origFunc = Dygraph.getContext;
+
CustomBarsTestCase.
_origFunc = Dygraph.getContext;
CustomBarsTestCase.prototype.setUp = function() {
document.body.innerHTML = "<div id='graph'></div>";
Dygraph.getContext = function(canvas) {
CustomBarsTestCase.prototype.setUp = function() {
document.body.innerHTML = "<div id='graph'></div>";
Dygraph.getContext = function(canvas) {
- return new Proxy(_origFunc(canvas));
+ return new Proxy(
CustomBarsTestCase.
_origFunc(canvas));
}
};
CustomBarsTestCase.prototype.tearDown = function() {
}
};
CustomBarsTestCase.prototype.tearDown = function() {
- Dygraph.getContext = _origFunc;
+ Dygraph.getContext =
CustomBarsTestCase.
_origFunc;
};
// This test used to reliably produce an infinite loop.
};
// This test used to reliably produce an infinite loop.
diff --git
a/auto_tests/tests/error_bars.js
b/auto_tests/tests/error_bars.js
index
1ede89b
..
5144363
100644
(file)
--- a/
auto_tests/tests/error_bars.js
+++ b/
auto_tests/tests/error_bars.js
@@
-9,16
+9,16
@@
errorBarsTestCase.prototype.setUp = function() {
document.body.innerHTML = "<div id='graph'></div>";
};
document.body.innerHTML = "<div id='graph'></div>";
};
-
var
_origFunc = Dygraph.getContext;
+
errorBarsTestCase.
_origFunc = Dygraph.getContext;
errorBarsTestCase.prototype.setUp = function() {
document.body.innerHTML = "<div id='graph'></div>";
Dygraph.getContext = function(canvas) {
errorBarsTestCase.prototype.setUp = function() {
document.body.innerHTML = "<div id='graph'></div>";
Dygraph.getContext = function(canvas) {
- return new Proxy(_origFunc(canvas));
+ return new Proxy(
errorBarsTestCase.
_origFunc(canvas));
}
};
errorBarsTestCase.prototype.tearDown = function() {
}
};
errorBarsTestCase.prototype.tearDown = function() {
- Dygraph.getContext = _origFunc;
+ Dygraph.getContext =
errorBarsTestCase.
_origFunc;
};
errorBarsTestCase.prototype.testErrorBarsDrawn = function() {
};
errorBarsTestCase.prototype.testErrorBarsDrawn = function() {
diff --git
a/auto_tests/tests/missing_points.js
b/auto_tests/tests/missing_points.js
index
594282c
..
68a5024
100644
(file)
--- a/
auto_tests/tests/missing_points.js
+++ b/
auto_tests/tests/missing_points.js
@@
-27,16
+27,16
@@
var ZERO_TO_FIFTY = [[ 10, 0 ] , [ 20, 50 ]];
var MissingPointsTestCase = TestCase("missing-points");
var MissingPointsTestCase = TestCase("missing-points");
-
var
_origFunc = Dygraph.getContext;
+
MissingPointsTestCase.
_origFunc = Dygraph.getContext;
MissingPointsTestCase.prototype.setUp = function() {
document.body.innerHTML = "<div id='graph'></div>";
Dygraph.getContext = function(canvas) {
MissingPointsTestCase.prototype.setUp = function() {
document.body.innerHTML = "<div id='graph'></div>";
Dygraph.getContext = function(canvas) {
- return new Proxy(_origFunc(canvas));
+ return new Proxy(
MissingPointsTestCase.
_origFunc(canvas));
}
};
MissingPointsTestCase.prototype.tearDown = function() {
}
};
MissingPointsTestCase.prototype.tearDown = function() {
- Dygraph.getContext = _origFunc;
+ Dygraph.getContext =
MissingPointsTestCase.
_origFunc;
};
MissingPointsTestCase.prototype.testSeparatedPointsDontDraw = function() {
};
MissingPointsTestCase.prototype.testSeparatedPointsDontDraw = function() {
@@
-166,4
+166,4
@@
MissingPointsTestCase.prototype.testConnectSeparatedPointsWithNan = function() {
var line = lines[idx];
console.log(line[0].args, line[1].args, line[0].properties.strokeStyle);
}
var line = lines[idx];
console.log(line[0].args, line[1].args, line[0].properties.strokeStyle);
}
-*/
\ No newline at end of file
+*/
diff --git
a/auto_tests/tests/simple_drawing.js
b/auto_tests/tests/simple_drawing.js
index
a4acd28
..
75a6e87
100644
(file)
--- a/
auto_tests/tests/simple_drawing.js
+++ b/
auto_tests/tests/simple_drawing.js
@@
-27,16
+27,16
@@
var ZERO_TO_FIFTY = [[ 10, 0 ] , [ 20, 50 ]];
var SimpleDrawingTestCase = TestCase("simple-drawing");
var SimpleDrawingTestCase = TestCase("simple-drawing");
-
var
_origFunc = Dygraph.getContext;
+
SimpleDrawingTestCase.
_origFunc = Dygraph.getContext;
SimpleDrawingTestCase.prototype.setUp = function() {
document.body.innerHTML = "<div id='graph'></div>";
Dygraph.getContext = function(canvas) {
SimpleDrawingTestCase.prototype.setUp = function() {
document.body.innerHTML = "<div id='graph'></div>";
Dygraph.getContext = function(canvas) {
- return new Proxy(_origFunc(canvas));
+ return new Proxy(
SimpleDrawingTestCase.
_origFunc(canvas));
}
};
SimpleDrawingTestCase.prototype.tearDown = function() {
}
};
SimpleDrawingTestCase.prototype.tearDown = function() {
- Dygraph.getContext = _origFunc;
+ Dygraph.getContext =
SimpleDrawingTestCase.
_origFunc;
};
SimpleDrawingTestCase.prototype.testDrawSimpleRangePlusOne = function() {
};
SimpleDrawingTestCase.prototype.testDrawSimpleRangePlusOne = function() {
diff --git
a/auto_tests/tests/to_dom_coords.js
b/auto_tests/tests/to_dom_coords.js
index
3def1ef
..
dae4f44
100644
(file)
--- a/
auto_tests/tests/to_dom_coords.js
+++ b/
auto_tests/tests/to_dom_coords.js
@@
-6,16
+6,16
@@
var ToDomCoordsTestCase = TestCase("to-dom-coords");
var ToDomCoordsTestCase = TestCase("to-dom-coords");
-
var
_origFunc = Dygraph.getContext;
+
ToDomCoordsTestCase.
_origFunc = Dygraph.getContext;
ToDomCoordsTestCase.prototype.setUp = function() {
document.body.innerHTML = "<div id='graph'></div>";
Dygraph.getContext = function(canvas) {
ToDomCoordsTestCase.prototype.setUp = function() {
document.body.innerHTML = "<div id='graph'></div>";
Dygraph.getContext = function(canvas) {
- return new Proxy(_origFunc(canvas));
+ return new Proxy(
ToDomCoordsTestCase.
_origFunc(canvas));
}
};
ToDomCoordsTestCase.prototype.tearDown = function() {
}
};
ToDomCoordsTestCase.prototype.tearDown = function() {
- Dygraph.getContext = _origFunc;
+ Dygraph.getContext =
ToDomCoordsTestCase.
_origFunc;
};
// Checks that toDomCoords and toDataCoords are inverses of one another.
};
// Checks that toDomCoords and toDataCoords are inverses of one another.