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 // Tests installing an unsigned add-on through an installChrome call in web
3 // content. This should be blocked by the whitelist check.
4 // This verifies bug 252830
5 function test() {
6 Harness.installBlockedCallback = allow_blocked;
7 Harness.installsCompletedCallback = finish_test;
8 Harness.setup();
10 gBrowser.selectedTab = gBrowser.addTab();
11 gBrowser.loadURI(TESTROOT + "installchrome.html? " + encodeURIComponent(TESTROOT + "unsigned.xpi"));
12 }
14 function allow_blocked(installInfo) {
15 is(installInfo.originatingWindow, gBrowser.contentWindow, "Install should have been triggered by the right window");
16 is(installInfo.originatingURI.spec, gBrowser.currentURI.spec, "Install should have been triggered by the right uri");
17 return false;
18 }
20 function finish_test(count) {
21 is(count, 0, "No add-ons should have been installed");
22 gBrowser.removeCurrentTab();
23 Harness.finish();
24 }
25 // ----------------------------------------------------------------------------