зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1138939 - Notify when WebIDE has finished initializing so that Valence can register runtime scanners. r=ochameau
This commit is contained in:
Родитель
f336a1e08a
Коммит
dac40ca9c0
|
@ -778,6 +778,11 @@ let gDevToolsBrowser = {
|
|||
return !!(widgetWrapper && widgetWrapper.provider == CustomizableUI.PROVIDER_API);
|
||||
},
|
||||
|
||||
/**
|
||||
* The deferred promise will be resolved by WebIDE's UI.init()
|
||||
*/
|
||||
isWebIDEInitialized: promise.defer(),
|
||||
|
||||
/**
|
||||
* Uninstall WebIDE widget
|
||||
*/
|
||||
|
|
|
@ -107,6 +107,8 @@ let UI = {
|
|||
.QueryInterface(Ci.nsIDocShell)
|
||||
.contentViewer;
|
||||
this.contentViewer.fullZoom = Services.prefs.getCharPref("devtools.webide.zoom");
|
||||
|
||||
gDevToolsBrowser.isWebIDEInitialized.resolve();
|
||||
},
|
||||
|
||||
uninit: function() {
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
Task.spawn(function* () {
|
||||
let win = yield openWebIDE();
|
||||
|
||||
const {gDevToolsBrowser} = Cu.import("resource:///modules/devtools/gDevTools.jsm");
|
||||
yield gDevToolsBrowser.isWebIDEInitialized.promise;
|
||||
ok(true, "WebIDE was initialized");
|
||||
|
||||
ok(win, "Found a window");
|
||||
ok(win.AppManager, "App Manager accessible");
|
||||
let appmgr = win.AppManager;
|
||||
|
|
Загрузка…
Ссылка в новой задаче