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 | 6 |
7 <script> | 7 <script> |
8 | 8 |
9 function createCraftedIframe() | 9 function createCraftedIframe() |
10 { | 10 { |
11 var fabricatedFrame = document.createElement("iframe"); | 11 var fabricatedFrame = document.createElement("iframe"); |
12 fabricatedFrame.src = "#foo"; | 12 fabricatedFrame.src = "#foo"; |
13 document.body.appendChild(fabricatedFrame); | 13 document.body.appendChild(fabricatedFrame); |
14 fabricatedFrame.contentDocument.write("<div>bar</div>"); | 14 fabricatedFrame.contentDocument.write("<div>bar</div>"); |
15 } | 15 } |
16 | 16 |
17 function test() | 17 function test() |
18 { | 18 { |
19 InspectorTest.runAfterResourcesAreFinished(["inspector-test.js", "resources-
test.js", "resource-tree-test.js"], step1); | 19 InspectorTest.runAfterResourcesAreFinished(["inspector-test.js", "resources-
test.js", "resource-tree-test.js"], step1); |
20 | 20 |
21 function step1() | 21 function step1() |
22 { | 22 { |
23 InspectorTest.addSniffer(WebInspector.resourceTreeModel, "_frameAttached
", InspectorTest.completeTest); | 23 InspectorTest.addSniffer(InspectorTest.resourceTreeModel, "_frameAttache
d", InspectorTest.completeTest); |
24 InspectorTest.evaluateInPage("createCraftedIframe()"); | 24 InspectorTest.evaluateInPage("createCraftedIframe()"); |
25 } | 25 } |
26 } | 26 } |
27 | 27 |
28 </script> | 28 </script> |
29 | 29 |
30 </head> | 30 </head> |
31 <body onload="runTest()"> | 31 <body onload="runTest()"> |
32 <p>Tests resource tree model on crafted iframe addition (will time out on failur
e).</p> | 32 <p>Tests resource tree model on crafted iframe addition (will time out on failur
e).</p> |
33 </body> | 33 </body> |
34 </html> | 34 </html> |
OLD | NEW |