| OLD | NEW |
| 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 src="../../../http/tests/inspector/live-edit-test.js"></script> | 7 <script src="../../../http/tests/inspector/live-edit-test.js"></script> |
| 8 <script src="resources/edit-me.js"></script> | 8 <script src="resources/edit-me.js"></script> |
| 9 <script> | 9 <script> |
| 10 function test() | 10 function test() |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 } | 272 } |
| 273 | 273 |
| 274 function replaceInSource(sourceFrame, string, replacement, callback) | 274 function replaceInSource(sourceFrame, string, replacement, callback) |
| 275 { | 275 { |
| 276 InspectorTest.addSniffer(WebInspector.DebuggerModel.prototype, "
_didEditScriptSource", callback); | 276 InspectorTest.addSniffer(WebInspector.DebuggerModel.prototype, "
_didEditScriptSource", callback); |
| 277 InspectorTest.replaceInSource(sourceFrame, string, replacement); | 277 InspectorTest.replaceInSource(sourceFrame, string, replacement); |
| 278 InspectorTest.commitSource(sourceFrame); | 278 InspectorTest.commitSource(sourceFrame); |
| 279 } | 279 } |
| 280 }, | 280 }, |
| 281 | 281 |
| 282 function testExcludingFolders(next) | |
| 283 { | |
| 284 function dumpWorkspaceUISourceCodes() | |
| 285 { | |
| 286 InspectorTest.addResult("Dumping uiSourceCodes origin URLs:"); | |
| 287 var uiSourceCodes = InspectorTest.testWorkspace.uiSourceCodes(); | |
| 288 for (var i = 0; i < uiSourceCodes.length; ++i) | |
| 289 InspectorTest.addResult(" - " + uiSourceCodes[i].originURL(
)); | |
| 290 } | |
| 291 | |
| 292 var fileSystemPath = "/var/www"; | |
| 293 var fileSystemProjectId = WebInspector.FileSystemWorkspaceBinding.pr
ojectId(fileSystemPath); | |
| 294 var files = {"/html/foo.js": "", "/.git/foogit.js": "", "/bar.js": "
", "/html2/foo.js": ""}; | |
| 295 | |
| 296 createObjects(); | |
| 297 | |
| 298 InspectorTest.addResult("Adding file system."); | |
| 299 manager.addMockFileSystem(fileSystemPath); | |
| 300 InspectorTest.addResult("Adding exclusion pattern and excluded folde
r."); | |
| 301 InspectorTest.testExcludedFolderManager.addExcludedFolder(fileSystem
Path, "/html/"); | |
| 302 manager.addFiles(fileSystemPath, files); | |
| 303 dumpWorkspaceUISourceCodes(); | |
| 304 InspectorTest.addResult("Excluding html2 folder:"); | |
| 305 InspectorTest.testWorkspace.uiSourceCodes()[0].project().excludeFold
er("/html2/"); | |
| 306 dumpWorkspaceUISourceCodes(); | |
| 307 InspectorTest.testExcludedFolderManager.removeExcludedFolder(fileSys
temPath, "/html/"); | |
| 308 next(); | |
| 309 }, | |
| 310 | |
| 311 function testRemoveProject(next) | 282 function testRemoveProject(next) |
| 312 { | 283 { |
| 313 function dumpWorkspaceUISourceCodes() | 284 function dumpWorkspaceUISourceCodes() |
| 314 { | 285 { |
| 315 InspectorTest.addResult("Dumping uiSourceCodes origin URLs:"); | 286 InspectorTest.addResult("Dumping uiSourceCodes origin URLs:"); |
| 316 var uiSourceCodes = InspectorTest.testWorkspace.uiSourceCodes(); | 287 var uiSourceCodes = InspectorTest.testWorkspace.uiSourceCodes(); |
| 317 for (var i = 0; i < uiSourceCodes.length; ++i) | 288 for (var i = 0; i < uiSourceCodes.length; ++i) |
| 318 InspectorTest.addResult(" - " + uiSourceCodes[i].originURL(
)); | 289 InspectorTest.addResult(" - " + uiSourceCodes[i].originURL(
)); |
| 319 } | 290 } |
| 320 | 291 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 } | 351 } |
| 381 }, | 352 }, |
| 382 ]); | 353 ]); |
| 383 }; | 354 }; |
| 384 </script> | 355 </script> |
| 385 </head> | 356 </head> |
| 386 <body onload="runTest()"> | 357 <body onload="runTest()"> |
| 387 <p>Tests file system project mappings.</p> | 358 <p>Tests file system project mappings.</p> |
| 388 </body> | 359 </body> |
| 389 </html> | 360 </html> |
| OLD | NEW |