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() ...@@ -885,12 +885,7 @@ function runTests()
new TestSuite().runTest(name); new TestSuite().runTest(name);
} }
var oldLoadCompleted = InspectorFrontendAPI.loadCompleted; WebInspector.notifications.addEventListener(WebInspector.NotificationService.Events.InspectorUILoadedForTests, runTests);
InspectorFrontendAPI.loadCompleted = function()
{
oldLoadCompleted.call(InspectorFrontendAPI);
runTests();
}
})(); })();
......
...@@ -15,7 +15,7 @@ WebInspector.NotificationService.prototype = { ...@@ -15,7 +15,7 @@ WebInspector.NotificationService.prototype = {
} }
WebInspector.NotificationService.Events = { WebInspector.NotificationService.Events = {
InspectorLoaded: "InspectorLoaded", InspectorUILoadedForTests: "InspectorUILoadedForTests",
SelectedNodeChanged: "SelectedNodeChanged" SelectedNodeChanged: "SelectedNodeChanged"
} }
......
...@@ -8,10 +8,6 @@ self.WebInspector = { ...@@ -8,10 +8,6 @@ self.WebInspector = {
_queryParamsObject: {} _queryParamsObject: {}
} }
WebInspector.Events = {
InspectorLoaded: "InspectorLoaded"
}
/** /**
* @param {string} name * @param {string} name
* @return {?string} * @return {?string}
......
...@@ -374,6 +374,7 @@ WebInspector.Main.prototype = { ...@@ -374,6 +374,7 @@ WebInspector.Main.prototype = {
console.timeStamp("Main.inspectorAgentEnableCallback"); console.timeStamp("Main.inspectorAgentEnableCallback");
WebInspector.app.presentUI(mainTarget); WebInspector.app.presentUI(mainTarget);
console.timeStamp("Main.inspectorAgentEnableCallbackPresentUI"); console.timeStamp("Main.inspectorAgentEnableCallbackPresentUI");
WebInspector.notifications.dispatchEventToListeners(WebInspector.NotificationService.Events.InspectorUILoadedForTests);
} }
WebInspector.actionRegistry = new WebInspector.ActionRegistry(); WebInspector.actionRegistry = new WebInspector.ActionRegistry();
...@@ -384,7 +385,6 @@ WebInspector.Main.prototype = { ...@@ -384,7 +385,6 @@ WebInspector.Main.prototype = {
this._loadCompletedForWorkers(); this._loadCompletedForWorkers();
InspectorFrontendAPI.loadCompleted(); InspectorFrontendAPI.loadCompleted();
WebInspector.notifications.dispatchEventToListeners(WebInspector.NotificationService.Events.InspectorLoaded);
}, },
_registerForwardedShortcuts: function() _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