| 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> | 5 <script> |
| 6 function test() | 6 function test() |
| 7 { | 7 { |
| 8 var contentScriptsNavigatorView = new Sources.ContentScriptsNavigatorView(); | 8 var contentScriptsNavigatorView = new Sources.ContentScriptsNavigatorView(); |
| 9 contentScriptsNavigatorView.show(UI.inspectorView.element); | 9 contentScriptsNavigatorView.show(UI.inspectorView.element); |
| 10 | 10 |
| 11 var mockExecutionContext = { | 11 var mockExecutionContext = { |
| 12 id: 1234567, | 12 id: 1234567, |
| 13 isDefault: false, | 13 isDefault: false, |
| 14 origin: "chrome-extension://113581321345589144", | 14 origin: "chrome-extension://113581321345589144", |
| 15 name: "FibExtension" | 15 name: "FibExtension" |
| 16 }; | 16 }; |
| 17 var mockContentScriptURL = mockExecutionContext.origin + "/script.js"; | 17 var mockContentScriptURL = mockExecutionContext.origin + "/script.js"; |
| 18 | 18 |
| 19 InspectorTest.runTestSuite([ | 19 InspectorTest.runTestSuite([ |
| 20 function testAddExecutionContextBeforeFile(next) | 20 async function testAddExecutionContextBeforeFile(next) |
| 21 { | 21 { |
| 22 InspectorTest.runtimeModel._executionContextCreated(mockExecutionCon
text); | 22 InspectorTest.runtimeModel._executionContextCreated(mockExecutionCon
text); |
| 23 var contentProvider = Common.StaticContentProvider.fromString(mockCo
ntentScriptURL, Common.resourceTypes.Script, ""); | 23 await InspectorTest.addScriptUISourceCode(mockContentScriptURL, '',
true, 1234567); |
| 24 Bindings.NetworkProject.forTarget(InspectorTest.mainTarget).addFile(
contentProvider, InspectorTest.mainFrame(), true); | |
| 25 InspectorTest.dumpNavigatorView(contentScriptsNavigatorView); | 24 InspectorTest.dumpNavigatorView(contentScriptsNavigatorView); |
| 26 next(); | 25 next(); |
| 27 }, | 26 }, |
| 28 ]); | 27 ]); |
| 29 } | 28 } |
| 30 | 29 |
| 31 </script> | 30 </script> |
| 32 </head> | 31 </head> |
| 33 <body onload="runTest()"> | 32 <body onload="runTest()"> |
| 34 <p>The test verifies that extension names are resolved properly in navigator vie
w.</p> | 33 <p>The test verifies that extension names are resolved properly in navigator vie
w.</p> |
| 35 </body> | 34 </body> |
| 36 </html> | 35 </html> |
| OLD | NEW |