Namespace the canvas proxy in auto tests.
[dygraphs.git] / auto_tests / tests / error_bars.js
index 1ede89b..5144363 100644 (file)
@@ -9,16 +9,16 @@ errorBarsTestCase.prototype.setUp = function() {
   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) {
-    return new Proxy(_origFunc(canvas));
+    return new Proxy(errorBarsTestCase._origFunc(canvas));
   }
 };
 
 errorBarsTestCase.prototype.tearDown = function() {
-  Dygraph.getContext = _origFunc;
+  Dygraph.getContext = errorBarsTestCase._origFunc;
 };
 
 errorBarsTestCase.prototype.testErrorBarsDrawn = function() {