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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/search/sources-search-scope-many-projects.html

Issue 2533073003: [DevTools] Remove workspace-test.js part1. (Closed)
Patch Set: Created 4 years 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
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>
7 <script src="../debugger-test.js"></script> 6 <script src="../debugger-test.js"></script>
8 <script src="./search-test.js"></script> 7 <script src="./search-test.js"></script>
9 <script> 8 <script>
10 function test() 9 function test()
11 { 10 {
11 function fileSystemUISourceCodes()
12 {
13 var uiSourceCodes = [];
14 var fileSystemProjects = Workspace.workspace.projectsForType(Workspace.p rojectTypes.FileSystem);
15 for (var project of fileSystemProjects)
16 uiSourceCodes = uiSourceCodes.concat(project.uiSourceCodes());
17 return uiSourceCodes;
18 }
19
12 var scope = new Sources.SourcesSearchScope(); 20 var scope = new Sources.SourcesSearchScope();
13 var fs = new InspectorTest.TestFileSystem("file:///var/www"); 21 var fs = new InspectorTest.TestFileSystem("file:///var/www");
14 var names = ["search.html", "search.js", "search.css"]; 22 var names = ["search.html", "search.js", "search.css"];
15 var resources = {}; 23 var resources = {};
16 var jsFileSystemUISourceCode; 24 var jsFileSystemUISourceCode;
17 var jsNetworkUISourceCode; 25 var jsNetworkUISourceCode;
18 26
19 var promises = []; 27 var promises = [];
20 for (var name of names) 28 for (var name of names)
21 promises.push(loadResource(name)); 29 promises.push(loadResource(name));
(...skipping 12 matching lines...) Expand all
34 { 42 {
35 for (var resourceName in resources) 43 for (var resourceName in resources)
36 fs.root.addFile(resourceName, resources[resourceName]); 44 fs.root.addFile(resourceName, resources[resourceName]);
37 fs.reportCreated(fileSystemCreated); 45 fs.reportCreated(fileSystemCreated);
38 } 46 }
39 47
40 function fileSystemCreated() 48 function fileSystemCreated()
41 { 49 {
42 UI.viewManager.showView("sources.search"); 50 UI.viewManager.showView("sources.search");
43 51
44 var uiSourceCodes = InspectorTest.fileSystemUISourceCodes(); 52 var uiSourceCodes = fileSystemUISourceCodes();
45 for (var i = 0; i < uiSourceCodes.length; ++i) { 53 for (var i = 0; i < uiSourceCodes.length; ++i) {
46 if (uiSourceCodes[i].name() === "search.js") { 54 if (uiSourceCodes[i].name() === "search.js") {
47 jsFileSystemUISourceCode = uiSourceCodes[i]; 55 jsFileSystemUISourceCode = uiSourceCodes[i];
48 break; 56 break;
49 } 57 }
50 } 58 }
51 59
52 addNetworkUISourceCode("http://localhost/search.html", resources["search .html"]); 60 addNetworkUISourceCode("http://localhost/search.html", resources["search .html"]);
53 jsNetworkUISourceCode = addNetworkUISourceCode("http://localhost/search. js", resources["search.js"]); 61 jsNetworkUISourceCode = addNetworkUISourceCode("http://localhost/search. js", resources["search.js"]);
54 InspectorTest.runTestSuite(testSuite); 62 InspectorTest.runTestSuite(testSuite);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 111 }
104 ]; 112 ];
105 } 113 }
106 114
107 </script> 115 </script>
108 </head> 116 </head>
109 <body onload="runTest()"> 117 <body onload="runTest()">
110 <p>Tests that ScriptSearchScope sorts network and dirty results correctly.</p> 118 <p>Tests that ScriptSearchScope sorts network and dirty results correctly.</p>
111 </body> 119 </body>
112 </html> 120 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698