layout/style/test/browser_bug453896.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     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