Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 // ----------------------------------------------------------------------------
2 // Tests installing an unsigned add-on through a startSoftwareUpdate 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 + "startsoftwareupdate.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 // ----------------------------------------------------------------------------