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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 fileSystemSourceFrame.scrollToLine(2); | 53 fileSystemSourceFrame.scrollToLine(2); |
54 dumpSourceFrame(fileSystemSourceFrame); | 54 dumpSourceFrame(fileSystemSourceFrame); |
55 dumpEditorTabs(); | 55 dumpEditorTabs(); |
56 next(); | 56 next(); |
57 } | 57 } |
58 }, | 58 }, |
59 | 59 |
60 function addFileMapping(next) | 60 function addFileMapping(next) |
61 { | 61 { |
62 InspectorTest.waitForBinding("foo.js").then(onBindingCreated); | 62 InspectorTest.waitForBinding("foo.js").then(onBindingCreated); |
63 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http:
//127.0.0.1:8000", "/"); | 63 Persistence.fileSystemMapping.addFileMapping(fs.fileSystemPath, "htt
p://127.0.0.1:8000", "/"); |
64 | 64 |
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.Eve
nts.BindingRemoved, onBindingRemoved); |
76 Workspace.fileSystemMapping.removeFileMapping(fs.fileSystemPath, "ht
tp://127.0.0.1:8000", "/"); | 76 Persistence.fileSystemMapping.removeFileMapping(fs.fileSystemPath, "
http://127.0.0.1:8000", "/"); |
77 | 77 |
78 function onBindingRemoved(event) | 78 function onBindingRemoved(event) |
79 { | 79 { |
80 var binding = event.data; | 80 var binding = event.data; |
81 if (binding.network.name() !== "foo.js") | 81 if (binding.network.name() !== "foo.js") |
82 return | 82 return |
83 Persistence.persistence.removeEventListener(Persistence.Persiste
nce.Events.BindingRemoved, onBindingRemoved); | 83 Persistence.persistence.removeEventListener(Persistence.Persiste
nce.Events.BindingRemoved, onBindingRemoved); |
84 dumpEditorTabs(); | 84 dumpEditorTabs(); |
85 dumpSourceFrame(fileSystemSourceFrame); | 85 dumpSourceFrame(fileSystemSourceFrame); |
86 next(); | 86 next(); |
(...skipping 18 matching lines...) Expand all Loading... |
105 InspectorTest.addResult(" firstVisibleLine: " + sourceFrame.textEdito
r.firstVisibleLine()); | 105 InspectorTest.addResult(" firstVisibleLine: " + sourceFrame.textEdito
r.firstVisibleLine()); |
106 InspectorTest.addResult(" isDirty: " + sourceFrame.uiSourceCode().isD
irty()); | 106 InspectorTest.addResult(" isDirty: " + sourceFrame.uiSourceCode().isD
irty()); |
107 } | 107 } |
108 }; | 108 }; |
109 </script> | 109 </script> |
110 </head> | 110 </head> |
111 <body onload="runTest()"> | 111 <body onload="runTest()"> |
112 <p>Verify that tabs get merged and split when binding is added and removed.</p> | 112 <p>Verify that tabs get merged and split when binding is added and removed.</p> |
113 </body> | 113 </body> |
114 </html> | 114 </html> |
OLD | NEW |