Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1772)

Unified Diff: Source/devtools/front_end/Tests.js

Issue 268293003: DevTools: Get rid of WebInspector.panels (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/Tests.js
diff --git a/Source/devtools/front_end/Tests.js b/Source/devtools/front_end/Tests.js
index 83dd051d21e5dc2db2db0a5f8f4d60e82ddf0463..f2de05bd414f9a235d6e37fcbf05f9c0c6fecfe0 100644
--- a/Source/devtools/front_end/Tests.js
+++ b/Source/devtools/front_end/Tests.js
@@ -188,7 +188,7 @@ TestSuite.prototype.showPanel = function(panelName)
// Open Scripts panel.
var button = document.getElementById("tab-" + panelName);
button.selectTabForTest();
- this.assertEquals(WebInspector.panels[panelName], WebInspector.inspectorView.currentPanel());
+ this.assertEquals(WebInspector.panel(panelName, true), WebInspector.inspectorView.currentPanel());
};
@@ -253,7 +253,7 @@ TestSuite.prototype.testShowScriptsTab = function()
TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh = function()
{
var test = this;
- this.assertEquals(WebInspector.panels.elements, WebInspector.inspectorView.currentPanel(), "Elements panel should be current one.");
+ this.assertEquals(WebInspector.inspectorView.panel("elements"), WebInspector.inspectorView.currentPanel(), "Elements panel should be current one.");
WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, waitUntilScriptIsParsed);
@@ -382,7 +382,7 @@ TestSuite.prototype.testPauseWhenScriptIsRunning = function()
function testScriptPause() {
// The script should be in infinite loop. Click "Pause" button to
// pause it and wait for the result.
- WebInspector.panels.sources._pauseButton.element.click();
+ WebInspector.inspectorView.panel("sources")._pauseButton.element.click();
this._waitForScriptPause(this.releaseControl.bind(this));
}
@@ -911,7 +911,7 @@ TestSuite.prototype._waitUntilScriptsAreParsed = function(expectedScripts, callb
if (test._scriptsAreParsed(expectedScripts))
callback();
else
- test.addSniffer(WebInspector.panels.sources.sourcesView(), "_addUISourceCode", waitForAllScripts);
+ test.addSniffer(WebInspector.inspectorView.panel("elements").sourcesView(), "_addUISourceCode", waitForAllScripts);
}
waitForAllScripts();

Powered by Google App Engine
This is Rietveld 408576698