Backed out changeset 42abedd98732 (bug 1460910) for failing browser chrome at browser/components/extensions/test/browser/test-oop-extensions/browser_ext_sidebarAction.js on a CLOSED TREE

This commit is contained in:
Andreea Pavel 2018-05-18 22:59:25 +03:00
Родитель afd607c9f2
Коммит 5fe937094b
3 изменённых файлов: 2 добавлений и 23 удалений

Просмотреть файл

@ -135,8 +135,7 @@ this.sidebarAction = class extends ExtensionAPI {
for (let window of windowTracker.browserWindows()) {
this.updateWindow(window);
let {SidebarUI} = window;
if ((install && this.extension.manifest.sidebar_action.open_at_install) ||
SidebarUI.lastOpenedId == this.id) {
if (install || SidebarUI.lastOpenedId == this.id) {
SidebarUI.show(this.id);
}
}

Просмотреть файл

@ -30,12 +30,6 @@
"type": "string",
"format": "strictRelativeUrl",
"preprocess": "localize"
},
"open_at_install": {
"type": "boolean",
"optional": true,
"default": true,
"description": "Whether or not the sidebar is opened at install. Default is <code>true</code>."
}
},
"optional": true

Просмотреть файл

@ -70,8 +70,8 @@ add_task(async function sidebar_initial_install() {
ok(document.getElementById("sidebar-box").hidden, "sidebar box is not visible");
let extension = ExtensionTestUtils.loadExtension(getExtData());
await extension.startup();
// Test sidebar is opened on install
await extension.awaitMessage("sidebar");
ok(!document.getElementById("sidebar-box").hidden, "sidebar box is visible");
await extension.unload();
@ -79,20 +79,6 @@ add_task(async function sidebar_initial_install() {
ok(document.getElementById("sidebar-box").hidden, "sidebar box is not visible");
});
add_task(async function sidebar__install_closed() {
ok(document.getElementById("sidebar-box").hidden, "sidebar box is not visible");
let tempExtData = getExtData();
tempExtData.manifest.sidebar_action.open_at_install = false;
let extension = ExtensionTestUtils.loadExtension(tempExtData);
await extension.startup();
// Test sidebar is closed on install
ok(document.getElementById("sidebar-box").hidden, "sidebar box is hidden");
await extension.unload();
// This is the default value
tempExtData.manifest.sidebar_action.open_at_install = true;
});
add_task(async function sidebar_two_sidebar_addons() {
let extension2 = ExtensionTestUtils.loadExtension(getExtData());