Namespace the canvas proxy in auto tests.
[dygraphs.git] / auto_tests / tests / to_dom_coords.js
index 3def1ef..dae4f44 100644 (file)
@@ -6,16 +6,16 @@
 
 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) {
-    return new Proxy(_origFunc(canvas));
+    return new Proxy(ToDomCoordsTestCase._origFunc(canvas));
   }
 };
 
 ToDomCoordsTestCase.prototype.tearDown = function() {
-  Dygraph.getContext = _origFunc;
+  Dygraph.getContext = ToDomCoordsTestCase._origFunc;
 };
 
 // Checks that toDomCoords and toDataCoords are inverses of one another.