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/elements-test.js"></script> | 4 <script src="../http/tests/inspector/elements-test.js"></script> |
5 <script src="../http/tests/inspector/network-test.js"></script> | 5 <script src="../http/tests/inspector/network-test.js"></script> |
6 <script> | 6 <script> |
7 | 7 |
8 var initialize_TestCustom = function() { | 8 var initialize_TestCustom = function() { |
9 | 9 |
10 InspectorTest.preloadPanel("elements"); | 10 InspectorTest.preloadPanel("elements"); |
(...skipping 15 matching lines...) Expand all Loading... |
26 var resource; | 26 var resource; |
27 var uiLocation; | 27 var uiLocation; |
28 var requestWithResource; | 28 var requestWithResource; |
29 var requestWithoutResource; | 29 var requestWithoutResource; |
30 | 30 |
31 InspectorTest.runTestSuite([ | 31 InspectorTest.runTestSuite([ |
32 function init(next) | 32 function init(next) |
33 { | 33 { |
34 installHooks(); | 34 installHooks(); |
35 | 35 |
36 WebInspector.resourceTreeModel.forAllResources(function(r) { | 36 InspectorTest.resourceTreeModel.forAllResources(function(r) { |
37 if (r.url.indexOf("inspector-test.js") !== -1) { | 37 if (r.url.indexOf("inspector-test.js") !== -1) { |
38 resource = r; | 38 resource = r; |
39 return true; | 39 return true; |
40 } | 40 } |
41 }); | 41 }); |
42 uiLocation = WebInspector.workspace.uiSourceCodeForOriginURL(resourc
e.url).uiLocation(2, 1); | 42 uiLocation = WebInspector.workspace.uiSourceCodeForOriginURL(resourc
e.url).uiLocation(2, 1); |
43 | 43 |
44 InspectorTest.nodeWithId("div", nodeCallback); | 44 InspectorTest.nodeWithId("div", nodeCallback); |
45 | 45 |
46 function nodeCallback(foundNode) | 46 function nodeCallback(foundNode) |
47 { | 47 { |
48 node = foundNode; | 48 node = foundNode; |
49 InspectorTest.recordNetwork(); | 49 InspectorTest.recordNetwork(); |
50 InspectorTest.evaluateInPage("loadResource('../http/tests/inspec
tor/inspector-test.js')", firstXhrCallback); | 50 InspectorTest.evaluateInPage("loadResource('../http/tests/inspec
tor/inspector-test.js')", firstXhrCallback); |
51 } | 51 } |
52 | 52 |
53 function firstXhrCallback() | 53 function firstXhrCallback() |
54 { | 54 { |
55 requestWithResource = WebInspector.networkLog.requestForURL(reso
urce.url); | 55 requestWithResource = InspectorTest.networkLog.requestForURL(res
ource.url); |
56 InspectorTest.evaluateInPage("loadResource('missing.js')", secon
dXhrCallback); | 56 InspectorTest.evaluateInPage("loadResource('missing.js')", secon
dXhrCallback); |
57 } | 57 } |
58 | 58 |
59 function secondXhrCallback() | 59 function secondXhrCallback() |
60 { | 60 { |
61 var requests = InspectorTest.networkRequests(); | 61 var requests = InspectorTest.networkRequests(); |
62 for (var i = 0; i < requests.length; ++i) { | 62 for (var i = 0; i < requests.length; ++i) { |
63 if (requests[i].url.indexOf("missing.js") !== -1) { | 63 if (requests[i].url.indexOf("missing.js") !== -1) { |
64 requestWithoutResource = requests[i]; | 64 requestWithoutResource = requests[i]; |
65 break; | 65 break; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 } | 124 } |
125 } | 125 } |
126 | 126 |
127 </script> | 127 </script> |
128 </head> | 128 </head> |
129 <body onload="runTest()"> | 129 <body onload="runTest()"> |
130 <p>Tests object revelation in the UI.</p> | 130 <p>Tests object revelation in the UI.</p> |
131 <div id="div" /> | 131 <div id="div" /> |
132 </body> | 132 </body> |
133 </html> | 133 </html> |
OLD | NEW |