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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/click-gutter-breakpoint.html

Issue 2356423002: [DevTools] Turn WebInspector.Panel into a web component.
Patch Set: partial fixes Created 4 years, 2 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
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 src="../debugger/resources/click-breakpoints.js"></script> 5 <script src="../debugger/resources/click-breakpoints.js"></script>
6 <script> 6 <script>
7 function test() 7 function test()
8 { 8 {
9 var panel = WebInspector.panels.sources;
10
9 function clickCodeMirrorLineNumber(lineNumber) 11 function clickCodeMirrorLineNumber(lineNumber)
10 { 12 {
11 var element = Array.from(document.getElementsByClassName("CodeMirror-lin enumber")).filter(x => x.textContent === (lineNumber + 1).toString())[0]; 13 var element = Array.from(panel.contentElement.querySelectorAll(".CodeMir ror-linenumber")).filter(x => x.textContent === (lineNumber + 1).toString())[0];
12 if (!element) { 14 if (!element) {
13 InspectorTest.addResult("CodeMirror Gutter Not Found:" + lineNumber) ; 15 InspectorTest.addResult("CodeMirror Gutter Not Found:" + lineNumber) ;
14 InspectorTest.completeDebuggerTest(); 16 InspectorTest.completeDebuggerTest();
15 return false; 17 return false;
16 } 18 }
17 var rect = element.getBoundingClientRect(); 19 var rect = element.getBoundingClientRect();
18 eventSender.mouseMoveTo(rect.left + rect.width / 2, rect.top + rect.heig ht / 2); 20 eventSender.mouseMoveTo(rect.left + rect.width / 2, rect.top + rect.heig ht / 2);
19 eventSender.mouseDown(); 21 eventSender.mouseDown();
20 eventSender.mouseUp(); 22 eventSender.mouseUp();
21 return true; 23 return true;
22 } 24 }
23 25
24 WebInspector.breakpointManager._storage._breakpoints = {}; 26 WebInspector.breakpointManager._storage._breakpoints = {};
25 var panel = WebInspector.panels.sources;
26 var scriptFormatter;
27 var formattedSourceFrame;
28
29 InspectorTest.startDebuggerTest(() => InspectorTest.showScriptSource("click- breakpoints.js", didShowScriptSource)); 27 InspectorTest.startDebuggerTest(() => InspectorTest.showScriptSource("click- breakpoints.js", didShowScriptSource));
30 28
31 29
32 function didShowScriptSource() 30 function didShowScriptSource()
33 { 31 {
34 clickCodeMirrorLineNumber(2); 32 clickCodeMirrorLineNumber(2);
35 clickCodeMirrorLineNumber(2); 33 clickCodeMirrorLineNumber(2);
36 clickCodeMirrorLineNumber(3); 34 clickCodeMirrorLineNumber(3);
37 InspectorTest.waitUntilPaused(pausedInF2); 35 InspectorTest.waitUntilPaused(pausedInF2);
38 InspectorTest.evaluateInPageWithTimeout("f2()"); 36 InspectorTest.evaluateInPageWithTimeout("f2()");
39 } 37 }
40 38
41 function pausedInF2(callFrames) 39 function pausedInF2(callFrames)
42 { 40 {
43 InspectorTest.dumpBreakpointSidebarPane("while paused"); 41 InspectorTest.dumpBreakpointSidebarPane("while paused");
44 InspectorTest.completeDebuggerTest(); 42 InspectorTest.completeDebuggerTest();
45 } 43 }
46 44
47 } 45 }
48 </script> 46 </script>
49 </head> 47 </head>
50 <body onload="runTest()"> 48 <body onload="runTest()">
51 <p>Tests that breakpoints can be added and removed by clicking the gutter. 49 <p>Tests that breakpoints can be added and removed by clicking the gutter.
52 </p> 50 </p>
53 </body> 51 </body>
54 </html> 52 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698