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 by navigating directly to the url
3 function test() {
4 Harness.installConfirmCallback = confirm_install;
5 Harness.installEndedCallback = install_ended;
6 Harness.installsCompletedCallback = finish_test;
7 Harness.setup();
9 gBrowser.selectedTab = gBrowser.addTab();
10 gBrowser.loadURI(TESTROOT + "unsigned.xpi");
11 }
13 function confirm_install(window) {
14 let items = window.document.getElementById("itemList").childNodes;
15 is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
16 is(items[0].name, "XPI Test", "Should have had the filename for the item name");
17 is(items[0].url, TESTROOT + "unsigned.xpi", "Should have listed the correct url for the item");
18 is(items[0].icon, "", "Should have listed no icon for the item");
19 is(items[0].signed, "false", "Should have listed the item as unsigned");
20 return true;
21 }
23 function install_ended(install, addon) {
24 install.cancel();
25 }
27 function finish_test(count) {
28 is(count, 1, "1 Add-on should have been successfully installed");
30 gBrowser.removeCurrentTab();
31 Harness.finish();
32 }
33 // ----------------------------------------------------------------------------