| 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() |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 function waitForUISourceCodes(next) | 24 function waitForUISourceCodes(next) |
| 25 { | 25 { |
| 26 var promises = [ | 26 var promises = [ |
| 27 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp
es.Network), | 27 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp
es.Network), |
| 28 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp
es.FileSystem) | 28 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTyp
es.FileSystem) |
| 29 ]; | 29 ]; |
| 30 Promise.all(promises).then(onUISourceCodesAdded); | 30 Promise.all(promises).then(onUISourceCodesAdded); |
| 31 | 31 |
| 32 function onUISourceCodesAdded() | 32 function onUISourceCodesAdded() |
| 33 { | 33 { |
| 34 InspectorTest.dumpNavigatorView(sourcesNavigator); | 34 InspectorTest.dumpNavigatorView(sourcesNavigator, true); |
| 35 next(); | 35 next(); |
| 36 } | 36 } |
| 37 }, | 37 }, |
| 38 | 38 |
| 39 function addFileMapping(next) | 39 function addFileMapping(next) |
| 40 { | 40 { |
| 41 InspectorTest.waitForBinding("foo.js").then(onBindingCreated); | 41 InspectorTest.waitForBinding("foo.js").then(onBindingCreated); |
| 42 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http:
//127.0.0.1:8000", "/"); | 42 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http:
//127.0.0.1:8000", "/"); |
| 43 | 43 |
| 44 function onBindingCreated(binding) | 44 function onBindingCreated(binding) |
| 45 { | 45 { |
| 46 InspectorTest.dumpNavigatorView(sourcesNavigator); | 46 InspectorTest.dumpNavigatorView(sourcesNavigator, true); |
| 47 next(); | 47 next(); |
| 48 } | 48 } |
| 49 }, | 49 }, |
| 50 | 50 |
| 51 function removeFileMapping(next) | 51 function removeFileMapping(next) |
| 52 { | 52 { |
| 53 Persistence.persistence.addEventListener(Persistence.Persistence.Eve
nts.BindingRemoved, onBindingRemoved); | 53 Persistence.persistence.addEventListener(Persistence.Persistence.Eve
nts.BindingRemoved, onBindingRemoved); |
| 54 Workspace.fileSystemMapping.removeFileMapping(fs.fileSystemPath, "ht
tp://127.0.0.1:8000", "/"); | 54 Workspace.fileSystemMapping.removeFileMapping(fs.fileSystemPath, "ht
tp://127.0.0.1:8000", "/"); |
| 55 | 55 |
| 56 function onBindingRemoved(event) | 56 function onBindingRemoved(event) |
| 57 { | 57 { |
| 58 var binding = event.data; | 58 var binding = event.data; |
| 59 if (binding.network.name() !== "foo.js") | 59 if (binding.network.name() !== "foo.js") |
| 60 return | 60 return |
| 61 Persistence.persistence.removeEventListener(Persistence.Persiste
nce.Events.BindingRemoved, onBindingRemoved); | 61 Persistence.persistence.removeEventListener(Persistence.Persiste
nce.Events.BindingRemoved, onBindingRemoved); |
| 62 InspectorTest.dumpNavigatorView(sourcesNavigator); | 62 InspectorTest.dumpNavigatorView(sourcesNavigator, true); |
| 63 next(); | 63 next(); |
| 64 } | 64 } |
| 65 }, | 65 }, |
| 66 ]); | 66 ]); |
| 67 }; | 67 }; |
| 68 </script> | 68 </script> |
| 69 </head> | 69 </head> |
| 70 <body onload="runTest()"> | 70 <body onload="runTest()"> |
| 71 <p>Verify that navigator view removes mapped UISourceCodes.</p> | 71 <p>Verify that navigator view removes mapped UISourceCodes.</p> |
| 72 </body> | 72 </body> |
| 73 </html> | 73 </html> |
| OLD | NEW |