| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../inspector-test.js"></script> | 3 <script src="../inspector-test.js"></script> |
| 4 <script src="../resources-test.js"></script> | 4 <script src="../resources-test.js"></script> |
| 5 <script src="resource-tree-test.js"></script> | 5 <script src="resource-tree-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 function loadIframe() | 7 function loadIframe() |
| 8 { | 8 { |
| 9 var iframe = document.createElement("iframe"); | 9 var iframe = document.createElement("iframe"); |
| 10 document.body.appendChild(iframe); | 10 document.body.appendChild(iframe); |
| 11 iframe.src = "resources/resource-tree-non-unique-url-iframe.html"; | 11 iframe.src = "resources/resource-tree-non-unique-url-iframe.html"; |
| 12 } | 12 } |
| 13 | 13 |
| 14 function test() | 14 function test() |
| 15 { | 15 { |
| 16 InspectorTest.addSniffer(WebInspector.FrameTreeElement.prototype, "appendRes
ource", onResource, true); | 16 InspectorTest.addSniffer(Resources.FrameTreeElement.prototype, "appendResour
ce", onResource, true); |
| 17 | 17 |
| 18 var cssRequestsCount = 0; | 18 var cssRequestsCount = 0; |
| 19 function onResource(resource) | 19 function onResource(resource) |
| 20 { | 20 { |
| 21 if (resource.url.match(/\.css$/) && ++cssRequestsCount === 2) { | 21 if (resource.url.match(/\.css$/) && ++cssRequestsCount === 2) { |
| 22 InspectorTest.addResult("Resources Tree:"); | 22 InspectorTest.addResult("Resources Tree:"); |
| 23 InspectorTest.dumpResourcesTree(); | 23 InspectorTest.dumpResourcesTree(); |
| 24 InspectorTest.completeTest(); | 24 InspectorTest.completeTest(); |
| 25 } | 25 } |
| 26 } | 26 } |
| 27 | 27 |
| 28 InspectorTest.evaluateInPage("loadIframe();"); | 28 InspectorTest.evaluateInPage("loadIframe();"); |
| 29 } | 29 } |
| 30 </script> | 30 </script> |
| 31 </head> | 31 </head> |
| 32 <body onload="runTest()"> | 32 <body onload="runTest()"> |
| 33 <p>Tests resources panel shows several resources with the same url if they were
loaded with inspector already opened.</p> | 33 <p>Tests resources panel shows several resources with the same url if they were
loaded with inspector already opened.</p> |
| 34 </body> | 34 </body> |
| 35 </html> | 35 </html> |
| 36 | 36 |
| OLD | NEW |