зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1250611: Fix more tests to use signed add-ons. r=rhelmer
MozReview-Commit-ID: 97RVVxAM5eo --HG-- extra : rebase_source : bfbec29b8eba2ee1c4b4ce1fb2415c5dab21e5ab
This commit is contained in:
Родитель
7efdf5427d
Коммит
61b99aec71
|
@ -9,6 +9,8 @@ const XPINSTALL_URL = "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul";
|
|||
const PREF_INSTALL_REQUIREBUILTINCERTS = "extensions.install.requireBuiltInCerts";
|
||||
const PROGRESS_NOTIFICATION = "addon-progress";
|
||||
|
||||
const { REQUIRE_SIGNING } = Cu.import("resource://gre/modules/addons/AddonConstants.jsm", {});
|
||||
|
||||
var rootDir = getRootDirectory(gTestPath);
|
||||
var path = rootDir.split('/');
|
||||
var chromeName = path[0] + '//' + path[2];
|
||||
|
@ -205,7 +207,7 @@ function test_disabled_install() {
|
|||
});
|
||||
|
||||
var triggers = encodeURIComponent(JSON.stringify({
|
||||
"XPI": "unsigned.xpi"
|
||||
"XPI": "amosigned.xpi"
|
||||
}));
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
|
||||
|
@ -254,7 +256,7 @@ function test_blocked_install() {
|
|||
});
|
||||
|
||||
var triggers = encodeURIComponent(JSON.stringify({
|
||||
"XPI": "unsigned.xpi"
|
||||
"XPI": "amosigned.xpi"
|
||||
}));
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
|
||||
|
@ -296,7 +298,7 @@ function test_whitelisted_install() {
|
|||
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
|
||||
|
||||
var triggers = encodeURIComponent(JSON.stringify({
|
||||
"XPI": "unsigned.xpi"
|
||||
"XPI": "amosigned.xpi"
|
||||
}));
|
||||
let originalTab = gBrowser.selectedTab;
|
||||
let tab = gBrowser.addTab();
|
||||
|
@ -458,7 +460,7 @@ function test_multiple() {
|
|||
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
|
||||
|
||||
var triggers = encodeURIComponent(JSON.stringify({
|
||||
"Unsigned XPI": "unsigned.xpi",
|
||||
"Unsigned XPI": "amosigned.xpi",
|
||||
"Restartless XPI": "restartless.xpi"
|
||||
}));
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
|
@ -547,7 +549,8 @@ function test_someunverified() {
|
|||
// This test is only relevant if using the new doorhanger UI and allowing
|
||||
// unsigned add-ons
|
||||
if (!Preferences.get("xpinstall.customConfirmationUI", false) ||
|
||||
Preferences.get("xpinstall.signatures.required", true)) {
|
||||
Preferences.get("xpinstall.signatures.required", true) ||
|
||||
REQUIRE_SIGNING) {
|
||||
runNextTest();
|
||||
return;
|
||||
}
|
||||
|
@ -593,7 +596,7 @@ function test_someunverified() {
|
|||
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
|
||||
|
||||
var triggers = encodeURIComponent(JSON.stringify({
|
||||
"Extension XPI": "restartless.xpi",
|
||||
"Extension XPI": "restartless-unsigned.xpi",
|
||||
"Theme XPI": "theme.xpi"
|
||||
}));
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
|
@ -604,7 +607,8 @@ function test_allunverified() {
|
|||
// This test is only relevant if using the new doorhanger UI and allowing
|
||||
// unsigned add-ons
|
||||
if (!Preferences.get("xpinstall.customConfirmationUI", false) ||
|
||||
Preferences.get("xpinstall.signatures.required", true)) {
|
||||
Preferences.get("xpinstall.signatures.required", true) ||
|
||||
REQUIRE_SIGNING) {
|
||||
runNextTest();
|
||||
return;
|
||||
}
|
||||
|
@ -641,7 +645,7 @@ function test_allunverified() {
|
|||
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
|
||||
|
||||
var triggers = encodeURIComponent(JSON.stringify({
|
||||
"Extension XPI": "restartless.xpi"
|
||||
"Extension XPI": "restartless-unsigned.xpi"
|
||||
}));
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
|
||||
|
@ -675,7 +679,7 @@ function test_url() {
|
|||
|
||||
gBrowser.selectedTab = gBrowser.addTab("about:blank");
|
||||
BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
|
||||
gBrowser.loadURI(TESTROOT + "unsigned.xpi");
|
||||
gBrowser.loadURI(TESTROOT + "amosigned.xpi");
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -737,7 +741,7 @@ function test_tabclose() {
|
|||
|
||||
gBrowser.selectedTab = gBrowser.addTab("about:blank");
|
||||
BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
|
||||
gBrowser.loadURI(TESTROOT + "unsigned.xpi");
|
||||
gBrowser.loadURI(TESTROOT + "amosigned.xpi");
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -774,7 +778,7 @@ function test_tabnavigate() {
|
|||
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
|
||||
|
||||
var triggers = encodeURIComponent(JSON.stringify({
|
||||
"Extension XPI": "unsigned.xpi"
|
||||
"Extension XPI": "amosigned.xpi"
|
||||
}));
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
|
||||
|
@ -795,7 +799,7 @@ function test_urlbar() {
|
|||
|
||||
gBrowser.selectedTab = gBrowser.addTab("about:blank");
|
||||
BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
|
||||
gURLBar.value = TESTROOT + "unsigned.xpi";
|
||||
gURLBar.value = TESTROOT + "amosigned.xpi";
|
||||
gURLBar.focus();
|
||||
EventUtils.synthesizeKey("VK_RETURN", {});
|
||||
});
|
||||
|
@ -869,7 +873,7 @@ function test_reload() {
|
|||
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
|
||||
|
||||
var triggers = encodeURIComponent(JSON.stringify({
|
||||
"Unsigned XPI": "unsigned.xpi"
|
||||
"Unsigned XPI": "amosigned.xpi"
|
||||
}));
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
|
||||
|
@ -951,7 +955,7 @@ function test_renotify_blocked() {
|
|||
});
|
||||
|
||||
var triggers = encodeURIComponent(JSON.stringify({
|
||||
"XPI": "unsigned.xpi"
|
||||
"XPI": "amosigned.xpi"
|
||||
}));
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
|
||||
|
@ -1006,7 +1010,7 @@ function test_renotify_installed() {
|
|||
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
|
||||
|
||||
var triggers = encodeURIComponent(JSON.stringify({
|
||||
"XPI": "unsigned.xpi"
|
||||
"XPI": "amosigned.xpi"
|
||||
}));
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
|
||||
|
@ -1064,7 +1068,7 @@ function test_cancel() {
|
|||
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
|
||||
|
||||
var triggers = encodeURIComponent(JSON.stringify({
|
||||
"XPI": "slowinstall.sjs?file=unsigned.xpi"
|
||||
"XPI": "slowinstall.sjs?file=amosigned.xpi"
|
||||
}));
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
|
||||
|
@ -1074,7 +1078,7 @@ function test_failed_security() {
|
|||
Services.prefs.setBoolPref(PREF_INSTALL_REQUIREBUILTINCERTS, false);
|
||||
|
||||
setup_redirect({
|
||||
"Location": TESTROOT + "unsigned.xpi"
|
||||
"Location": TESTROOT + "amosigned.xpi"
|
||||
});
|
||||
|
||||
// Wait for the blocked notification
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
TESTROOT = $(CURDIR)/$(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
|
||||
testdir = $(TESTROOT)/browser
|
||||
|
||||
# This is so hacky. Waiting on bug 988938.
|
||||
libs::
|
||||
$(EXIT_ON_ERROR) \
|
||||
$(NSINSTALL) -D $(testdir); \
|
||||
(cd $(srcdir)/addon && zip -qr $(testdir)/addon.xpi *); \
|
||||
(cd $(srcdir)/compat-addon && zip -qr $(testdir)/compat-addon.xpi *)
|
|
@ -18,6 +18,14 @@
|
|||
<em:aboutURL>chrome://foo/content/about.xul</em:aboutURL>
|
||||
<em:optionsURL>chrome://foo/content/options.xul</em:optionsURL>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
|
||||
<em:minVersion>0.3</em:minVersion>
|
||||
<em:maxVersion>*</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>toolkit@mozilla.org</em:id>
|
||||
|
|
Двоичный файл не отображается.
|
@ -4,7 +4,6 @@ support-files =
|
|||
addon.xpi
|
||||
browser_addonShims_testpage.html
|
||||
browser_addonShims_testpage2.html
|
||||
generated-files =
|
||||
addon.xpi
|
||||
compat-addon.xpi
|
||||
|
||||
[browser_addonShims.js]
|
||||
|
|
Двоичный файл не отображается.
|
@ -18,6 +18,14 @@
|
|||
<em:aboutURL>chrome://foo/content/about.xul</em:aboutURL>
|
||||
<em:optionsURL>chrome://foo/content/options.xul</em:optionsURL>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
|
||||
<em:minVersion>0.3</em:minVersion>
|
||||
<em:maxVersion>*</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>toolkit@mozilla.org</em:id>
|
||||
|
|
Двоичный файл не отображается.
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>addonwatcher-test@mozilla.com</em:id>
|
||||
<em:version>1.0</em:version>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
|
||||
<em:minVersion>0.3</em:minVersion>
|
||||
<em:maxVersion>*</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>toolkit@mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>*</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
|
||||
<em:name>Sample for browser_AddonWatcher.js</em:name>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -21,6 +21,7 @@ support-files =
|
|||
navigate.html
|
||||
redirect.sjs
|
||||
restartless.xpi
|
||||
restartless-unsigned.xpi
|
||||
signed-multipackage.xpi
|
||||
signed-no-cn.xpi
|
||||
signed-no-o.xpi
|
||||
|
|
Двоичные данные
toolkit/mozapps/extensions/test/xpinstall/incompatible.xpi
Двоичные данные
toolkit/mozapps/extensions/test/xpinstall/incompatible.xpi
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичные данные
toolkit/mozapps/extensions/test/xpinstall/restartless.xpi
Двоичные данные
toolkit/mozapps/extensions/test/xpinstall/restartless.xpi
Двоичный файл не отображается.
Двоичные данные
toolkit/mozapps/extensions/test/xpinstall/theme.xpi
Двоичные данные
toolkit/mozapps/extensions/test/xpinstall/theme.xpi
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче