Sat, 03 Jan 2015 20:18:00 +0100
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 passing an undefined url InstallTrigger.install throws an
3 // exception
4 function test() {
5 waitForExplicitFinish();
7 var triggers = encodeURIComponent(JSON.stringify({
8 "Unsigned XPI": {
9 URL: undefined
10 }
11 }));
12 gBrowser.selectedTab = gBrowser.addTab();
13 gBrowser.selectedBrowser.addEventListener("load", function() {
14 gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
15 // Allow the in-page load handler to run first
16 executeSoon(page_loaded);
17 }, true);
18 expectUncaughtException();
19 gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
20 }
22 function page_loaded() {
23 var doc = gBrowser.contentDocument;
24 is(doc.getElementById("return").textContent, "exception", "installTrigger should have failed");
25 gBrowser.removeCurrentTab();
26 finish();
27 }
28 // ----------------------------------------------------------------------------