| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../inspector-test.js"></script> | 3 <script src="../inspector-test.js"></script> |
| 4 <script src="../debugger-test.js"></script> | 4 <script src="../debugger-test.js"></script> |
| 5 <script src="../sources-test.js"></script> | 5 <script src="../sources-test.js"></script> |
| 6 <script src="resources/search.js"></script> | 6 <script src="resources/search.js"></script> |
| 7 <script> | 7 <script> |
| 8 function test() | 8 function test() |
| 9 { | 9 { |
| 10 function dumpSearchResultsForConfig(sourceFrame, searchConfig) | 10 function dumpSearchResultsForConfig(sourceFrame, searchConfig) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 var range = searchResults[i]; | 24 var range = searchResults[i]; |
| 25 var prefixRange = new WebInspector.TextRange(range.startLine, 0, ran
ge.startLine, range.startColumn); | 25 var prefixRange = new WebInspector.TextRange(range.startLine, 0, ran
ge.startLine, range.startColumn); |
| 26 var postfixRange = new WebInspector.TextRange(range.endLine, range.e
ndColumn, range.endLine, sourceFrame._textEditor.line(range.endLine).length); | 26 var postfixRange = new WebInspector.TextRange(range.endLine, range.e
ndColumn, range.endLine, sourceFrame._textEditor.line(range.endLine).length); |
| 27 var prefix = sourceFrame._textEditor.text(prefixRange); | 27 var prefix = sourceFrame._textEditor.text(prefixRange); |
| 28 var result = sourceFrame._textEditor.text(range); | 28 var result = sourceFrame._textEditor.text(range); |
| 29 var postfix = sourceFrame._textEditor.text(postfixRange); | 29 var postfix = sourceFrame._textEditor.text(postfixRange); |
| 30 InspectorTest.addResult(" - " + prefix + "<" + result + ">" + postf
ix); | 30 InspectorTest.addResult(" - " + prefix + "<" + result + ">" + postf
ix); |
| 31 } | 31 } |
| 32 } | 32 } |
| 33 | 33 |
| 34 WebInspector.SourcesPanel.show(); | 34 WebInspector.viewManager.showView("sources"); |
| 35 InspectorTest.showScriptSource("search.js", didShowScriptSource); | 35 InspectorTest.showScriptSource("search.js", didShowScriptSource); |
| 36 | 36 |
| 37 function didShowScriptSource(sourceFrame) | 37 function didShowScriptSource(sourceFrame) |
| 38 { | 38 { |
| 39 InspectorTest.runTestSuite([ | 39 InspectorTest.runTestSuite([ |
| 40 function testSearch(next) | 40 function testSearch(next) |
| 41 { | 41 { |
| 42 var query = "searchTestUniqueString"; | 42 var query = "searchTestUniqueString"; |
| 43 var searchConfig = new WebInspector.SearchableView.SearchConfig(
query, false, false); | 43 var searchConfig = new WebInspector.SearchableView.SearchConfig(
query, false, false); |
| 44 dumpSearchResultsForConfig(sourceFrame, searchConfig); | 44 dumpSearchResultsForConfig(sourceFrame, searchConfig); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 } | 78 } |
| 79 ]); | 79 ]); |
| 80 } | 80 } |
| 81 }; | 81 }; |
| 82 </script> | 82 </script> |
| 83 </head> | 83 </head> |
| 84 <body onload="runTest()"> | 84 <body onload="runTest()"> |
| 85 <p>Tests different types of search in SourceFrame</p> | 85 <p>Tests different types of search in SourceFrame</p> |
| 86 </body> | 86 </body> |
| 87 </html> | 87 </html> |
| OLD | NEW |