| OLD | NEW |
| (Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 5 <script src="../../../http/tests/inspector/workspace-test.js"></script> |
| 6 <script> |
| 7 function test() |
| 8 { |
| 9 InspectorTest.createWorkspace(true); |
| 10 |
| 11 var uiSourceCodes = []; |
| 12 function addUISourceCode(url) |
| 13 { |
| 14 var contentProvider = new WebInspector.StaticContentProvider(WebInspecto
r.resourceTypes.Script, ""); |
| 15 var uiSourceCode = InspectorTest.testNetworkWorkspaceBinding.addFileForU
RL(url, contentProvider, false); |
| 16 uiSourceCodes.push(uiSourceCode); |
| 17 } |
| 18 |
| 19 var files = [ |
| 20 "foo.css", |
| 21 "foo.js", |
| 22 "foo.js.map", |
| 23 "foo.ts", |
| 24 |
| 25 "bar.css", |
| 26 "bar.js", |
| 27 "bar.js.map", |
| 28 "bar.ts", |
| 29 |
| 30 "baz.css", |
| 31 "baz2", |
| 32 |
| 33 "foo/foo.css", |
| 34 "foo/foo.js", |
| 35 "foo/foo.js.map", |
| 36 "foo/foo.ts", |
| 37 "foo/foo", |
| 38 |
| 39 "bar/foo.css", |
| 40 "bar/foo.js", |
| 41 "bar/foo.js.map", |
| 42 "bar/foo.ts", |
| 43 "bar/foo" ]; |
| 44 |
| 45 for (var i = 0; i < files.length; ++i) |
| 46 addUISourceCode("http://example.com/" + files[i]); |
| 47 |
| 48 InspectorTest.addResult("Dumping next file for each file:"); |
| 49 for (var i = 0; i < uiSourceCodes.length; ++i) { |
| 50 var uiSourceCode = uiSourceCodes[i]; |
| 51 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate
._nextFile(uiSourceCode); |
| 52 var nextURI = nextUISourceCode ? nextUISourceCode.uri() : "<none>"; |
| 53 InspectorTest.addResult("Next file for " + uiSourceCode.uri() + " is " +
nextURI + "."); |
| 54 } |
| 55 InspectorTest.completeTest(); |
| 56 } |
| 57 </script> |
| 58 </head> |
| 59 <body onload="runTest()"> |
| 60 <p>Tests how switch to next file with the same name and different extension feat
ure works.</p> |
| 61 </body> |
| 62 </html> |
| OLD | NEW |