| 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 contentScriptsNavigatorView = new WebInspector.ContentScriptsNavigatorVi
ew(); | 9 var contentScriptsNavigatorView = new WebInspector.ContentScriptsNavigatorVi
ew(); |
| 10 contentScriptsNavigatorView.setWorkspace(WebInspector.workspace); | 10 contentScriptsNavigatorView.setWorkspace(WebInspector.workspace); |
| 11 contentScriptsNavigatorView.show(WebInspector.inspectorView.element); | 11 contentScriptsNavigatorView.show(WebInspector.inspectorView.element); |
| 12 | 12 |
| 13 var mockExecutionContext = { | 13 var mockExecutionContext = { |
| 14 id: 1234567, | 14 id: 1234567, |
| 15 isPageContext: false, | 15 isPageContext: false, |
| 16 origin: "chrome-extension://113581321345589144", | 16 origin: "chrome-extension://113581321345589144", |
| 17 name: "FibExtension" | 17 name: "FibExtension" |
| 18 }; | 18 }; |
| 19 var mockContentScriptURL = mockExecutionContext.origin + "/script.js"; | 19 var mockContentScriptURL = mockExecutionContext.origin + "/script.js"; |
| 20 | 20 |
| 21 InspectorTest.runTestSuite([ | 21 InspectorTest.runTestSuite([ |
| 22 function testAddFileBeforeExecutionContext(next) | 22 function testAddFileBeforeExecutionContext(next) |
| 23 { | 23 { |
| 24 var contentProvider = new WebInspector.StaticContentProvider(WebInsp
ector.resourceTypes.Script, ""); | 24 var contentProvider = new WebInspector.StaticContentProvider(WebInsp
ector.resourceTypes.Script, ""); |
| 25 WebInspector.networkProject.addFileForURL(mockContentScriptURL, cont
entProvider, true); | 25 WebInspector.networkProject.addFileForURL(mockContentScriptURL, cont
entProvider, true); |
| 26 InspectorTest.dumpNavigatorView(contentScriptsNavigatorView, "conten
tScripts", " "); | 26 InspectorTest.dumpNavigatorView(contentScriptsNavigatorView, "conten
tScripts", " "); |
| 27 WebInspector.runtimeModel._executionContextCreated(mockExecutionCont
ext); | 27 InspectorTest.runtimeModel._executionContextCreated(mockExecutionCon
text); |
| 28 InspectorTest.dumpNavigatorView(contentScriptsNavigatorView, "conten
tScripts", " "); | 28 InspectorTest.dumpNavigatorView(contentScriptsNavigatorView, "conten
tScripts", " "); |
| 29 // cleanup after test | 29 // cleanup after test |
| 30 WebInspector.networkProject.reset(); | 30 WebInspector.networkProject.reset(); |
| 31 WebInspector.runtimeModel._executionContextsCleared(); | 31 InspectorTest.runtimeModel._executionContextsCleared(); |
| 32 next(); | 32 next(); |
| 33 }, | 33 }, |
| 34 | 34 |
| 35 function testAddExecutionContextBeforeFile(next) | 35 function testAddExecutionContextBeforeFile(next) |
| 36 { | 36 { |
| 37 WebInspector.runtimeModel._executionContextCreated(mockExecutionCont
ext); | 37 InspectorTest.runtimeModel._executionContextCreated(mockExecutionCon
text); |
| 38 var contentProvider = new WebInspector.StaticContentProvider(WebInsp
ector.resourceTypes.Script, ""); | 38 var contentProvider = new WebInspector.StaticContentProvider(WebInsp
ector.resourceTypes.Script, ""); |
| 39 WebInspector.networkProject.addFileForURL(mockContentScriptURL, cont
entProvider, true); | 39 WebInspector.networkProject.addFileForURL(mockContentScriptURL, cont
entProvider, true); |
| 40 InspectorTest.dumpNavigatorView(contentScriptsNavigatorView, "conten
tScripts", " "); | 40 InspectorTest.dumpNavigatorView(contentScriptsNavigatorView, "conten
tScripts", " "); |
| 41 next(); | 41 next(); |
| 42 }, | 42 }, |
| 43 ]); | 43 ]); |
| 44 } | 44 } |
| 45 | 45 |
| 46 </script> | 46 </script> |
| 47 </head> | 47 </head> |
| 48 <body onload="runTest()"> | 48 <body onload="runTest()"> |
| 49 <p>The test verifies that extension names are resolved properly in navigator vie
w.</p> | 49 <p>The test verifies that extension names are resolved properly in navigator vie
w.</p> |
| 50 </body> | 50 </body> |
| 51 </html> | 51 </html> |
| OLD | NEW |