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/page-mock.js"></script> | 5 <script src="../../../http/tests/inspector/page-mock.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 Sources.SourcesNavigatorView(); | 17 var navigatorView = new Sources.SourcesNavigatorView(); |
18 navigatorView.show(UI.inspectorView.element); | 18 navigatorView.show(UI.inspectorView.element); |
19 return navigatorView; | 19 return navigatorView; |
20 } | 20 } |
21 | 21 |
22 InspectorTest.addSniffer(Workspace.UISourceCode.prototype, 'requestContent',
onRequestContent, true); | 22 InspectorTest.addSniffer(Workspace.UISourceCode.prototype, 'requestContent',
onRequestContent, true); |
23 | 23 |
24 function onRequestContent() { | 24 function onRequestContent() { |
25 InspectorTest.addResult("Source requested for " + this.url()); | 25 InspectorTest.addResult("Source requested for " + this.url()); |
26 } | 26 } |
27 | 27 |
28 Bindings.NetworkProject.forTarget(InspectorTest.mainTarget)._reset(); | 28 Bindings.NetworkProject.forTarget(InspectorTest.mainTarget)._resetForTest(); |
| 29 Bindings.resourceBindingManager._resetForTest(InspectorTest.mainTarget); |
29 var page = new InspectorTest.PageMock('http://example.com'); | 30 var page = new InspectorTest.PageMock('http://example.com'); |
30 InspectorTest.connectToPage('mock-page', page, true /* makeMainTarget */); | 31 InspectorTest.connectToPage('mock-page', page, true /* makeMainTarget */); |
31 | 32 |
32 function addNetworkFile(url) | 33 function addNetworkFile(url) |
33 { | 34 { |
34 page.evalScript(url, '', false /* isContentScript */); | 35 page.evalScript(url, '', false /* isContentScript */); |
35 return InspectorTest.waitForUISourceCode(url); | 36 return InspectorTest.waitForUISourceCode(url); |
36 } | 37 } |
37 | 38 |
38 function reload() { | 39 function reload() { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 } | 104 } |
104 } | 105 } |
105 ]); | 106 ]); |
106 }; | 107 }; |
107 </script> | 108 </script> |
108 </head> | 109 </head> |
109 <body onload="runTest()"> | 110 <body onload="runTest()"> |
110 <p>Tests that scripts panel UI elements work as intended.</p> | 111 <p>Tests that scripts panel UI elements work as intended.</p> |
111 </body> | 112 </body> |
112 </html> | 113 </html> |
OLD | NEW |