зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset ae1924aff61b (bug 1443457) as requested by developer
--HG-- rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_console_devtools_loader_exception.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_console_addonsdk_loader_exception.js rename : devtools/client/webconsole/test/browser_console_devtools_loader_exception.js => devtools/client/webconsole/test/browser_console_addonsdk_loader_exception.js
This commit is contained in:
Родитель
4295ed1070
Коммит
714a558c3e
|
@ -9,12 +9,12 @@ var observer = {
|
|||
|
||||
observerService.addObserver(observer, "debuggerAttached");
|
||||
|
||||
var devtoolsLoaderDestroyObserver = {
|
||||
var sdkLoaderDestroyObserver = {
|
||||
observe: function () {
|
||||
// Remove all observers on devtools:loader:destroy
|
||||
// Remove all observers on sdk:loader:destroy
|
||||
observerService.removeObserver(observer, "debuggerAttached");
|
||||
observerService.removeObserver(devtoolsLoaderDestroyObserver, "devtools:loader:destroy");
|
||||
observerService.removeObserver(sdkLoaderDestroyObserver, "sdk:loader:destroy");
|
||||
}
|
||||
};
|
||||
|
||||
observerService.addObserver(devtoolsLoaderDestroyObserver, "devtools:loader:destroy");
|
||||
observerService.addObserver(sdkLoaderDestroyObserver, "sdk:loader:destroy");
|
||||
|
|
|
@ -178,7 +178,7 @@ var gDevToolsBrowser = exports.gDevToolsBrowser = {
|
|||
case "quit-application":
|
||||
gDevToolsBrowser.destroy({ shuttingDown: true });
|
||||
break;
|
||||
case "devtools:loader:destroy":
|
||||
case "sdk:loader:destroy":
|
||||
// This event is fired when the devtools loader unloads, which happens
|
||||
// only when the add-on workflow ask devtools to be reloaded.
|
||||
if (subject.wrappedJSObject == require("@loader/unload")) {
|
||||
|
@ -711,7 +711,7 @@ var gDevToolsBrowser = exports.gDevToolsBrowser = {
|
|||
},
|
||||
|
||||
/**
|
||||
* Either the DevTools Loader has been destroyed by the add-on contribution
|
||||
* Either the SDK Loader has been destroyed by the add-on contribution
|
||||
* workflow, or firefox is shutting down.
|
||||
|
||||
* @param {boolean} shuttingDown
|
||||
|
@ -723,7 +723,7 @@ var gDevToolsBrowser = exports.gDevToolsBrowser = {
|
|||
Services.prefs.removeObserver("devtools.", gDevToolsBrowser);
|
||||
Services.obs.removeObserver(gDevToolsBrowser, "browser-delayed-startup-finished");
|
||||
Services.obs.removeObserver(gDevToolsBrowser, "quit-application");
|
||||
Services.obs.removeObserver(gDevToolsBrowser, "devtools:loader:destroy");
|
||||
Services.obs.removeObserver(gDevToolsBrowser, "sdk:loader:destroy");
|
||||
|
||||
for (let win of gDevToolsBrowser._trackedBrowserWindows) {
|
||||
gDevToolsBrowser._forgetBrowserWindow(win);
|
||||
|
@ -759,7 +759,7 @@ gDevTools.on("toolbox-destroyed", gDevToolsBrowser._updateMenuCheckbox);
|
|||
Services.obs.addObserver(gDevToolsBrowser, "quit-application");
|
||||
Services.obs.addObserver(gDevToolsBrowser, "browser-delayed-startup-finished");
|
||||
// Watch for module loader unload. Fires when the tools are reloaded.
|
||||
Services.obs.addObserver(gDevToolsBrowser, "devtools:loader:destroy");
|
||||
Services.obs.addObserver(gDevToolsBrowser, "sdk:loader:destroy");
|
||||
|
||||
// Fake end of browser window load event for all already opened windows
|
||||
// that is already fully loaded.
|
||||
|
|
|
@ -655,7 +655,7 @@ DevTools.prototype = {
|
|||
},
|
||||
|
||||
/**
|
||||
* Either the DevTools Loader has been destroyed by the add-on contribution
|
||||
* Either the SDK Loader has been destroyed by the add-on contribution
|
||||
* workflow, or firefox is shutting down.
|
||||
|
||||
* @param {boolean} shuttingDown
|
||||
|
|
|
@ -166,12 +166,12 @@ support-files =
|
|||
!/devtools/client/shared/test/test-actor-registry.js
|
||||
|
||||
[browser_console.js]
|
||||
[browser_console_addonsdk_loader_exception.js]
|
||||
[browser_console_clear_method.js]
|
||||
skip-if = true # Bug 1437843
|
||||
[browser_console_consolejsm_output.js]
|
||||
[browser_console_context_menu_entries.js]
|
||||
[browser_console_dead_objects.js]
|
||||
[browser_console_devtools_loader_exception.js]
|
||||
[browser_console_error_source_click.js]
|
||||
[browser_console_filters.js]
|
||||
[browser_console_nsiconsolemessage.js]
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
|
||||
/* import-globals-from head.js */
|
||||
|
||||
// Check that exceptions from scripts loaded with the DevTools loader are
|
||||
// Check that exceptions from scripts loaded with the addon-sdk loader are
|
||||
// opened correctly in View Source from the Browser Console.
|
||||
|
||||
"use strict";
|
||||
|
||||
const TEST_URI =
|
||||
"data:text/html;charset=utf8,<p>browser_console_devtools_loader_exception.js</p>";
|
||||
"data:text/html;charset=utf8,<p>browser_console_addonsdk_loader_exception.js</p>";
|
||||
|
||||
add_task(async function() {
|
||||
let wcHud = await openNewTabAndConsole(TEST_URI);
|
||||
|
@ -20,7 +20,7 @@ add_task(async function() {
|
|||
let bcHud = await HUDService.toggleBrowserConsole();
|
||||
ok(bcHud, "browser console opened");
|
||||
|
||||
// Cause an exception in a script loaded with the DevTools loader.
|
||||
// Cause an exception in a script loaded with the addon-sdk loader.
|
||||
let toolbox = gDevTools.getToolbox(wcHud.target);
|
||||
let oldPanels = toolbox._toolPanels;
|
||||
// non-iterable
|
|
@ -160,6 +160,7 @@ skip-if = (e10s && (os == 'win' || os == 'mac')) # Bug 1243976
|
|||
[browser_bug_871156_ctrlw_close_tab.js]
|
||||
[browser_cached_messages.js]
|
||||
[browser_console.js]
|
||||
[browser_console_addonsdk_loader_exception.js]
|
||||
[browser_console_certificate_imminent_distrust.js]
|
||||
[browser_console_clear_method.js]
|
||||
[browser_console_clear_on_reload.js]
|
||||
|
@ -173,7 +174,6 @@ skip-if = e10s # Bug 1042253 - webconsole tests disabled with e10s
|
|||
[browser_console_copy_entire_message_context_menu.js]
|
||||
subsuite = clipboard
|
||||
skip-if = (os == 'linux' && bits == 32 && debug) # bug 1328915, disable linux32 debug devtools for timeouts
|
||||
[browser_console_devtools_loader_exception.js]
|
||||
[browser_console_error_source_click.js]
|
||||
[browser_console_filters.js]
|
||||
[browser_console_iframe_messages.js]
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// Check that exceptions from scripts loaded with the DevTools loader are
|
||||
// Check that exceptions from scripts loaded with the addon-sdk loader are
|
||||
// opened correctly in View Source from the Browser Console.
|
||||
// See bug 866950.
|
||||
|
||||
|
@ -26,7 +26,7 @@ function test() {
|
|||
browserconsole = yield HUDService.toggleBrowserConsole();
|
||||
ok(browserconsole, "browser console opened");
|
||||
|
||||
// Cause an exception in a script loaded with the DevTools loader.
|
||||
// Cause an exception in a script loaded with the addon-sdk loader.
|
||||
let toolbox = gDevTools.getToolbox(webconsole.target);
|
||||
let oldPanels = toolbox._toolPanels;
|
||||
// non-iterable
|
|
@ -31,7 +31,7 @@ DevToolsUtils.defineLazyGetter(this, "generateUUID", () => {
|
|||
return generateUUID;
|
||||
});
|
||||
|
||||
// Overload `Components` to prevent DevTools loader exception on Components
|
||||
// Overload `Components` to prevent SDK loader exception on Components
|
||||
// object usage
|
||||
Object.defineProperty(this, "Components", {
|
||||
get() {
|
||||
|
|
|
@ -19,7 +19,7 @@ let {DebuggerClient} = require("devtools/shared/client/debugger-client");
|
|||
let {DebuggerServer} = require("devtools/server/main");
|
||||
let Services = require("Services");
|
||||
|
||||
window.onload = function () {
|
||||
window.onload = function() {
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
SpecialPowers.pushPrefEnv({
|
||||
|
@ -91,7 +91,7 @@ function runTests() {
|
|||
to: actor.consoleActor,
|
||||
type: "evaluateJS",
|
||||
text: "var a = 42; a"
|
||||
}, function ({result}) {
|
||||
}, function({result}) {
|
||||
ok(result, 42, "console.eval worked");
|
||||
|
||||
getProcessAgain(actor, content.id);
|
||||
|
@ -113,16 +113,16 @@ function runTests() {
|
|||
|
||||
function processScript() {
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
let listener = function () {
|
||||
Services.obs.removeObserver(listener, "devtools:loader:destroy");
|
||||
let listener = function() {
|
||||
Services.obs.removeObserver(listener, "sdk:loader:destroy");
|
||||
sendAsyncMessage("test:getProcess-destroy", null);
|
||||
};
|
||||
Services.obs.addObserver(listener, "devtools:loader:destroy");
|
||||
Services.obs.addObserver(listener, "sdk:loader:destroy");
|
||||
}
|
||||
|
||||
function closeClient() {
|
||||
let onLoaderDestroyed = new Promise(done => {
|
||||
let processListener = function () {
|
||||
let processListener = function() {
|
||||
Services.ppmm.removeMessageListener("test:getProcess-destroy", processListener);
|
||||
done();
|
||||
};
|
||||
|
@ -132,7 +132,7 @@ function runTests() {
|
|||
Services.ppmm.loadProcessScript(script, true);
|
||||
client.close();
|
||||
|
||||
onLoaderDestroyed.then(function () {
|
||||
onLoaderDestroyed.then(function() {
|
||||
Services.ppmm.removeDelayedProcessScript(script);
|
||||
info("Loader destroyed in the content process");
|
||||
|
||||
|
|
|
@ -571,7 +571,7 @@ function unload(loader, reason) {
|
|||
// some modules may do cleanup in subsequent turns of event loop. Destroying
|
||||
// cache may cause module identity problems in such cases.
|
||||
let subject = { wrappedJSObject: loader.destructor };
|
||||
Services.obs.notifyObservers(subject, "devtools:loader:destroy", reason);
|
||||
Services.obs.notifyObservers(subject, "sdk:loader:destroy", reason);
|
||||
}
|
||||
|
||||
// Function makes new loader that can be used to load CommonJS modules.
|
||||
|
|
|
@ -226,7 +226,7 @@ defineLazyGetter(exports.modules, "Debugger", () => {
|
|||
|
||||
defineLazyGetter(exports.modules, "Timer", () => {
|
||||
let {setTimeout, clearTimeout} = require("resource://gre/modules/Timer.jsm");
|
||||
// Do not return Cu.import result, as DevTools loader would freeze Timer.jsm globals...
|
||||
// Do not return Cu.import result, as SDK loader would freeze Timer.jsm globals...
|
||||
return {
|
||||
setTimeout,
|
||||
clearTimeout
|
||||
|
@ -280,8 +280,8 @@ exports.globals = {
|
|||
URL,
|
||||
XMLHttpRequest,
|
||||
};
|
||||
// DevTools loader copy globals property descriptors on each module global
|
||||
// object so that we have to memoize them from here in order to instantiate each
|
||||
// SDK loader copy globals property descriptors on each module global object
|
||||
// so that we have to memoize them from here in order to instanciate each
|
||||
// global only once.
|
||||
// `globals` is a cache object on which we put all global values
|
||||
// and we set getters on `exports.globals` returning `globals` values.
|
||||
|
|
|
@ -847,7 +847,7 @@
|
|||
"devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_location_styleeditor_link.js": 4469,
|
||||
"devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_network_messages_click.js": 3871,
|
||||
"devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_nodes_select.js": 5570,
|
||||
"devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_object_inspector_entries.js": 3676,
|
||||
"devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_object_inspector_entries.js": 3676,
|
||||
"devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_observer_notifications.js": 4639,
|
||||
"devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_scroll.js": 3616,
|
||||
"devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_sourcemap_error.js": 3529,
|
||||
|
@ -857,9 +857,9 @@
|
|||
"devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_warn_about_replaced_api.js": 6869,
|
||||
"devtools/client/webconsole/test/browser_bug664688_sandbox_update_after_navigation.js": 3934,
|
||||
"devtools/client/webconsole/test/browser_cached_messages.js": 4512,
|
||||
"devtools/client/webconsole/test/browser_console_consolejsm_output.js": 4138,
|
||||
"devtools/client/webconsole/test/browser_console_devtools_loader_exception.js": 3748,
|
||||
"devtools/client/webconsole/test/browser_console_filters.js": 4025,
|
||||
"devtools/client/webconsole/test/browser_console_addonsdk_loader_exception.js": 3748,
|
||||
"devtools/client/webconsole/test/browser_console_consolejsm_output.js": 4138,
|
||||
"devtools/client/webconsole/test/browser_console_filters.js": 4025,
|
||||
"devtools/client/webconsole/test/browser_console_hide_jsterm_when_devtools_chrome_enabled_false.js": 9069,
|
||||
"devtools/client/webconsole/test/browser_console_history_persist.js": 7397,
|
||||
"devtools/client/webconsole/test/browser_console_iframe_messages.js": 5006,
|
||||
|
@ -912,4 +912,4 @@
|
|||
"devtools/server/tests/browser/browser_markers-cycle-collection.js": 5381,
|
||||
"devtools/server/tests/browser/browser_webextension_inspected_window.js": 5888
|
||||
}
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче