OLD | NEW |
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 Loading... |
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> |
OLD | NEW |