Bug 1686029 [wpt PR 27131] - Mark performance.measureMemory web-platform tests as...
[gecko.git] / testing / web-platform / tests / measure-memory / window-open.same-origin.https.window.js
blob5223a97bc7d2fc4ca55fbd5e06d979abe78d2ca1
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       window_open: true,
13       children: [
14         {
15           id: 'same-origin-2',
16           window_open: true,
17         },
18         {
19           id: 'same-origin-3',
20         },
21       ]
22     },
23   ]);
24   const result = await performance.measureMemory();
25   checkMeasureMemory(result, [
26     {
27       url: window.location.href,
28       scope: 'Window',
29       container: null,
30     },
31     {
32       url: windows['same-origin-1'].location.href,
33       scope: 'Window',
34       container: null,
35     },
36     {
37       url: windows['same-origin-2'].location.href,
38       scope: 'Window',
39       container: null,
40     },
41     {
42       url: windows['same-origin-3'].location.href,
43       scope: 'Window',
44       container: {
45         id: 'same-origin-3',
46         src: iframes['same-origin-3'].src,
47       },
48     },
49   ]);
50 }, 'Well-formed result of performance.measureMemory with same-origin window.open.');