| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../inspector-test.js"></script> | 3 <script src="../inspector-test.js"></script> |
| 4 <script src="../debugger-test.js"></script> | 4 <script src="../debugger-test.js"></script> |
| 5 <script src="../isolated-filesystem-test.js"></script> | 5 <script src="../isolated-filesystem-test.js"></script> |
| 6 <script src="./persistence-test.js"></script> | 6 <script src="./persistence-test.js"></script> |
| 7 <script src="./resources/foo.js"></script> | 7 <script src="./resources/foo.js"></script> |
| 8 <script> | 8 <script> |
| 9 | 9 |
| 10 function test() | 10 function test() |
| 11 { | 11 { |
| 12 var testMapping = InspectorTest.initializeTestMapping(); |
| 12 var fs = new InspectorTest.TestFileSystem("file:///var/www"); | 13 var fs = new InspectorTest.TestFileSystem("file:///var/www"); |
| 13 var fsEntry = InspectorTest.addFooJSFile(fs); | 14 var fsEntry = InspectorTest.addFooJSFile(fs); |
| 14 | 15 |
| 15 var networkCode, fileSystemCode; | 16 var networkCode, fileSystemCode; |
| 16 | 17 |
| 17 InspectorTest.runTestSuite([ | 18 InspectorTest.runTestSuite([ |
| 18 function addFileSystem(next) | 19 function addFileSystem(next) |
| 19 { | 20 { |
| 20 fs.reportCreated(next); | 21 fs.reportCreated(next); |
| 21 }, | 22 }, |
| 22 | 23 |
| 23 function addFileMapping(next) | 24 function addFileMapping(next) |
| 24 { | 25 { |
| 26 testMapping.addBinding("foo.js"); |
| 25 InspectorTest.waitForBinding("foo.js").then(onBindingCreated); | 27 InspectorTest.waitForBinding("foo.js").then(onBindingCreated); |
| 26 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http:
//127.0.0.1:8000", "/"); | |
| 27 | 28 |
| 28 function onBindingCreated(binding) | 29 function onBindingCreated(binding) |
| 29 { | 30 { |
| 30 InspectorTest.addResult("Binding created: " + binding); | 31 InspectorTest.addResult("Binding created: " + binding); |
| 31 networkCode = binding.network; | 32 networkCode = binding.network; |
| 32 fileSystemCode = binding.fileSystem; | 33 fileSystemCode = binding.fileSystem; |
| 33 next(); | 34 next(); |
| 34 } | 35 } |
| 35 }, | 36 }, |
| 36 | 37 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 InspectorTest.addResult(`fileSystem code: '${fileSystemCode.workingCopy(
)}'`); | 71 InspectorTest.addResult(`fileSystem code: '${fileSystemCode.workingCopy(
)}'`); |
| 71 next(); | 72 next(); |
| 72 } | 73 } |
| 73 }; | 74 }; |
| 74 </script> | 75 </script> |
| 75 </head> | 76 </head> |
| 76 <body onload="runTest()"> | 77 <body onload="runTest()"> |
| 77 <p>Tests that persistence syncs network and filesystem UISourceCodes.</p> | 78 <p>Tests that persistence syncs network and filesystem UISourceCodes.</p> |
| 78 </body> | 79 </body> |
| 79 </html> | 80 </html> |
| OLD | NEW |