layout/style/test/browser_bug453896.js

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 var listener = {
     2   handleEvent : function(e) {
     3     if (e.target == theBrowser.contentDocument)
     4       doTest();
     5   }
     6 }
     8 var theTab;
     9 var theBrowser;
    11 function test() {
    12   waitForExplicitFinish();
    14   theTab = gBrowser.addTab();
    15   theBrowser = gBrowser.getBrowserForTab(theTab);
    16   theBrowser.addEventListener("load", listener, true);
    18   var rootDir = getRootDirectory(gTestPath);
    19   theBrowser.contentWindow.location = rootDir + "bug453896_iframe.html";
    20 }
    22 function doTest() {
    23   theBrowser.removeEventListener("load", listener, true);
    24   var fake_window = { ok: ok, SimpleTest: { finish: finish } };
    25   theBrowser.contentWindow.wrappedJSObject.run(fake_window);
    26   gBrowser.removeTab(theTab);
    27 }

mercurial