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(); |