Bug 1686029 [wpt PR 27131] - Mark performance.measureMemory web-platform tests as...
[gecko.git] / testing / web-platform / tests / measure-memory / iframe.same-origin.https.window.js
blob1d546b27f302ace49618d448cfcb13f668631c08
1 // META: script=/common/get-host-info.sub.js
2 // META: script=./resources/common.js
3 // META: timeout=long
4 'use strict';
6 assert_true(self.crossOriginIsolated);
8 promise_test(async testCase => {
9   const {iframes, windows} = await build([
10     {
11       id: 'same-origin-1',
12       children: [
13         {
14           id: 'same-origin-2',
15         }
16       ],
17     },
18   ]);
19   const result = await performance.measureMemory();
20   checkMeasureMemory(result, [
21     {
22       url: window.location.href,
23       scope: 'Window',
24       container: null,
25     },
26     {
27       url: windows['same-origin-1'].location.href,
28       scope: 'Window',
29       container: {
30         id: 'same-origin-1',
31         src: iframes['same-origin-1'].src,
32       },
33     },
34     {
35       url: windows['same-origin-2'].location.href,
36       scope: 'Window',
37       container: {
38         id: 'same-origin-2',
39         src: iframes['same-origin-2'].src,
40       },
41     },
42   ]);
43 }, 'Well-formed result of performance.measureMemory with same-origin iframes.');