| OLD | NEW |
| (Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../inspector-test.js"></script> |
| 4 <script src="../debugger-test.js"></script> |
| 5 <script src="../isolated-filesystem-test.js"></script> |
| 6 <script src="./persistence-test.js"></script> |
| 7 <script src="./resources/foo.js"></script> |
| 8 <script> |
| 9 |
| 10 function test() |
| 11 { |
| 12 InspectorTest.runTestSuite([ |
| 13 function openNetworkTab(next) |
| 14 { |
| 15 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTypes.N
etwork) |
| 16 .then(sourceCode => InspectorTest.showUISourceCodePromise(source
Code)) |
| 17 .then(onSourceFrame); |
| 18 |
| 19 function onSourceFrame(sourceFrame) |
| 20 { |
| 21 dumpEditorTabs(); |
| 22 next(); |
| 23 } |
| 24 }, |
| 25 |
| 26 function addMapping(next) |
| 27 { |
| 28 var fs = new InspectorTest.TestFileSystem("file:///var/www"); |
| 29 fs.addFileMapping("http://127.0.0.1:8000", "/"); |
| 30 InspectorTest.addFooJSFile(fs); |
| 31 fs.reportCreated(function() { }); |
| 32 InspectorTest.waitForBinding("foo.js").then(onBindingCreated); |
| 33 |
| 34 function onBindingCreated() |
| 35 { |
| 36 dumpEditorTabs(); |
| 37 next(); |
| 38 } |
| 39 }, |
| 40 ]); |
| 41 |
| 42 function dumpEditorTabs() |
| 43 { |
| 44 var editorContainer = UI.panels.sources._sourcesView._editorContainer; |
| 45 var openedUISourceCodes = editorContainer._tabIds.keysArray(); |
| 46 openedUISourceCodes.sort((a, b) => a.url().compareTo(b.url())); |
| 47 InspectorTest.addResult("Opened tabs: "); |
| 48 for (code of openedUISourceCodes) |
| 49 InspectorTest.addResult(" " + code.url()); |
| 50 } |
| 51 }; |
| 52 </script> |
| 53 </head> |
| 54 <body onload="runTest()"> |
| 55 <p>Verify that a network file tab gets substituted with filesystem tab when pers
istence binding comes.</p> |
| 56 </body> |
| 57 </html> |
| OLD | NEW |