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>
10 function dumpNavigator(sourcesNavigatorView)
12 InspectorTest.dumpNavigatorView(sourcesNavigatorView, "sources", " ");
15 function createNavigatorView(constructor)
17 var navigatorView = new constructor();
18 navigatorView.setWorkspace(InspectorTest.testWorkspace);
19 navigatorView.show(WebInspector.inspectorView.element);
23 InspectorTest.createWorkspace(true);
24 sourcesNavigatorView = createNavigatorView(WebInspector.SourcesNavigatorView);
25 contentScriptsNavigatorView = createNavigatorView(WebInspector.ContentScriptsNavigatorView);
27 var uiSourceCodes = [];
28 function addUISourceCode(url, isContentScript)
30 var contentProvider = new WebInspector.StaticContentProvider(WebInspector.resourceTypes.Script, "");
31 var uiSourceCode = InspectorTest.testNetworkWorkspaceBinding.addFileForURL(url, contentProvider, isContentScript);
32 uiSourceCodes.push(uiSourceCode);
35 function dumpNavigator()
37 InspectorTest.dumpNavigatorView(sourcesNavigatorView, "sources", " ");
38 InspectorTest.dumpNavigatorView(contentScriptsNavigatorView, "contentScripts", " ");
41 function dumpScriptsList()
43 InspectorTest.addResult("");
46 sourcesNavigatorView.revealUISourceCode(uiSourceCodes[0]);
47 contentScriptsNavigatorView.revealUISourceCode(uiSourceCodes[0]);
51 for (var i = 0; i < uiSourceCodes.length; ++i) {
52 sourcesNavigatorView.revealUISourceCode(uiSourceCodes[i]);
53 contentScriptsNavigatorView.revealUISourceCode(uiSourceCodes[i]);
62 "lenta.ban?pg=4883&ifr=1",
63 "lenta.ban?pg=5309&ifr=1",
65 "_js/production/motor.js?1308927432",
67 "i/js/jquery-1.5.1.min.js",
68 "i/js/jquery.cookie.js",
69 "foo/path/bar.js?file=bar/zzz.js",
70 "foo/path/foo.js?file=bar/aaa.js" ];
71 for (var i = 0; i < scripts.length; ++i)
72 addUISourceCode("http://foo.com/" + scripts[i]);
75 "foo/path/bar.js?file=bar/zzz.js",
76 "foo/path/foo.js?file=bar/aaa.js" ];
77 for (var i = 0; i < scripts2.length; ++i)
78 addUISourceCode("http://bar.com/" + scripts2[i]);
79 addUISourceCode("*Non*URL*path");
82 "extension-schema://extension-name/bar.js",
83 "extension-schema://extension-name/folder/baz.js" ];
84 for (var i = 0; i < extensions.length; ++i)
85 addUISourceCode(extensions[i], true);
86 addUISourceCode("*Another*Non*URL*path", true);
88 InspectorTest.completeTest();
93 <body onload="runTest()">
95 Tests scripts sorting in the scripts panel.