Commit 9f4ea38c authored by alph@chromium.org's avatar alph@chromium.org

DevTools: Unflake inspector/profiler/cpu-profiler-profile-removal.html

The test callback was called from within the ProfilesPanel.showProfile()
and put the panel in a non-expected state.

BUG=378389
R=yurys@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175054 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 64948dc4
...@@ -16,7 +16,7 @@ function pageFunction() { ...@@ -16,7 +16,7 @@ function pageFunction() {
function test() function test()
{ {
InspectorTest.startProfilerTest(function() { InspectorTest.startProfilerTest(function() {
function viewLoaded(view) { function viewLoaded() {
var profiles = WebInspector.panels.profiles; var profiles = WebInspector.panels.profiles;
var type = WebInspector.ProfileTypeRegistry.instance.cpuProfileType; var type = WebInspector.ProfileTypeRegistry.instance.cpuProfileType;
while (type.getProfiles().length !== 0) while (type.getProfiles().length !== 0)
...@@ -31,7 +31,7 @@ function test() ...@@ -31,7 +31,7 @@ function test()
WebInspector.inspectorView.showPanel("profiles"); WebInspector.inspectorView.showPanel("profiles");
InspectorTest.evaluateInConsole("pageFunction()", function() {}); InspectorTest.evaluateInConsole("pageFunction()", function() {});
InspectorTest.showProfileWhenAdded("p2"); InspectorTest.showProfileWhenAdded("p2");
InspectorTest.waitUntilProfileViewIsShown("p2", viewLoaded); InspectorTest.waitUntilProfileViewIsShown("p2", setTimeout.bind(null, viewLoaded, 0));
}); });
} }
......
...@@ -795,7 +795,7 @@ WebInspector.ProfilesPanel.prototype = { ...@@ -795,7 +795,7 @@ WebInspector.ProfilesPanel.prototype = {
{ {
var profileType = profile.profileType(); var profileType = profile.profileType();
var typeId = profileType.id; var typeId = profileType.id;
this._typeIdToSidebarSection[typeId].addProfileHeader(profile);; this._typeIdToSidebarSection[typeId].addProfileHeader(profile);
if (!this.visibleView || this.visibleView === this._launcherView) if (!this.visibleView || this.visibleView === this._launcherView)
this.showProfile(profile); this.showProfile(profile);
}, },
......
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