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 fs.addFileMapping("http://127.0.0.1:8000", "/"); | |
15 fs.reportCreated(function() { }); | 15 fs.reportCreated(function() { }); |
| 16 testMapping.addBinding("foo.js"); |
16 InspectorTest.waitForBinding("foo.js").then(onBindingCreated); | 17 InspectorTest.waitForBinding("foo.js").then(onBindingCreated); |
17 | 18 |
18 function onBindingCreated(binding) | 19 function onBindingCreated(binding) |
19 { | 20 { |
20 InspectorTest.addResult("Binding created: " + binding); | 21 InspectorTest.addResult("Binding created: " + binding); |
21 dumpEditorTabs("Opened tabs before opening any UISourceCodes:"); | 22 dumpEditorTabs("Opened tabs before opening any UISourceCodes:"); |
22 InspectorTest.addResult("request open uiSourceCode: " + binding.fileSyst
em.url()); | 23 InspectorTest.addResult("request open uiSourceCode: " + binding.fileSyst
em.url()); |
23 UI.panels.sources.showUISourceCode(binding.network, 0, 0); | 24 UI.panels.sources.showUISourceCode(binding.network, 0, 0); |
24 dumpEditorTabs("Opened tabs after opening UISourceCode:"); | 25 dumpEditorTabs("Opened tabs after opening UISourceCode:"); |
25 InspectorTest.completeTest(); | 26 InspectorTest.completeTest(); |
26 } | 27 } |
27 | 28 |
28 function dumpEditorTabs(title) | 29 function dumpEditorTabs(title) |
29 { | 30 { |
30 var editorContainer = UI.panels.sources._sourcesView._editorContainer; | 31 var editorContainer = UI.panels.sources._sourcesView._editorContainer; |
31 var openedUISourceCodes = editorContainer._tabIds.keysArray(); | 32 var openedUISourceCodes = editorContainer._tabIds.keysArray(); |
32 openedUISourceCodes.sort((a, b) => a.url().compareTo(b.url())); | 33 openedUISourceCodes.sort((a, b) => a.url().compareTo(b.url())); |
33 InspectorTest.addResult(title); | 34 InspectorTest.addResult(title); |
34 for (code of openedUISourceCodes) | 35 for (code of openedUISourceCodes) |
35 InspectorTest.addResult(" " + code.url()); | 36 InspectorTest.addResult(" " + code.url()); |
36 } | 37 } |
37 }; | 38 }; |
38 </script> | 39 </script> |
39 </head> | 40 </head> |
40 <body onload="runTest()"> | 41 <body onload="runTest()"> |
41 <p>Verify that for a fileSystem UISourceCode with persistence binding TabbedEdit
orContainer opens filesystem UISourceCode.</p> | 42 <p>Verify that for a fileSystem UISourceCode with persistence binding TabbedEdit
orContainer opens filesystem UISourceCode.</p> |
42 </body> | 43 </body> |
43 </html> | 44 </html> |
OLD | NEW |