toolkit/mozapps/extensions/test/xpinstall/browser_enabled.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 // ----------------------------------------------------------------------------
     2 // Test whether an InstallTrigger.enabled is working
     3 function test() {
     4   waitForExplicitFinish();
     6   gBrowser.selectedTab = gBrowser.addTab();
     7   gBrowser.selectedBrowser.addEventListener("load", function() {
     8     gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
     9     // Allow the in-page load handler to run first
    10     executeSoon(page_loaded);
    11   }, true);
    12   gBrowser.loadURI(TESTROOT + "enabled.html");
    13 }
    15 function page_loaded() {
    16   var doc = gBrowser.contentDocument;
    17   is(doc.getElementById("enabled").textContent, "true", "installTrigger should have been enabled");
    18   gBrowser.removeCurrentTab();
    19   finish();
    20 }

mercurial