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

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

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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
« no previous file with comments | « Source/devtools/front_end/main/Main.js ('k') | Source/devtools/front_end/network/NetworkLogView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/main/Tests.js
diff --git a/Source/devtools/front_end/main/Tests.js b/Source/devtools/front_end/main/Tests.js
index 04fa338c3f0a1e72d781b93d5a96e6d22942d41e..4f9585ed002a5d7f97d6d85e84f029952c6eecb5 100644
--- a/Source/devtools/front_end/main/Tests.js
+++ b/Source/devtools/front_end/main/Tests.js
@@ -287,7 +287,8 @@ TestSuite.prototype.testShowScriptsTab = function()
TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh = function()
{
var test = this;
- WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, waitUntilScriptIsParsed);
+ var debuggerModel = WebInspector.targetManager.mainTarget().debuggerModel;
+ debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, waitUntilScriptIsParsed);
this.showPanel("elements").then(function() {
// Reload inspected page. It will reset the debugger agent.
@@ -296,7 +297,7 @@ TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh = function()
function waitUntilScriptIsParsed()
{
- WebInspector.debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, waitUntilScriptIsParsed);
+ debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, waitUntilScriptIsParsed);
test.showPanel("sources").then(function() {
test._waitUntilScriptsAreParsed(["debugger_test_page.html"],
function() {
@@ -387,7 +388,8 @@ TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch = function()
// frontend is being loaded.
TestSuite.prototype.testPauseWhenLoadingDevTools = function()
{
- if (WebInspector.debuggerModel.debuggerPausedDetails)
+ var debuggerModel = WebInspector.targetManager.mainTarget().debuggerModel;
+ if (debuggerModel.debuggerPausedDetails)
return;
this.showPanel("sources").then(function() {
@@ -567,9 +569,10 @@ TestSuite.prototype.testConsoleOnNavigateBack = function()
TestSuite.prototype.testReattachAfterCrash = function()
{
- WebInspector.targetManager.mainTarget().pageAgent().navigate("about:crash");
- WebInspector.targetManager.mainTarget().pageAgent().navigate("about:blank");
- WebInspector.runtimeModel.addEventListener(WebInspector.RuntimeModel.Events.ExecutionContextCreated, this.releaseControl, this);
+ var target = WebInspector.targetManager.mainTarget();
+ target.pageAgent().navigate("about:crash");
+ target.pageAgent().navigate("about:blank");
+ target.runtimeModel.addEventListener(WebInspector.RuntimeModel.Events.ExecutionContextCreated, this.releaseControl, this);
};
@@ -609,7 +612,8 @@ TestSuite.prototype.testPauseInSharedWorkerInitialization1 = function()
TestSuite.prototype.testPauseInSharedWorkerInitialization2 = function()
{
- if (WebInspector.debuggerModel.isPaused())
+ var debuggerModel = WebInspector.targetManager.mainTarget().debuggerModel;
+ if (debuggerModel.isPaused())
return;
this._waitForScriptPause(this.releaseControl.bind(this));
this.takeControl();
« no previous file with comments | « Source/devtools/front_end/main/Main.js ('k') | Source/devtools/front_end/network/NetworkLogView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698