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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger/live-edit-no-reveal.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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="../../../http/tests/inspector/live-edit-test.js"></script> 5 <script src="../../../http/tests/inspector/live-edit-test.js"></script>
6 <script src="resources/edit-me-when-paused-no-reveal.js"></script> 6 <script src="resources/edit-me-when-paused-no-reveal.js"></script>
7 7
8 <script> 8 <script>
9 9
10 function test() 10 function test()
11 { 11 {
12 var panel = WebInspector.panels.sources; 12 var panel = UI.panels.sources;
13 var sourceFrame; 13 var sourceFrame;
14 14
15 function didStepInto() 15 function didStepInto()
16 { 16 {
17 InspectorTest.addResult("Did step into"); 17 InspectorTest.addResult("Did step into");
18 } 18 }
19 19
20 InspectorTest.addSniffer(InspectorTest.debuggerModel, "stepInto", didStepInt o, true); 20 InspectorTest.addSniffer(InspectorTest.debuggerModel, "stepInto", didStepInt o, true);
21 21
22 function testLiveEditWhenPausedDoesNotCauseCursorMove(oldText, newText, next ) 22 function testLiveEditWhenPausedDoesNotCauseCursorMove(oldText, newText, next )
23 { 23 {
24 InspectorTest.showScriptSource("edit-me-when-paused-no-reveal.js", didSh owScriptSource); 24 InspectorTest.showScriptSource("edit-me-when-paused-no-reveal.js", didSh owScriptSource);
25 25
26 function didShowScriptSource(sourceFrame) 26 function didShowScriptSource(sourceFrame)
27 { 27 {
28 InspectorTest.waitUntilPaused(paused); 28 InspectorTest.waitUntilPaused(paused);
29 InspectorTest.setBreakpoint(sourceFrame, 8, "", true); 29 InspectorTest.setBreakpoint(sourceFrame, 8, "", true);
30 InspectorTest.evaluateInPage("f1()", didEvaluateInPage); 30 InspectorTest.evaluateInPage("f1()", didEvaluateInPage);
31 } 31 }
32 32
33 function paused(callFrames) 33 function paused(callFrames)
34 { 34 {
35 sourceFrame = panel.visibleView; 35 sourceFrame = panel.visibleView;
36 InspectorTest.removeBreakpoint(sourceFrame, 8); 36 InspectorTest.removeBreakpoint(sourceFrame, 8);
37 InspectorTest.addSniffer(InspectorTest.debuggerModel, "_didEditScrip tSource", didEditScriptSource); 37 InspectorTest.addSniffer(InspectorTest.debuggerModel, "_didEditScrip tSource", didEditScriptSource);
38 panel._updateLastModificationTimeForTest(); 38 panel._updateLastModificationTimeForTest();
39 InspectorTest.replaceInSource(sourceFrame, oldText, newText); 39 InspectorTest.replaceInSource(sourceFrame, oldText, newText);
40 InspectorTest.addResult("Moving cursor to (0, 0)."); 40 InspectorTest.addResult("Moving cursor to (0, 0).");
41 sourceFrame.setSelection(WebInspector.TextRange.createFromLocation(0 , 0)); 41 sourceFrame.setSelection(Common.TextRange.createFromLocation(0, 0));
42 InspectorTest.addResult("Committing live edit."); 42 InspectorTest.addResult("Committing live edit.");
43 InspectorTest.commitSource(sourceFrame); 43 InspectorTest.commitSource(sourceFrame);
44 } 44 }
45 45
46 function didEditScriptSource() 46 function didEditScriptSource()
47 { 47 {
48 InspectorTest.resumeExecution(); 48 InspectorTest.resumeExecution();
49 } 49 }
50 50
51 function didEvaluateInPage(result) 51 function didEvaluateInPage(result)
(...skipping 18 matching lines...) Expand all
70 } 70 }
71 71
72 function paused(callFrames) 72 function paused(callFrames)
73 { 73 {
74 sourceFrame = panel.visibleView; 74 sourceFrame = panel.visibleView;
75 InspectorTest.removeBreakpoint(sourceFrame, 8); 75 InspectorTest.removeBreakpoint(sourceFrame, 8);
76 InspectorTest.addSniffer(InspectorTest.debuggerModel, "_didEditScrip tSource", didEditScriptSource); 76 InspectorTest.addSniffer(InspectorTest.debuggerModel, "_didEditScrip tSource", didEditScriptSource);
77 panel._updateLastModificationTimeForTest(); 77 panel._updateLastModificationTimeForTest();
78 InspectorTest.replaceInSource(sourceFrame, oldText, newText); 78 InspectorTest.replaceInSource(sourceFrame, oldText, newText);
79 InspectorTest.addResult("Moving cursor to (0, 0)."); 79 InspectorTest.addResult("Moving cursor to (0, 0).");
80 sourceFrame.setSelection(WebInspector.TextRange.createFromLocation(0 , 0)); 80 sourceFrame.setSelection(Common.TextRange.createFromLocation(0, 0));
81 InspectorTest.addResult("Committing live edit."); 81 InspectorTest.addResult("Committing live edit.");
82 InspectorTest.commitSource(sourceFrame); 82 InspectorTest.commitSource(sourceFrame);
83 } 83 }
84 84
85 function didEditScriptSource() 85 function didEditScriptSource()
86 { 86 {
87 InspectorTest.addResult("Stepping into..."); 87 InspectorTest.addResult("Stepping into...");
88 InspectorTest.addSniffer(WebInspector.SourcesView.prototype, "showSo urceLocation", didRevealAfterStepInto); 88 InspectorTest.addSniffer(Sources.SourcesView.prototype, "showSourceL ocation", didRevealAfterStepInto);
89 panel._lastModificationTimeoutPassedForTest(); 89 panel._lastModificationTimeoutPassedForTest();
90 InspectorTest.stepInto(); 90 InspectorTest.stepInto();
91 } 91 }
92 92
93 function didRevealAfterStepInto() 93 function didRevealAfterStepInto()
94 { 94 {
95 InspectorTest.resumeExecution(); 95 InspectorTest.resumeExecution();
96 } 96 }
97 97
98 function didEvaluateInPage(result) 98 function didEvaluateInPage(result)
(...skipping 30 matching lines...) Expand all
129 129
130 </script> 130 </script>
131 131
132 </head> 132 </head>
133 133
134 <body onload="runTest()"> 134 <body onload="runTest()">
135 <p>Tests live edit feature.</p> 135 <p>Tests live edit feature.</p>
136 136
137 </body> 137 </body>
138 </html> 138 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698