| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 <html> | 
|  | 2 <head> | 
|  | 3 <script src="../../inspector/inspector-test.js"></script> | 
|  | 4 <script src="../../inspector/resources-test.js"></script> | 
|  | 5 <script src="../../inspector/resource-tree/resource-tree-test.js"></script> | 
|  | 6 <script> | 
|  | 7 function createIframe() { | 
|  | 8     var iframe = document.createElement('iframe'); | 
|  | 9     iframe.setAttribute('src', 'resources/dummy-iframe.html'); | 
|  | 10     document.body.appendChild(iframe); | 
|  | 11     return new Promise(x => iframe.onload = x); | 
|  | 12 } | 
|  | 13 | 
|  | 14 async function test() | 
|  | 15 { | 
|  | 16     await InspectorTest.evaluateInPageAsync('createIframe()'); | 
|  | 17 | 
|  | 18     var resourceTreeModel = new SDK.ResourceTreeModel(InspectorTest.mainTarget); | 
|  | 19     var resources = []; | 
|  | 20     resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.ResourceAdde
    d, event => resources.push(event.data)); | 
|  | 21     resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.CachedResour
    cesLoaded, function() { | 
|  | 22         resources.sort((a, b) => { | 
|  | 23             if (a.url === b.url) | 
|  | 24                 return 0; | 
|  | 25             return a.url < b.url ? -1 : 1; | 
|  | 26         }); | 
|  | 27         InspectorTest.addResult('Reported resources:'); | 
|  | 28         InspectorTest.addResult(resources.map(r => '  ' + r.url).join('\n')); | 
|  | 29         InspectorTest.completeTest(); | 
|  | 30     }); | 
|  | 31 } | 
|  | 32 </script> | 
|  | 33 </head> | 
|  | 34 <body onload="runTest()"> | 
|  | 35 <p> | 
|  | 36 Verify that iframe's main resource is reported only once. | 
|  | 37 </p> | 
|  | 38 </body> | 
|  | 39 </html> | 
| OLD | NEW | 
|---|