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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/file-system-project.html

Issue 1369063002: DevTools: merge excluded folder manager into isolated file system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 InspectorTest.refreshFileSystemProjects(onProjectsRefreshed); 68 InspectorTest.refreshFileSystemProjects(onProjectsRefreshed);
69 69
70 var uiSourceCodes; 70 var uiSourceCodes;
71 71
72 function onProjectsRefreshed() 72 function onProjectsRefreshed()
73 { 73 {
74 uiSourceCodes = InspectorTest.fileSystemUISourceCodes(); 74 uiSourceCodes = InspectorTest.fileSystemUISourceCodes();
75 dumpUISourceCodes(uiSourceCodes, uiSourceCodesDumped); 75 dumpUISourceCodes(uiSourceCodes, uiSourceCodesDumped);
76 } 76 }
77 77
78 function uiSourceCodeAdded(uiSourceCode)
79 {
80 uiSourceCodes.push(uiSourceCode)
81 }
82
83 function uiSourceCodesDumped() 78 function uiSourceCodesDumped()
84 { 79 {
85 dumpUISourceCodeLocations(uiSourceCodes, 5); 80 dumpUISourceCodeLocations(uiSourceCodes, 5);
86 InspectorTest.addResult("UISourceCode uri to url mappings:"); 81 InspectorTest.addResult("UISourceCode uri to url mappings:");
87 for (var i = 0; i < uiSourceCodes.length; ++i) { 82 for (var i = 0; i < uiSourceCodes.length; ++i) {
88 var url = WebInspector.networkMapping.networkURL(uiSourceCod es[i]); 83 var url = WebInspector.networkMapping.networkURL(uiSourceCod es[i]);
89 if (!url) 84 if (!url)
90 continue; 85 continue;
91 InspectorTest.addResult(" " + uiSourceCodes[i].uri() + " -> " + url); 86 InspectorTest.addResult(" " + uiSourceCodes[i].uri() + " -> " + url);
92 } 87 }
(...skipping 26 matching lines...) Expand all
119 InspectorTest.addResult("Removing second file system."); 114 InspectorTest.addResult("Removing second file system.");
120 fs1.removeFileSystem(); 115 fs1.removeFileSystem();
121 InspectorTest.addResult(" number of uiSourceCodes in work space after removing second file system: " + InspectorTest.fileSystemUISourceCod es().length); 116 InspectorTest.addResult(" number of uiSourceCodes in work space after removing second file system: " + InspectorTest.fileSystemUISourceCod es().length);
122 InspectorTest.addResult("Removing first file system."); 117 InspectorTest.addResult("Removing first file system.");
123 fs2.removeFileSystem(); 118 fs2.removeFileSystem();
124 InspectorTest.addResult(" number of uiSourceCodes in work space after removing first file system: " + InspectorTest.fileSystemUISourceCode s().length); 119 InspectorTest.addResult(" number of uiSourceCodes in work space after removing first file system: " + InspectorTest.fileSystemUISourceCode s().length);
125 next(); 120 next();
126 } 121 }
127 } 122 }
128 }, 123 },
124
125 function testFileSystems(next)
126 {
127 function dumpWorkspaceUISourceCodes()
128 {
129 InspectorTest.addResult("Dumping uiSourceCodes origin URLs:");
130 var uiSourceCodes = InspectorTest.fileSystemUISourceCodes();
131 for (var i = 0; i < uiSourceCodes.length; ++i)
132 InspectorTest.addResult(" - " + uiSourceCodes[i].originURL( ));
133 }
134
135 var fs;
136 function createFileSystem(name)
137 {
138 fs = new InspectorTest.TestFileSystem(name);
139 fs.root.mkdir("html").addFile("foo.js", "");
140 fs.root.mkdir(".git").addFile("foogit.js", "");
141 fs.root.addFile("bar.js", "");
142 fs.root.mkdir("html2").addFile("foo.js", "");
143 fs.reportCreated();
144 }
145
146 createFileSystem("/var/www");
147 InspectorTest.addResult("");
148 InspectorTest.addResult("-- Default excludes --");
149 dumpWorkspaceUISourceCodes();
150 fs.removeFileSystem();
151
152 WebInspector.settings.createLocalSetting("workspaceExcludedFolders", {}).set({"/var/www2":["/html/"]});
153 createFileSystem("/var/www2");
154 var isolatedFileSystem = WebInspector.isolatedFileSystemManager.file System("/var/www2");
dgozman 2015/09/26 01:46:41 not used
155 InspectorTest.addResult("");
156 InspectorTest.addResult("-- Excluded /html/ --");
157 dumpWorkspaceUISourceCodes();
158 fs.removeFileSystem();
159
160 createFileSystem("/var/www3");
161 var isolatedFileSystem = WebInspector.isolatedFileSystemManager.file System("/var/www3");
dgozman 2015/09/26 01:46:41 ditto
162 InspectorTest.fileSystemUISourceCodes()[0].project().excludeFolder(" /html2/");
163 InspectorTest.addResult("");
164 InspectorTest.addResult("-- Excluded /html2/ --");
165 dumpWorkspaceUISourceCodes();
166 fs.removeFileSystem();
167 next();
168 }
129 ]); 169 ]);
130 }; 170 };
131 </script> 171 </script>
132 </head> 172 </head>
133 <body onload="runTest()"> 173 <body onload="runTest()">
134 <p>Tests file system project.</p> 174 <p>Tests file system project.</p>
135 </body> 175 </body>
136 </html> 176 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698