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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/file-system-project.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/debugger-test.js"></script> 4 <script src="../http/tests/inspector/debugger-test.js"></script>
5 <script src="../http/tests/inspector/workspace-test.js"></script> 5 <script src="../http/tests/inspector/workspace-test.js"></script>
6 <script src="../http/tests/inspector/isolated-filesystem-test.js"></script> 6 <script src="../http/tests/inspector/isolated-filesystem-test.js"></script>
7 <script> 7 <script>
8 function test() 8 function test()
9 { 9 {
10 function dumpUISourceCodes(uiSourceCodes, next) 10 function dumpUISourceCodes(uiSourceCodes, next)
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 InspectorTest.addResult("Adding files to file systems."); 64 InspectorTest.addResult("Adding files to file systems.");
65 65
66 var localhostDir = fs1.root.mkdir("localhost"); 66 var localhostDir = fs1.root.mkdir("localhost");
67 localhostDir.addFile("foo.js", "<foo content>"); 67 localhostDir.addFile("foo.js", "<foo content>");
68 fs1.root.addFile("bar.js", "<bark content>"); 68 fs1.root.addFile("bar.js", "<bark content>");
69 69
70 fs2.root.addFile("baz.js", "<bazzz content>"); 70 fs2.root.addFile("baz.js", "<bazzz content>");
71 fs1.reportCreated(function() {}); 71 fs1.reportCreated(function() {});
72 fs2.reportCreated(function() {}); 72 fs2.reportCreated(function() {});
73 73
74 WebInspector.workspace.addEventListener(WebInspector.Workspace.Event s.UISourceCodeAdded, onUISourceCode); 74 Workspace.workspace.addEventListener(Workspace.Workspace.Events.UISo urceCodeAdded, onUISourceCode);
75 75
76 var count = 3; 76 var count = 3;
77 function onUISourceCode() 77 function onUISourceCode()
78 { 78 {
79 if (--count) 79 if (--count)
80 return; 80 return;
81 WebInspector.workspace.removeEventListener(WebInspector.Workspac e.Events.UISourceCodeAdded, onUISourceCode); 81 Workspace.workspace.removeEventListener(Workspace.Workspace.Even ts.UISourceCodeAdded, onUISourceCode);
82 onUISourceCodesLoaded(); 82 onUISourceCodesLoaded();
83 } 83 }
84 84
85 var uiSourceCodes; 85 var uiSourceCodes;
86 86
87 function onUISourceCodesLoaded() 87 function onUISourceCodesLoaded()
88 { 88 {
89 uiSourceCodes = InspectorTest.fileSystemUISourceCodes(); 89 uiSourceCodes = InspectorTest.fileSystemUISourceCodes();
90 dumpUISourceCodes(uiSourceCodes, uiSourceCodesDumped); 90 dumpUISourceCodes(uiSourceCodes, uiSourceCodesDumped);
91 } 91 }
92 92
93 function uiSourceCodesDumped() 93 function uiSourceCodesDumped()
94 { 94 {
95 dumpUISourceCodeLocations(uiSourceCodes, 5); 95 dumpUISourceCodeLocations(uiSourceCodes, 5);
96 WebInspector.workspace.addEventListener(WebInspector.Workspace.E vents.WorkingCopyCommitted, contentCommitted, this); 96 Workspace.workspace.addEventListener(Workspace.Workspace.Events. WorkingCopyCommitted, contentCommitted, this);
97 uiSourceCodes[0].addRevision("<Modified UISourceCode content>"); 97 uiSourceCodes[0].addRevision("<Modified UISourceCode content>");
98 } 98 }
99 99
100 function contentCommitted() 100 function contentCommitted()
101 { 101 {
102 InspectorTest.addResult("After revision added:"); 102 InspectorTest.addResult("After revision added:");
103 InspectorTest.dumpUISourceCode(uiSourceCodes[0], finalize); 103 InspectorTest.dumpUISourceCode(uiSourceCodes[0], finalize);
104 } 104 }
105 105
106 function finalize() 106 function finalize()
(...skipping 13 matching lines...) Expand all
120 InspectorTest.addResult(""); 120 InspectorTest.addResult("");
121 InspectorTest.addResult("-- Default excludes --"); 121 InspectorTest.addResult("-- Default excludes --");
122 dumpWorkspaceUISourceCodes(); 122 dumpWorkspaceUISourceCodes();
123 fs.reportRemoved(); 123 fs.reportRemoved();
124 next(); 124 next();
125 } 125 }
126 }, 126 },
127 127
128 function testExcludesSettings(next) 128 function testExcludesSettings(next)
129 { 129 {
130 WebInspector.settings.createLocalSetting("workspaceExcludedFolders", {}).set({"file:///var/www2":["/html/"]}); 130 Common.settings.createLocalSetting("workspaceExcludedFolders", {}).s et({"file:///var/www2":["/html/"]});
131 createFileSystem("file:///var/www2", dumpExcludes); 131 createFileSystem("file:///var/www2", dumpExcludes);
132 132
133 function dumpExcludes(fs) 133 function dumpExcludes(fs)
134 { 134 {
135 InspectorTest.addResult(""); 135 InspectorTest.addResult("");
136 InspectorTest.addResult("-- Excluded /html/ --"); 136 InspectorTest.addResult("-- Excluded /html/ --");
137 dumpWorkspaceUISourceCodes(); 137 dumpWorkspaceUISourceCodes();
138 fs.reportRemoved(); 138 fs.reportRemoved();
139 next(); 139 next();
140 } 140 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 var project2 = fs.root.mkdir("project_2"); 205 var project2 = fs.root.mkdir("project_2");
206 project2.mkdir(".git").addFile("bar.git"); 206 project2.mkdir(".git").addFile("bar.git");
207 var project3 = fs.root.mkdir("project_3"); 207 var project3 = fs.root.mkdir("project_3");
208 project3.mkdir(".svn").addFile("baz.svn"); 208 project3.mkdir(".svn").addFile("baz.svn");
209 var project4 = fs.root.mkdir("project_4"); 209 var project4 = fs.root.mkdir("project_4");
210 project4.addFile("index.html"); 210 project4.addFile("index.html");
211 fs.reportCreated(dumpGitFolders); 211 fs.reportCreated(dumpGitFolders);
212 212
213 function dumpGitFolders() 213 function dumpGitFolders()
214 { 214 {
215 var isolatedFileSystem = WebInspector.isolatedFileSystemManager. fileSystem("file:///var/www3"); 215 var isolatedFileSystem = Workspace.isolatedFileSystemManager.fil eSystem("file:///var/www3");
216 var folders = isolatedFileSystem.gitFolders(); 216 var folders = isolatedFileSystem.gitFolders();
217 folders.sort(); 217 folders.sort();
218 for (var gitFolder of folders) 218 for (var gitFolder of folders)
219 InspectorTest.addResult(gitFolder); 219 InspectorTest.addResult(gitFolder);
220 fs.reportRemoved(); 220 fs.reportRemoved();
221 next(); 221 next();
222 } 222 }
223 }, 223 },
224 224
225 function testUISourceCodeMetadata(next) 225 function testUISourceCodeMetadata(next)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 } 258 }
259 }, 259 },
260 ]); 260 ]);
261 }; 261 };
262 </script> 262 </script>
263 </head> 263 </head>
264 <body onload="runTest()"> 264 <body onload="runTest()">
265 <p>Tests file system project.</p> 265 <p>Tests file system project.</p>
266 </body> 266 </body>
267 </html> 267 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698