| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 5 <script src="../../../http/tests/inspector/workspace-test.js"></script> | 5 <script src="../../../http/tests/inspector/workspace-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 function test() | 7 function test() |
| 8 { | 8 { |
| 9 var uiSourceCodes = []; | 9 var uiSourceCodes = []; |
| 10 function addUISourceCode(url) | 10 function addUISourceCode(url) |
| 11 { | 11 { |
| 12 var contentProvider = WebInspector.StaticContentProvider.fromString(url,
WebInspector.resourceTypes.Script, ""); | 12 var contentProvider = Common.StaticContentProvider.fromString(url, Commo
n.resourceTypes.Script, ""); |
| 13 var uiSourceCode = WebInspector.NetworkProject.forTarget(InspectorTest.m
ainTarget).addFile(contentProvider, InspectorTest.mainFrame(), false); | 13 var uiSourceCode = Bindings.NetworkProject.forTarget(InspectorTest.mainT
arget).addFile(contentProvider, InspectorTest.mainFrame(), false); |
| 14 uiSourceCodes.push(uiSourceCode); | 14 uiSourceCodes.push(uiSourceCode); |
| 15 } | 15 } |
| 16 | 16 |
| 17 var files = [ | 17 var files = [ |
| 18 "foo.css", | 18 "foo.css", |
| 19 "foo.js", | 19 "foo.js", |
| 20 "foo.js.map", | 20 "foo.js.map", |
| 21 "foo.ts", | 21 "foo.ts", |
| 22 | 22 |
| 23 "bar.css", | 23 "bar.css", |
| (...skipping 15 matching lines...) Expand all Loading... |
| 39 "bar/foo.js.map", | 39 "bar/foo.js.map", |
| 40 "bar/foo.ts", | 40 "bar/foo.ts", |
| 41 "bar/foo" ]; | 41 "bar/foo" ]; |
| 42 | 42 |
| 43 for (var i = 0; i < files.length; ++i) | 43 for (var i = 0; i < files.length; ++i) |
| 44 addUISourceCode("http://example.com/" + files[i]); | 44 addUISourceCode("http://example.com/" + files[i]); |
| 45 | 45 |
| 46 InspectorTest.addResult("Dumping next file for each file:"); | 46 InspectorTest.addResult("Dumping next file for each file:"); |
| 47 for (var i = 0; i < uiSourceCodes.length; ++i) { | 47 for (var i = 0; i < uiSourceCodes.length; ++i) { |
| 48 var uiSourceCode = uiSourceCodes[i]; | 48 var uiSourceCode = uiSourceCodes[i]; |
| 49 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate
._nextFile(uiSourceCode); | 49 var nextUISourceCode = Sources.SourcesView.SwitchFileActionDelegate._nex
tFile(uiSourceCode); |
| 50 var nextURI = nextUISourceCode ? nextUISourceCode.url() : "<none>"; | 50 var nextURI = nextUISourceCode ? nextUISourceCode.url() : "<none>"; |
| 51 InspectorTest.addResult("Next file for " + uiSourceCode.url() + " is " +
nextURI + "."); | 51 InspectorTest.addResult("Next file for " + uiSourceCode.url() + " is " +
nextURI + "."); |
| 52 } | 52 } |
| 53 InspectorTest.completeTest(); | 53 InspectorTest.completeTest(); |
| 54 } | 54 } |
| 55 </script> | 55 </script> |
| 56 </head> | 56 </head> |
| 57 <body onload="runTest()"> | 57 <body onload="runTest()"> |
| 58 <p>Tests how switch to next file with the same name and different extension feat
ure works.</p> | 58 <p>Tests how switch to next file with the same name and different extension feat
ure works.</p> |
| 59 </body> | 59 </body> |
| 60 </html> | 60 </html> |
| OLD | NEW |