| 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> | 4 <script> |
| 5 function test() | 5 function test() |
| 6 { | 6 { |
| 7 InspectorTest.runTestSuite([ | 7 InspectorTest.runTestSuite([ |
| 8 function testFileSystemClashDirectOrder(next) | 8 function testFileSystemClashDirectOrder(next) |
| 9 { | 9 { |
| 10 var fileSystemMapping = new WebInspector.FileSystemMapping(); | 10 var fileSystemMapping = new WebInspector.FileSystemMapping(); |
| 11 fileSystemMapping.addFileSystem("file:///Source/devtools"); | 11 fileSystemMapping.addFileSystem("file:///Source/devtools"); |
| 12 | 12 |
| 13 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt
ools", "chrome-devtools://devtools/bundled/wrong_url", "/"); | 13 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt
ools", "chrome-devtools://devtools/bundled/wrong_url", "/"); |
| 14 fileSystemMapping.addFileMapping("file:///Source/devtools", "http://
localhost:1234/right_url", "/"); | 14 fileSystemMapping.addFileMapping("file:///Source/devtools", "http://
localhost:1234/right_url", "/"); |
| 15 | 15 |
| 16 InspectorTest.addResult(fileSystemMapping.urlForPath("file:///Source
/devtools", "file:///Source/devtools/file.txt")); | 16 InspectorTest.addResult(fileSystemMapping.networkURLForFileSystemURL
("file:///Source/devtools", "file:///Source/devtools/file.txt")); |
| 17 next(); | 17 next(); |
| 18 }, | 18 }, |
| 19 | 19 |
| 20 function testFileSystemClashReversedOrder(next) | 20 function testFileSystemClashReversedOrder(next) |
| 21 { | 21 { |
| 22 var fileSystemMapping = new WebInspector.FileSystemMapping(); | 22 var fileSystemMapping = new WebInspector.FileSystemMapping(); |
| 23 fileSystemMapping.addFileSystem("file:///Source/devtools"); | 23 fileSystemMapping.addFileSystem("file:///Source/devtools"); |
| 24 | 24 |
| 25 fileSystemMapping.addFileMapping("file:///Source/devtools", "http://
localhost:1234/right_url", "/"); | 25 fileSystemMapping.addFileMapping("file:///Source/devtools", "http://
localhost:1234/right_url", "/"); |
| 26 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt
ools", "chrome-devtools://devtools/wrong_url", "/"); | 26 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt
ools", "chrome-devtools://devtools/wrong_url", "/"); |
| 27 | 27 |
| 28 InspectorTest.addResult(fileSystemMapping.urlForPath("file:///Source
/devtools", "file:///Source/devtools/file.txt")); | 28 InspectorTest.addResult(fileSystemMapping.networkURLForFileSystemURL
("file:///Source/devtools", "file:///Source/devtools/file.txt")); |
| 29 next(); | 29 next(); |
| 30 }, | 30 }, |
| 31 | 31 |
| 32 function testNetworkClashDirectOrder(next) | 32 function testNetworkClashDirectOrder(next) |
| 33 { | 33 { |
| 34 var fileSystemMapping = new WebInspector.FileSystemMapping(); | 34 var fileSystemMapping = new WebInspector.FileSystemMapping(); |
| 35 fileSystemMapping.addFileSystem("file:///Source/devtools"); | 35 fileSystemMapping.addFileSystem("file:///Source/devtools"); |
| 36 | 36 |
| 37 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt
ools", "http://localhost:1234/front_end", "/wrong"); | 37 fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devt
ools", "http://localhost:1234/front_end", "/wrong"); |
| 38 fileSystemMapping.addFileMapping("file:///Source/devtools", "http://
localhost:1234/front_end", "/right"); | 38 fileSystemMapping.addFileMapping("file:///Source/devtools", "http://
localhost:1234/front_end", "/right"); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 53 next(); | 53 next(); |
| 54 }, | 54 }, |
| 55 ]); | 55 ]); |
| 56 } | 56 } |
| 57 </script> | 57 </script> |
| 58 </head> | 58 </head> |
| 59 <body onload="runTest()"> | 59 <body onload="runTest()"> |
| 60 <p>Tests FileSystemMapping overrides</p> | 60 <p>Tests FileSystemMapping overrides</p> |
| 61 </body> | 61 </body> |
| 62 </html> | 62 </html> |
| OLD | NEW |