Commit 1bf7d3f3 authored by dgozman@chromium.org's avatar dgozman@chromium.org

[DevTools] Run tests only after all UI bits are initialized.

Tests use WebInspector.panels, which are initialized only in presentUI.

BUG=397648

Review URL: https://codereview.chromium.org/426553003

git-svn-id: svn://svn.chromium.org/blink/trunk@179146 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent c5d2ab26
......@@ -885,12 +885,7 @@ function runTests()
new TestSuite().runTest(name);
}
var oldLoadCompleted = InspectorFrontendAPI.loadCompleted;
InspectorFrontendAPI.loadCompleted = function()
{
oldLoadCompleted.call(InspectorFrontendAPI);
runTests();
}
WebInspector.notifications.addEventListener(WebInspector.NotificationService.Events.InspectorUILoadedForTests, runTests);
})();
......
......@@ -15,7 +15,7 @@ WebInspector.NotificationService.prototype = {
}
WebInspector.NotificationService.Events = {
InspectorLoaded: "InspectorLoaded",
InspectorUILoadedForTests: "InspectorUILoadedForTests",
SelectedNodeChanged: "SelectedNodeChanged"
}
......
......@@ -8,10 +8,6 @@ self.WebInspector = {
_queryParamsObject: {}
}
WebInspector.Events = {
InspectorLoaded: "InspectorLoaded"
}
/**
* @param {string} name
* @return {?string}
......
......@@ -374,6 +374,7 @@ WebInspector.Main.prototype = {
console.timeStamp("Main.inspectorAgentEnableCallback");
WebInspector.app.presentUI(mainTarget);
console.timeStamp("Main.inspectorAgentEnableCallbackPresentUI");
WebInspector.notifications.dispatchEventToListeners(WebInspector.NotificationService.Events.InspectorUILoadedForTests);
}
WebInspector.actionRegistry = new WebInspector.ActionRegistry();
......@@ -384,7 +385,6 @@ WebInspector.Main.prototype = {
this._loadCompletedForWorkers();
InspectorFrontendAPI.loadCompleted();
WebInspector.notifications.dispatchEventToListeners(WebInspector.NotificationService.Events.InspectorLoaded);
},
_registerForwardedShortcuts: function()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment