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

Side by Side Diff: LayoutTests/http/tests/inspector/search/sources-search-scope-in-files.html

Issue 400673002: DevTools: Fix dirty files handling in search across all files. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <title>Test search in sources.</title> 3 <title>Test search in sources.</title>
4 <script src="../inspector-test.js"></script> 4 <script src="../inspector-test.js"></script>
5 <script src="../isolated-filesystem-test.js"></script> 5 <script src="../isolated-filesystem-test.js"></script>
6 <script src="../workspace-test.js"></script> 6 <script src="../workspace-test.js"></script>
7 <script src="../debugger-test.js"></script>
7 <script> 8 <script>
8 function test() 9 function test()
9 { 10 {
10 var fileSystemPath = "/var/www"; 11 var fileSystemPath = "/var/www";
11 var names = ["search.html", "search.js", "search.css"]; 12 var names = ["search.html", "search.js", "search.css"];
12 var files = {}; 13 var files = {};
13 for (var i = 0; i < names.length; ++i) { 14 for (var i = 0; i < names.length; ++i) {
14 var name = names[i]; 15 var name = names[i];
15 files["/" + name] = loadResource(name); 16 files["/" + name] = loadResource(name);
16 } 17 }
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 runSearchAndDumpResults(searchConfig, step2); 201 runSearchAndDumpResults(searchConfig, step2);
201 202
202 function step2() 203 function step2()
203 { 204 {
204 InspectorTest.addResult("Running a file query with non-existing project name now:"); 205 InspectorTest.addResult("Running a file query with non-existing project name now:");
205 query = "searchTest" + "Unique" + " file:zzz"; 206 query = "searchTest" + "Unique" + " file:zzz";
206 searchConfig = new WebInspector.SearchConfig(query, true, false) ; 207 searchConfig = new WebInspector.SearchConfig(query, true, false) ;
207 runSearchAndDumpResults(searchConfig, next); 208 runSearchAndDumpResults(searchConfig, next);
208 } 209 }
209 }, 210 },
211
212 function testDirtyFiles(next)
213 {
214 var uiSourceCode;
215 var uiSourceCodes = InspectorTest.testWorkspace.uiSourceCodes();
216 for (var i = 0; i < uiSourceCodes.length; ++i) {
217 if (uiSourceCodes[i].name() === "search.js") {
218 uiSourceCode = uiSourceCodes[i];
219 break;
220 }
221 }
222
223 uiSourceCode.setWorkingCopy("FOO " + "searchTest" + "UniqueString" + " BAR");
224 var query = "searchTest" + "UniqueString";
225 var searchConfig = new WebInspector.SearchConfig(query, true, false) ;
226 runSearchAndDumpResults(searchConfig, next);
227 }
210 ]); 228 ]);
211 } 229 }
212 230
213 </script> 231 </script>
214 </head> 232 </head>
215 <body onload="runTest()"> 233 <body onload="runTest()">
216 <iframe src="resources/search.html"> 234 <iframe src="resources/search.html">
217 <p>Tests that ScriptSearchScope performs search across all sources correctly.</p > 235 <p>Tests that ScriptSearchScope performs search across all sources correctly.</p >
218 See <a href="https://bugs.webkit.org/show_bug.cgi?id=41350">bug 41350</a>. 236 See <a href="https://bugs.webkit.org/show_bug.cgi?id=41350">bug 41350</a>.
219 </body> 237 </body>
220 </html> 238 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698