Upstream version 11.40.277.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / initial-modules-load.html
1 <html>
2 <head>
3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script>
5
6 function test()
7 {
8     InspectorTest.runTestSuite([
9         function testInitialLoad(next)
10         {
11             InspectorTest.dumpLoadedModules(next);
12         },
13
14         function testCreateElementsPanel(next)
15         {
16             WebInspector.inspectorView.panel("elements").then(InspectorTest.dumpLoadedModules.bind(InspectorTest, next));
17         },
18
19         function testCreateNetworkPanel(next)
20         {
21             WebInspector.inspectorView.panel("network").then(InspectorTest.dumpLoadedModules.bind(InspectorTest, next));
22         },
23
24         function testShowSourcesPanel(next)
25         {
26             WebInspector.inspectorView.panel("sources").then(InspectorTest.dumpLoadedModules.bind(InspectorTest, next));
27         },
28
29         function testOpenUISourceCode(next)
30         {
31             var resource;
32             WebInspector.resourceTreeModel.forAllResources(function(r) {
33                 if (r.url.indexOf("inspector-test.js") !== -1) {
34                     resource = r;
35                     return true;
36                 }
37             });
38             var uiLocation = WebInspector.workspace.uiSourceCodeForOriginURL(resource.url).uiLocation(2, 1);
39             WebInspector.Revealer.reveal(uiLocation);
40             InspectorTest.dumpLoadedModules(next);
41         }
42     ]);
43 }
44
45 </script>
46 </head>
47
48 <body onload="runTest()">
49 <p>This test validates initial set of loaded modules.</p>
50 </body>
51 </html>