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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/workspace-mapping.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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 <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/workspace-test.js"></script> 4 <script src="../http/tests/inspector/workspace-test.js"></script>
5 <script> 5 <script>
6 function test() 6 function test()
7 { 7 {
8 var projects = {}; 8 var projects = {};
9 var workspace = new WebInspector.Workspace(); 9 var workspace = new Workspace.Workspace();
10 10
11 function createUISourceCode(projectId, relativePath) 11 function createUISourceCode(projectId, relativePath)
12 { 12 {
13 var project = projects[projectId]; 13 var project = projects[projectId];
14 if (!projects[projectId]) { 14 if (!projects[projectId]) {
15 var projectType = projectId.startsWith("file") ? WebInspector.projec tTypes.FileSystem : WebInspector.projectTypes.Network; 15 var projectType = projectId.startsWith("file") ? Workspace.projectTy pes.FileSystem : Workspace.projectTypes.Network;
16 project = new WebInspector.ProjectStore(workspace, projectId, projec tType, ""); 16 project = new Workspace.ProjectStore(workspace, projectId, projectTy pe, "");
17 workspace.addProject(project); 17 workspace.addProject(project);
18 projects[projectId] = project; 18 projects[projectId] = project;
19 } 19 }
20 var uiSourceCode = project.createUISourceCode(projectId +"/" + relativeP ath, WebInspector.resourceTypes.Script); 20 var uiSourceCode = project.createUISourceCode(projectId +"/" + relativeP ath, Common.resourceTypes.Script);
21 project.addUISourceCode(uiSourceCode); 21 project.addUISourceCode(uiSourceCode);
22 } 22 }
23 23
24 function dumpUISourceCodeForURL(url) 24 function dumpUISourceCodeForURL(url)
25 { 25 {
26 var uiSourceCode = workspace.uiSourceCodeForURL(url); 26 var uiSourceCode = workspace.uiSourceCodeForURL(url);
27 InspectorTest.addResult("uiSourceCode for url " + url + ": " + (uiSource Code ? "EXISTS" : "null")); 27 InspectorTest.addResult("uiSourceCode for url " + url + ": " + (uiSource Code ? "EXISTS" : "null"));
28 } 28 }
29 29
30 createUISourceCode("file:///var/www", "localhost/index.html"); 30 createUISourceCode("file:///var/www", "localhost/index.html");
(...skipping 11 matching lines...) Expand all
42 dumpUISourceCodeForURL("file:///var/www/localhost/index2.html"); 42 dumpUISourceCodeForURL("file:///var/www/localhost/index2.html");
43 43
44 InspectorTest.completeTest(); 44 InspectorTest.completeTest();
45 } 45 }
46 </script> 46 </script>
47 </head> 47 </head>
48 <body onload="runTest()"> 48 <body onload="runTest()">
49 <p>Tests workspace mappings</p> 49 <p>Tests workspace mappings</p>
50 </body> 50 </body>
51 </html> 51 </html>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/version-controller.html ('k') | third_party/WebKit/Source/devtools/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698