| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../http/tests/inspector/inspector-test.js"></script> | |
| 4 <script> | |
| 5 function test() | |
| 6 { | |
| 7 InspectorTest.runTestSuite([ | |
| 8 function testFileSystemClashDirectOrder(next) | |
| 9 { | |
| 10 var fileSystemMapping = new Workspace.FileSystemMapping(Workspace.is
olatedFileSystemManager); | |
| 11 fileSystemMapping.addFileSystem("file:///Source/devtools"); | |
| 12 | |
| 13 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt
ools", "chrome-devtools://devtools/bundled/wrong_url", "/"); | |
| 14 fileSystemMapping.addFileMapping("file:///Source/devtools", "http://
localhost:1234/right_url", "/"); | |
| 15 | |
| 16 InspectorTest.addResult(fileSystemMapping.networkURLForFileSystemURL
("file:///Source/devtools", "file:///Source/devtools/file.txt")); | |
| 17 fileSystemMapping.dispose(); | |
| 18 next(); | |
| 19 }, | |
| 20 | |
| 21 function testFileSystemClashReversedOrder(next) | |
| 22 { | |
| 23 var fileSystemMapping = new Workspace.FileSystemMapping(Workspace.is
olatedFileSystemManager); | |
| 24 fileSystemMapping.addFileSystem("file:///Source/devtools"); | |
| 25 | |
| 26 fileSystemMapping.addFileMapping("file:///Source/devtools", "http://
localhost:1234/right_url", "/"); | |
| 27 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt
ools", "chrome-devtools://devtools/wrong_url", "/"); | |
| 28 | |
| 29 InspectorTest.addResult(fileSystemMapping.networkURLForFileSystemURL
("file:///Source/devtools", "file:///Source/devtools/file.txt")); | |
| 30 fileSystemMapping.dispose(); | |
| 31 next(); | |
| 32 }, | |
| 33 | |
| 34 function testNetworkClashDirectOrder(next) | |
| 35 { | |
| 36 var fileSystemMapping = new Workspace.FileSystemMapping(Workspace.is
olatedFileSystemManager); | |
| 37 fileSystemMapping.addFileSystem("file:///Source/devtools"); | |
| 38 | |
| 39 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt
ools", "http://localhost:1234/front_end", "/wrong"); | |
| 40 fileSystemMapping.addFileMapping("file:///Source/devtools", "http://
localhost:1234/front_end", "/right"); | |
| 41 | |
| 42 InspectorTest.addResult(fileSystemMapping.fileForURL("http://localho
st:1234/front_end/file.txt").fileURL); | |
| 43 fileSystemMapping.dispose(); | |
| 44 next(); | |
| 45 }, | |
| 46 | |
| 47 function testNetworkClashReversedOrder(next) | |
| 48 { | |
| 49 var fileSystemMapping = new Workspace.FileSystemMapping(Workspace.is
olatedFileSystemManager); | |
| 50 fileSystemMapping.addFileSystem("file:///Source/devtools"); | |
| 51 | |
| 52 fileSystemMapping.addFileMapping("file:///Source/devtools", "http://
localhost:1234/front_end", "/right"); | |
| 53 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt
ools", "http://localhost:1234/front_end", "/wrong"); | |
| 54 | |
| 55 InspectorTest.addResult(fileSystemMapping.fileForURL("http://localho
st:1234/front_end/file.txt").fileURL); | |
| 56 fileSystemMapping.dispose(); | |
| 57 next(); | |
| 58 }, | |
| 59 ]); | |
| 60 } | |
| 61 </script> | |
| 62 </head> | |
| 63 <body onload="runTest()"> | |
| 64 <p>Tests FileSystemMapping overrides</p> | |
| 65 </body> | |
| 66 </html> | |
| OLD | NEW |