зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset ea9a50dbf12f (bug 1588616) for causing xpcshell failures in test_ext_menu_caller. CLOSED TREE DONTBUILD
This commit is contained in:
Родитель
336909c781
Коммит
7dfc35949f
|
@ -129,8 +129,6 @@ this.menusInternal = class extends ExtensionAPI {
|
|||
let api = {
|
||||
menus: {
|
||||
create(createProperties, callback) {
|
||||
let caller = context.getCaller();
|
||||
|
||||
if (createProperties.id === null) {
|
||||
createProperties.id = ++gNextMenuItemID;
|
||||
}
|
||||
|
@ -147,7 +145,7 @@ this.menusInternal = class extends ExtensionAPI {
|
|||
}
|
||||
})
|
||||
.catch(error => {
|
||||
context.withLastError(error, caller, () => {
|
||||
context.withLastError(error, null, () => {
|
||||
if (callback) {
|
||||
context.runSafeWithoutClone(callback);
|
||||
}
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* vim: set sts=2 sw=2 et tw=80: */
|
||||
"use strict";
|
||||
|
||||
add_task(async function test_create_menu_ext_error() {
|
||||
let extension = ExtensionTestUtils.loadExtension({
|
||||
manifest: {
|
||||
permissions: ["menus"],
|
||||
},
|
||||
async background() {
|
||||
let { fileName } = new Error();
|
||||
browser.menus.create({
|
||||
id: "muted-tab",
|
||||
title: "open link with Menu 1",
|
||||
contexts: ["link"],
|
||||
});
|
||||
await new Promise(resolve => {
|
||||
browser.menus.create(
|
||||
{
|
||||
id: "muted-tab",
|
||||
title: "open link with Menu 2",
|
||||
contexts: ["link"],
|
||||
},
|
||||
resolve
|
||||
);
|
||||
});
|
||||
browser.test.sendMessage("fileName", fileName);
|
||||
},
|
||||
});
|
||||
|
||||
let fileName;
|
||||
const { messages } = await promiseConsoleOutput(async () => {
|
||||
await extension.startup();
|
||||
|
||||
fileName = await extension.awaitMessage("fileName");
|
||||
|
||||
await extension.unload();
|
||||
});
|
||||
|
||||
let [msg] = messages.filter(m => m.message.includes("Unchecked lastError"));
|
||||
equal(msg.sourceName, fileName, "Message source");
|
||||
equal(
|
||||
msg.errorMessage,
|
||||
"Unchecked lastError value: Error: ID already exists: muted-tab",
|
||||
"Message content"
|
||||
);
|
||||
equal(msg.lineNumber, 9, "Message line");
|
||||
|
||||
let frame = msg.stack;
|
||||
equal(frame.source, fileName, "Frame source");
|
||||
equal(frame.line, 9, "Frame line");
|
||||
equal(frame.column, 23, "Frame column");
|
||||
equal(frame.functionDisplayName, "background/<", "Frame function name");
|
||||
});
|
|
@ -56,7 +56,6 @@ skip-if = toolkit == 'android' # browser_action icon testing not supported on an
|
|||
[test_ext_manifest_minimum_chrome_version.js]
|
||||
[test_ext_manifest_minimum_opera_version.js]
|
||||
[test_ext_manifest_themes.js]
|
||||
[test_ext_menu_caller.js]
|
||||
[test_ext_permission_warnings.js]
|
||||
[test_ext_schemas.js]
|
||||
[test_ext_schemas_roots.js]
|
||||
|
|
Загрузка…
Ссылка в новой задаче