[Pkg-mozext-commits] [firebug] 32/59: Fix console/6402 test

David Prévot taffit at moszumanska.debian.org
Thu Aug 14 14:52:55 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository firebug.

commit 66c65422547ced0aa2b29c868f5971c35310103d
Author: Simon Lindholm <simon.lindholm10 at gmail.com>
Date:   Wed Jul 30 15:25:18 2014 +0200

    Fix console/6402 test
---
 tests/content/console/6402/issue6402.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/content/console/6402/issue6402.js b/tests/content/console/6402/issue6402.js
index e92eb30..5dcf6d5 100644
--- a/tests/content/console/6402/issue6402.js
+++ b/tests/content/console/6402/issue6402.js
@@ -13,9 +13,12 @@ function runTest()
             // Note: Test for the FW.Firebug.getConsoleByGlobal() function.
             var oriIframeConsoleInstance = FW.Firebug.getConsoleByGlobal(iframe.contentWindow);
 
+            // Store the old console on the content window, so it doesn't get hueyfix'd away.
+            wrappedWin.wrappedJSObject._origIframeConsole = oriIframeConsoleInstance;
+
             tasks.push(reloadIframe, iframe);
 
-            tasks.push(testGetConsoleByGlobal, iframe, oriIframeConsoleInstance);
+            tasks.push(testGetConsoleByGlobal, iframe, wrappedWin);
 
             tasks.wrapAndPush(checkConsole, wrappedWin, "false", "window._console should NOT refer to "+
                 "the exposed Firebug console");
@@ -64,8 +67,9 @@ function reloadIframe(callback, iframe)
 }
 
 // Tests the value returned by Firebug.getConsoleByGlobal();
-function testGetConsoleByGlobal(callback, iframe, oriIframeConsoleInstance)
+function testGetConsoleByGlobal(callback, iframe, wrappedWin)
 {
+    var oriIframeConsoleInstance = wrappedWin.wrappedJSObject._origIframeConsole;
     var newIframeConsoleInstance = FW.Firebug.getConsoleByGlobal(iframe.contentWindow);
     FBTest.ok(newIframeConsoleInstance, "newIframeConsoleInstance should be non-null");
     FBTest.ok(oriIframeConsoleInstance, "oriIframeConsoleInstance should be non-null");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git



More information about the Pkg-mozext-commits mailing list