From a4d68b2b250880694719a6801968142d5e16e478 Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Mon, 8 Oct 2012 14:07:56 +0200 Subject: [PATCH] runIn was a bad idea --- tests/frontend/helper.js | 7 ------- tests/frontend/specs/helper.js | 25 ------------------------- 2 files changed, 32 deletions(-) diff --git a/tests/frontend/helper.js b/tests/frontend/helper.js index ec4bd19c..78f35b45 100644 --- a/tests/frontend/helper.js +++ b/tests/frontend/helper.js @@ -119,13 +119,6 @@ var helper = {}; return deferred; } - helper.runIn = function($iframe, func){ - var eval = $iframe.window.eval; - var funcStr = "(" + func.toString() + ")()"; - - return eval(funcStr); - } - /* Ensure console.log doesn't blow up in IE, ugly but ok for a test framework imho*/ window.console = window.console || {}; window.console.log = window.console.log || function(){} diff --git a/tests/frontend/specs/helper.js b/tests/frontend/specs/helper.js index 22006317..eba27dda 100644 --- a/tests/frontend/specs/helper.js +++ b/tests/frontend/specs/helper.js @@ -1,29 +1,4 @@ describe("the test helper", function(){ - describe("the runIn method", function(){ - it("runs the function in the correct iframe", function(done){ - this.timeout(5000); - - helper.newPad(function(){ - var chromeLength = helper.runIn(helper.padChrome$, function(){ - return $("#editbar").length; - }); - - var outerLength = helper.runIn(helper.padOuter$, function(){ - return $("#outerdocbody").length; - }); - - var innerLength = helper.runIn(helper.padInner$, function(){ - return $("#innerdocbody").length; - }); - - expect(chromeLength).to.be(1); - expect(outerLength).to.be(1); - expect(innerLength).to.be(1); - done(); - }); - }); - }); - describe("the newPad method", function(){ xit("doesn't leak memory if you creates iframes over and over again", function(done){ this.timeout(100000);