| 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="../workspace-test.js"></script> | 5 <script src="../workspace-test.js"></script> |
| 6 <script src="../isolated-filesystem-test.js"></script> | 6 <script src="../isolated-filesystem-test.js"></script> |
| 7 <script src="./persistence-test.js"></script> | 7 <script src="./persistence-test.js"></script> |
| 8 <script src="./resources/foo.js"></script> | 8 <script src="./resources/foo.js"></script> |
| 9 <script> | 9 <script> |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 function onBindingCreated() | 65 function onBindingCreated() |
| 66 { | 66 { |
| 67 dumpEditorTabs(); | 67 dumpEditorTabs(); |
| 68 dumpSourceFrame(networkSourceFrame); | 68 dumpSourceFrame(networkSourceFrame); |
| 69 next(); | 69 next(); |
| 70 } | 70 } |
| 71 }, | 71 }, |
| 72 | 72 |
| 73 function removeFileMapping(next) | 73 function removeFileMapping(next) |
| 74 { | 74 { |
| 75 Persistence.persistence.addEventListener(Persistence.Persistence.Eve
nts.BindingRemoved, onBindingRemoved); | 75 Persistence.persistence.addEventListener(Persistence.Persistence.Bin
dingChangedEvent, onBindingChanged); |
| 76 Workspace.fileSystemMapping.removeFileMapping(fs.fileSystemPath, "ht
tp://127.0.0.1:8000", "/"); | 76 Workspace.fileSystemMapping.removeFileMapping(fs.fileSystemPath, "ht
tp://127.0.0.1:8000", "/"); |
| 77 | 77 |
| 78 function onBindingRemoved(event) | 78 function onBindingChanged(event) |
| 79 { | 79 { |
| 80 var binding = event.data; | 80 if (!event.removed) |
| 81 if (binding.network.name() !== "foo.js") | 81 return; |
| 82 if (event.binding.network.name() !== "foo.js") |
| 82 return | 83 return |
| 83 Persistence.persistence.removeEventListener(Persistence.Persiste
nce.Events.BindingRemoved, onBindingRemoved); | 84 Persistence.persistence.removeEventListener(Persistence.Persiste
nce.BindingChangedEvent, onBindingChanged); |
| 84 dumpEditorTabs(); | 85 dumpEditorTabs(); |
| 85 dumpSourceFrame(fileSystemSourceFrame); | 86 dumpSourceFrame(fileSystemSourceFrame); |
| 86 next(); | 87 next(); |
| 87 } | 88 } |
| 88 }, | 89 }, |
| 89 ]); | 90 ]); |
| 90 | 91 |
| 91 function dumpEditorTabs() | 92 function dumpEditorTabs() |
| 92 { | 93 { |
| 93 var editorContainer = UI.panels.sources._sourcesView._editorContainer; | 94 var editorContainer = UI.panels.sources._sourcesView._editorContainer; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 105 InspectorTest.addResult(" firstVisibleLine: " + sourceFrame.textEdito
r.firstVisibleLine()); | 106 InspectorTest.addResult(" firstVisibleLine: " + sourceFrame.textEdito
r.firstVisibleLine()); |
| 106 InspectorTest.addResult(" isDirty: " + sourceFrame.uiSourceCode().isD
irty()); | 107 InspectorTest.addResult(" isDirty: " + sourceFrame.uiSourceCode().isD
irty()); |
| 107 } | 108 } |
| 108 }; | 109 }; |
| 109 </script> | 110 </script> |
| 110 </head> | 111 </head> |
| 111 <body onload="runTest()"> | 112 <body onload="runTest()"> |
| 112 <p>Verify that tabs get merged and split when binding is added and removed.</p> | 113 <p>Verify that tabs get merged and split when binding is added and removed.</p> |
| 113 </body> | 114 </body> |
| 114 </html> | 115 </html> |
| OLD | NEW |