toolkit/content/tests/browser/browser_bug594509.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 function check_about_rights(tab) {
     2   let doc = gBrowser.getBrowserForTab(tab).contentDocument;
     3   ok(doc.getElementById("your-rights"), "about:rights content loaded");
     4   gBrowser.removeTab(tab);
     5   finish();
     6 }
     8 function test() {
     9   waitForExplicitFinish();
    10   let tab = gBrowser.selectedTab = gBrowser.addTab("about:blank");
    11   let browser = gBrowser.getBrowserForTab(tab);
    12   browser.addEventListener("load", function() {
    13       browser.removeEventListener("load", arguments.callee, true);
    15       ok(true, "about:rights loaded");
    16       executeSoon(function() { check_about_rights(tab); });
    17     }, true);
    18   browser.loadURI("about:rights", null, null);
    19 }

mercurial