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

Side by Side Diff: LayoutTests/inspector/sources/debugger/debugger-step-into-custom-element-callbacks.html

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 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script> 4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script> 5 <script>
6 6
7 function testFunction() { 7 function testFunction() {
8 var proto = Object.create(HTMLElement.prototype); 8 var proto = Object.create(HTMLElement.prototype);
9 proto.createdCallback = function createdCallback() { 9 proto.createdCallback = function createdCallback() {
10 output('Invoked createdCallback.'); 10 output('Invoked createdCallback.');
(...skipping 13 matching lines...) Expand all
24 debugger; 24 debugger;
25 foo.setAttribute('a', 'b'); 25 foo.setAttribute('a', 'b');
26 debugger; 26 debugger;
27 document.body.appendChild(foo); 27 document.body.appendChild(foo);
28 debugger; 28 debugger;
29 foo.remove(); 29 foo.remove();
30 } 30 }
31 31
32 var test = function() { 32 var test = function() {
33 InspectorTest.resumeExecution = function(callback) { 33 InspectorTest.resumeExecution = function(callback) {
34 if (WebInspector.panels.sources.paused) 34 if (WebInspector.inspectorView.panel("sources").paused)
35 WebInspector.panels.sources.togglePause(); 35 WebInspector.inspectorView.panel("sources").togglePause();
36 InspectorTest.waitUntilResumed(callback); 36 InspectorTest.waitUntilResumed(callback);
37 }; 37 };
38 38
39 InspectorTest.startDebuggerTest(step1, true); 39 InspectorTest.startDebuggerTest(step1, true);
40 40
41 function step1() { 41 function step1() {
42 InspectorTest.runTestFunctionAndWaitUntilPaused(step2); 42 InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
43 } 43 }
44 44
45 function checkTopFrameFunction(callFrames, expectedName) { 45 function checkTopFrameFunction(callFrames, expectedName) {
46 var topFunctionName = callFrames[0].functionName; 46 var topFunctionName = callFrames[0].functionName;
47 if (expectedName === topFunctionName) 47 if (expectedName === topFunctionName)
48 InspectorTest.addResult("PASS: Did step into event listener(" + expe ctedName + ")."); 48 InspectorTest.addResult("PASS: Did step into event listener(" + expe ctedName + ").");
49 else 49 else
50 InspectorTest.addResult("FAIL: Unexpected top function: expected " + expectedName + ", found " + topFunctionName); 50 InspectorTest.addResult("FAIL: Unexpected top function: expected " + expectedName + ", found " + topFunctionName);
51 } 51 }
52 52
53 function stepOverThenIn(name, callback) { 53 function stepOverThenIn(name, callback) {
54 InspectorTest.addResult("Stepping to " + name + "..."); 54 InspectorTest.addResult("Stepping to " + name + "...");
55 WebInspector.panels.sources._stepOverButton.element.click(); 55 WebInspector.inspectorView.panel("sources")._stepOverButton.element.clic k();
56 InspectorTest.waitUntilResumed(InspectorTest.waitUntilPaused.bind(Inspec torTest, function() { 56 InspectorTest.waitUntilResumed(InspectorTest.waitUntilPaused.bind(Inspec torTest, function() {
57 InspectorTest.addResult("Stepping into " + name + "..."); 57 InspectorTest.addResult("Stepping into " + name + "...");
58 WebInspector.panels.sources._stepIntoButton.element.click(); 58 WebInspector.inspectorView.panel("sources")._stepIntoButton.element. click();
59 InspectorTest.waitUntilResumed(InspectorTest.waitUntilPaused.bind(In spectorTest, callback)); 59 InspectorTest.waitUntilResumed(InspectorTest.waitUntilPaused.bind(In spectorTest, callback));
60 })); 60 }));
61 } 61 }
62 62
63 function step2() { 63 function step2() {
64 stepOverThenIn('constructor', step3); 64 stepOverThenIn('constructor', step3);
65 } 65 }
66 66
67 function step3(callFrames) { 67 function step3(callFrames) {
68 checkTopFrameFunction(callFrames, 'createdCallback'); 68 checkTopFrameFunction(callFrames, 'createdCallback');
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 </script> 100 </script>
101 </head> 101 </head>
102 102
103 <body onload="runTest()"> 103 <body onload="runTest()">
104 <p> 104 <p>
105 Tests that stepping into custom element methods will lead to a pause in the call backs. 105 Tests that stepping into custom element methods will lead to a pause in the call backs.
106 </p> 106 </p>
107 107
108 </body> 108 </body>
109 </html> 109 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698