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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-enabled/sources/debugger/linkifier.html

Issue 2801543002: DevTools: simplify ScriptFormatterEditorAction (Closed)
Patch Set: fixed cleanup Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-enabled/sources/debugger/script-formatter-breakpoints-1.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>// It is important that script starts on line 5 (zero-based 4) 5 <script>// It is important that script starts on line 5 (zero-based 4)
6 6
7 function nonFormattedFunction() { var i = 2 + 2; var a = 4; return a + i; } 7 function nonFormattedFunction() { var i = 2 + 2; var a = 4; return a + i; }
8 8
9 function dummyScript() 9 function dummyScript()
10 { 10 {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 InspectorTest.addResult("listeners added on raw source code: " + (count2 - count1)); 69 InspectorTest.addResult("listeners added on raw source code: " + (count2 - count1));
70 InspectorTest.addResult("original location: " + link.textContent); 70 InspectorTest.addResult("original location: " + link.textContent);
71 InspectorTest.addSniffer(Sources.ScriptFormatterEditorAction.prototype, "_updateButton", uiSourceCodeScriptFormatted); 71 InspectorTest.addSniffer(Sources.ScriptFormatterEditorAction.prototype, "_updateButton", uiSourceCodeScriptFormatted);
72 scriptFormatter._toggleFormatScriptSource(); 72 scriptFormatter._toggleFormatScriptSource();
73 } 73 }
74 74
75 function uiSourceCodeScriptFormatted() 75 function uiSourceCodeScriptFormatted()
76 { 76 {
77 InspectorTest.addResult("pretty printed location: " + link.textContent); 77 InspectorTest.addResult("pretty printed location: " + link.textContent);
78 scriptFormatter._discardFormattedUISourceCodeScript(UI.panels.sources.vi sibleView.uiSourceCode()); 78 scriptFormatter._discardFormattedUISourceCodeScript(UI.panels.sources.vi sibleView.uiSourceCode(), true);
79 InspectorTest.addResult("reverted location: " + link.textContent); 79 InspectorTest.addResult("reverted location: " + link.textContent);
80 80
81 var count1 = liveLocationsCount(); 81 var count1 = liveLocationsCount();
82 linkifier.reset(); 82 linkifier.reset();
83 var count2 = liveLocationsCount(); 83 var count2 = liveLocationsCount();
84 84
85 InspectorTest.addResult("listeners removed from raw source code: " + (co unt1 - count2)); 85 InspectorTest.addResult("listeners removed from raw source code: " + (co unt1 - count2));
86 86
87 InspectorTest.completeDebuggerTest(); 87 InspectorTest.completeDebuggerTest();
88 } 88 }
89 89
90 function liveLocationsCount() 90 function liveLocationsCount()
91 { 91 {
92 var scriptInfo = Bindings.debuggerWorkspaceBinding._ensureInfoForScript( script); 92 var scriptInfo = Bindings.debuggerWorkspaceBinding._ensureInfoForScript( script);
93 return scriptInfo._locations ? scriptInfo._locations.size : 0; 93 return scriptInfo._locations ? scriptInfo._locations.size : 0;
94 } 94 }
95 } 95 }
96 96
97 </script> 97 </script>
98 </head> 98 </head>
99 99
100 <body onload="onload()"> 100 <body onload="onload()">
101 <p> 101 <p>
102 Tests that Linkifier works correctly. 102 Tests that Linkifier works correctly.
103 <p> 103 <p>
104 104
105 </body> 105 </body>
106 </html> 106 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-enabled/sources/debugger/script-formatter-breakpoints-1.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698