Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/iframe-main-resource.html

Issue 2897713002: DevTools: ResourceTreeModel should not report resources twice (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/iframe-main-resource-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/iframe-main-resource-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698