Namespace the canvas proxy in auto tests.
[dygraphs.git] / auto_tests / tests / custom_bars.js
index 493e86c..2169ade 100644 (file)
@@ -6,16 +6,16 @@
  */
 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) {
-    return new Proxy(_origFunc(canvas));
+    return new Proxy(CustomBarsTestCase._origFunc(canvas));
   }
 };
 
 CustomBarsTestCase.prototype.tearDown = function() {
-  Dygraph.getContext = _origFunc;
+  Dygraph.getContext = CustomBarsTestCase._origFunc;
 };
 
 // This test used to reliably produce an infinite loop.