3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../http/tests/inspector/debugger-test.js"></script>
5 <script src=
"../../http/tests/inspector/workspace-test.js"></script>
9 var contentScriptsNavigatorView
= new WebInspector
.ContentScriptsNavigatorView();
10 contentScriptsNavigatorView
.setWorkspace(WebInspector
.workspace
);
11 contentScriptsNavigatorView
.show(WebInspector
.inspectorView
.element
);
13 var mockExecutionContext
= {
16 origin
: "chrome-extension://113581321345589144",
19 var mockContentScriptURL
= mockExecutionContext
.origin
+ "/script.js";
21 InspectorTest
.runTestSuite([
22 function testAddFileBeforeExecutionContext(next
)
24 var contentProvider
= new WebInspector
.StaticContentProvider(WebInspector
.resourceTypes
.Script
, "");
25 WebInspector
.NetworkProject
.forTarget(InspectorTest
.mainTarget
).addFileForURL(mockContentScriptURL
, contentProvider
, true);
26 InspectorTest
.dumpNavigatorView(contentScriptsNavigatorView
, "contentScripts", " ");
27 InspectorTest
.runtimeModel
._executionContextCreated(mockExecutionContext
);
28 InspectorTest
.dumpNavigatorView(contentScriptsNavigatorView
, "contentScripts", " ");
30 WebInspector
.NetworkProject
.forTarget(InspectorTest
.mainTarget
)._reset();
31 InspectorTest
.runtimeModel
._executionContextsCleared();
35 function testAddExecutionContextBeforeFile(next
)
37 InspectorTest
.runtimeModel
._executionContextCreated(mockExecutionContext
);
38 var contentProvider
= new WebInspector
.StaticContentProvider(WebInspector
.resourceTypes
.Script
, "");
39 WebInspector
.NetworkProject
.forTarget(InspectorTest
.mainTarget
).addFileForURL(mockContentScriptURL
, contentProvider
, true);
40 InspectorTest
.dumpNavigatorView(contentScriptsNavigatorView
, "contentScripts", " ");
48 <body onload=
"runTest()">
49 <p>The test verifies that extension names are resolved properly in navigator view.
</p>