| 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 src="../../../http/tests/inspector/search/search-test.js"></script> | 5 <script src="../../../http/tests/inspector/search/search-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 function nonFormattedFunction() { var i = 2 + 2; var a = 4; return a + i; } | 8 function nonFormattedFunction() { var i = 2 + 2; var a = 4; return a + i; } |
| 9 | 9 |
| 10 var test = function() | 10 var test = function() |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 { | 29 { |
| 30 scriptSource = frame._uiSourceCode; | 30 scriptSource = frame._uiSourceCode; |
| 31 scriptSource.searchInContent("magic-string", true, false, dump1); | 31 scriptSource.searchInContent("magic-string", true, false, dump1); |
| 32 } | 32 } |
| 33 | 33 |
| 34 function dump1(matches) | 34 function dump1(matches) |
| 35 { | 35 { |
| 36 InspectorTest.addResult("Pre-format search results:"); | 36 InspectorTest.addResult("Pre-format search results:"); |
| 37 InspectorTest.dumpSearchMatches(matches); | 37 InspectorTest.dumpSearchMatches(matches); |
| 38 shouldRequestContent = true; | 38 shouldRequestContent = true; |
| 39 InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorAction.protot
ype, "_updateButton", uiSourceCodeScriptFormatted); | 39 InspectorTest.addSniffer(Sources.ScriptFormatterEditorAction.prototype,
"_updateButton", uiSourceCodeScriptFormatted); |
| 40 scriptFormatter._toggleFormatScriptSource(); | 40 scriptFormatter._toggleFormatScriptSource(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 function uiSourceCodeScriptFormatted() | 43 function uiSourceCodeScriptFormatted() |
| 44 { | 44 { |
| 45 scriptSource.searchInContent("magic-string", true, false, dump2); | 45 scriptSource.searchInContent("magic-string", true, false, dump2); |
| 46 } | 46 } |
| 47 | 47 |
| 48 function dump2(matches) | 48 function dump2(matches) |
| 49 { | 49 { |
| 50 InspectorTest.addResult("Post-format search results:"); | 50 InspectorTest.addResult("Post-format search results:"); |
| 51 InspectorTest.dumpSearchMatches(matches); | 51 InspectorTest.dumpSearchMatches(matches); |
| 52 InspectorTest.completeTest(); | 52 InspectorTest.completeTest(); |
| 53 } | 53 } |
| 54 } | 54 } |
| 55 | 55 |
| 56 </script> | 56 </script> |
| 57 | 57 |
| 58 </head> | 58 </head> |
| 59 | 59 |
| 60 <body onload="runTest()"> | 60 <body onload="runTest()"> |
| 61 <p>Tests that search across files works with formatted scripts. | 61 <p>Tests that search across files works with formatted scripts. |
| 62 </p> | 62 </p> |
| 63 | 63 |
| 64 </body> | 64 </body> |
| 65 </html> | 65 </html> |
| OLD | NEW |