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

Side by Side Diff: LayoutTests/http/tests/inspector/debugger-test.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 var initialize_DebuggerTest = function() { 1 var initialize_DebuggerTest = function() {
2 2
3 InspectorTest.startDebuggerTest = function(callback, quiet) 3 InspectorTest.startDebuggerTest = function(callback, quiet)
4 { 4 {
5 if (quiet !== undefined) 5 if (quiet !== undefined)
6 InspectorTest._quiet = quiet; 6 InspectorTest._quiet = quiet;
7 WebInspector.inspectorView.showPanel("sources"); 7 WebInspector.inspectorView.showPanel("sources");
8 8
9 if (WebInspector.debuggerModel.debuggerEnabled()) 9 if (WebInspector.debuggerModel.debuggerEnabled())
10 startTest(); 10 startTest();
11 else { 11 else {
12 InspectorTest.addSniffer(WebInspector.debuggerModel, "_debuggerWasEnable d", startTest); 12 InspectorTest.addSniffer(WebInspector.debuggerModel, "_debuggerWasEnable d", startTest);
13 WebInspector.debuggerModel.enableDebugger(); 13 WebInspector.debuggerModel.enableDebugger();
14 } 14 }
15 15
16 function startTest() 16 function startTest()
17 { 17 {
18 InspectorTest.addResult("Debugger was enabled."); 18 InspectorTest.addResult("Debugger was enabled.");
19 InspectorTest.addSniffer(WebInspector.debuggerModel, "_pausedScript", In spectorTest._pausedScript, true); 19 InspectorTest.addSniffer(WebInspector.debuggerModel, "_pausedScript", In spectorTest._pausedScript, true);
20 InspectorTest.addSniffer(WebInspector.debuggerModel, "_resumedScript", I nspectorTest._resumedScript, true); 20 InspectorTest.addSniffer(WebInspector.debuggerModel, "_resumedScript", I nspectorTest._resumedScript, true);
21 InspectorTest.safeWrap(callback)(); 21 InspectorTest.safeWrap(callback)();
22 } 22 }
23 }; 23 };
24 24
25 InspectorTest.finishDebuggerTest = function(callback) 25 InspectorTest.finishDebuggerTest = function(callback)
26 { 26 {
27 var sourcesPanel = WebInspector.panels.sources; 27 var sourcesPanel = WebInspector.inspectorView.panel("sources");
28 28
29 WebInspector.debuggerModel.setBreakpointsActive(true); 29 WebInspector.debuggerModel.setBreakpointsActive(true);
30 InspectorTest.resumeExecution(disableDebugger); 30 InspectorTest.resumeExecution(disableDebugger);
31 31
32 function disableDebugger() 32 function disableDebugger()
33 { 33 {
34 if (!WebInspector.debuggerModel.debuggerEnabled()) 34 if (!WebInspector.debuggerModel.debuggerEnabled())
35 completeTest(); 35 completeTest();
36 else { 36 else {
37 InspectorTest.addSniffer(WebInspector.debuggerModel, "_debuggerWasDi sabled", debuggerDisabled); 37 InspectorTest.addSniffer(WebInspector.debuggerModel, "_debuggerWasDi sabled", debuggerDisabled);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 callback = InspectorTest.safeWrap(callback); 140 callback = InspectorTest.safeWrap(callback);
141 141
142 if (!InspectorTest._pausedScriptArguments) 142 if (!InspectorTest._pausedScriptArguments)
143 callback(); 143 callback();
144 else 144 else
145 InspectorTest._waitUntilResumedCallback = callback; 145 InspectorTest._waitUntilResumedCallback = callback;
146 }; 146 };
147 147
148 InspectorTest.resumeExecution = function(callback) 148 InspectorTest.resumeExecution = function(callback)
149 { 149 {
150 if (WebInspector.panels.sources.paused) 150 if (WebInspector.inspectorView.panel("sources").paused)
151 WebInspector.panels.sources.togglePause(); 151 WebInspector.inspectorView.panel("sources").togglePause();
152 InspectorTest.waitUntilResumed(callback); 152 InspectorTest.waitUntilResumed(callback);
153 }; 153 };
154 154
155 InspectorTest.captureStackTrace = function(callFrames, asyncStackTrace, options) 155 InspectorTest.captureStackTrace = function(callFrames, asyncStackTrace, options)
156 { 156 {
157 InspectorTest.addResult(InspectorTest.captureStackTraceIntoString(callFrames , asyncStackTrace, options)); 157 InspectorTest.addResult(InspectorTest.captureStackTraceIntoString(callFrames , asyncStackTrace, options));
158 }; 158 };
159 159
160 InspectorTest.captureStackTraceIntoString = function(callFrames, asyncStackTrace , options) 160 InspectorTest.captureStackTraceIntoString = function(callFrames, asyncStackTrace , options)
161 { 161 {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 sourceFrame._setBreakpoint(lineNumber, 0, condition, enabled); 284 sourceFrame._setBreakpoint(lineNumber, 0, condition, enabled);
285 }; 285 };
286 286
287 InspectorTest.removeBreakpoint = function(sourceFrame, lineNumber) 287 InspectorTest.removeBreakpoint = function(sourceFrame, lineNumber)
288 { 288 {
289 sourceFrame._breakpointManager.findBreakpointOnLine(sourceFrame._uiSourceCod e, lineNumber).remove(); 289 sourceFrame._breakpointManager.findBreakpointOnLine(sourceFrame._uiSourceCod e, lineNumber).remove();
290 }; 290 };
291 291
292 InspectorTest.dumpBreakpointSidebarPane = function(title) 292 InspectorTest.dumpBreakpointSidebarPane = function(title)
293 { 293 {
294 var paneElement = WebInspector.panels.sources.sidebarPanes.jsBreakpoints.lis tElement; 294 var paneElement = WebInspector.inspectorView.panel("sources").sidebarPanes.j sBreakpoints.listElement;
295 InspectorTest.addResult("Breakpoint sidebar pane " + (title || "")); 295 InspectorTest.addResult("Breakpoint sidebar pane " + (title || ""));
296 InspectorTest.addResult(InspectorTest.textContentWithLineBreaks(paneElement) ); 296 InspectorTest.addResult(InspectorTest.textContentWithLineBreaks(paneElement) );
297 }; 297 };
298 298
299 InspectorTest.expandProperties = function(properties, callback) 299 InspectorTest.expandProperties = function(properties, callback)
300 { 300 {
301 var index = 0; 301 var index = 0;
302 function expandNextPath() 302 function expandNextPath()
303 { 303 {
304 if (index === properties.length) { 304 if (index === properties.length) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 InspectorTest.scriptFormatter = function() 394 InspectorTest.scriptFormatter = function()
395 { 395 {
396 var editorActions = WebInspector.moduleManager.instances(WebInspector.Source sView.EditorAction); 396 var editorActions = WebInspector.moduleManager.instances(WebInspector.Source sView.EditorAction);
397 for (var i = 0; i < editorActions.length; ++i) { 397 for (var i = 0; i < editorActions.length; ++i) {
398 if (editorActions[i] instanceof WebInspector.ScriptFormatterEditorAction ) 398 if (editorActions[i] instanceof WebInspector.ScriptFormatterEditorAction )
399 return editorActions[i]; 399 return editorActions[i];
400 } 400 }
401 }; 401 };
402 402
403 }; 403 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698