| 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 function dumpNavigator(sourcesNavigatorView) | 9 function dumpNavigator(sourcesNavigatorView) |
| 10 { | 10 { |
| 11 InspectorTest.addResult("Navigator:"); | 11 InspectorTest.addResult("Navigator:"); |
| 12 InspectorTest.dumpNavigatorView(sourcesNavigatorView); | 12 InspectorTest.dumpNavigatorView(sourcesNavigatorView); |
| 13 } | 13 } |
| 14 | 14 |
| 15 function createNavigatorView() | 15 function createNavigatorView() |
| 16 { | 16 { |
| 17 var navigatorView = new WebInspector.SourcesNavigatorView(); | 17 var navigatorView = new WebInspector.SourcesNavigatorView(); |
| 18 navigatorView.setWorkspace(InspectorTest.testWorkspace); | 18 navigatorView.setWorkspace(InspectorTest.testWorkspace); |
| 19 navigatorView.show(WebInspector.inspectorView.element); | 19 navigatorView.show(WebInspector.inspectorView.element); |
| 20 return navigatorView; | 20 return navigatorView; |
| 21 } | 21 } |
| 22 | 22 |
| 23 function createContentProvider(url) | 23 function createContentProvider(url) |
| 24 { | 24 { |
| 25 var contentProvider = new WebInspector.StaticContentProvider(WebInspecto
r.resourceTypes.Script, ""); | 25 var contentProvider = new WebInspector.StaticContentProvider(WebInspecto
r.resourceTypes.Script, ""); |
| 26 contentProvider.requestContent = function(callback) | 26 contentProvider.requestContent = function() |
| 27 { | 27 { |
| 28 InspectorTest.addResult("Source requested for " + url); | 28 InspectorTest.addResult("Source requested for " + url); |
| 29 callback(""); | 29 return Promise.resolve(""); |
| 30 }; | 30 }; |
| 31 return contentProvider; | 31 return contentProvider; |
| 32 } | 32 } |
| 33 | 33 |
| 34 function createMockWorkspace() | 34 function createMockWorkspace() |
| 35 { | 35 { |
| 36 InspectorTest.createWorkspaceWithTarget(true); | 36 InspectorTest.createWorkspaceWithTarget(true); |
| 37 InspectorTest.testDebuggerProject = new WebInspector.ContentProviderBase
dProject(InspectorTest.testWorkspace, "", WebInspector.projectTypes.Debugger, ""
); | 37 InspectorTest.testDebuggerProject = new WebInspector.ContentProviderBase
dProject(InspectorTest.testWorkspace, "", WebInspector.projectTypes.Debugger, ""
); |
| 38 return InspectorTest.testWorkspace; | 38 return InspectorTest.testWorkspace; |
| 39 } | 39 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 next(); | 109 next(); |
| 110 } | 110 } |
| 111 ]); | 111 ]); |
| 112 }; | 112 }; |
| 113 </script> | 113 </script> |
| 114 </head> | 114 </head> |
| 115 <body onload="runTest()"> | 115 <body onload="runTest()"> |
| 116 <p>Tests that scripts panel UI elements work as intended.</p> | 116 <p>Tests that scripts panel UI elements work as intended.</p> |
| 117 </body> | 117 </body> |
| 118 </html> | 118 </html> |
| OLD | NEW |