main-frame-and-worker.https.window.js (773B)
1 // META: script=/common/get-host-info.sub.js 2 // META: script=./resources/checker.js 3 // META: script=./resources/common.js 4 // META: timeout=long 5 'use strict'; 6 7 promise_test(async testCase => { 8 assert_true(self.crossOriginIsolated); 9 10 const BYTES_PER_WORKER = 10 * 1024 * 1024; 11 const worker_url = await createWorker(BYTES_PER_WORKER); 12 const result = await performance.measureUserAgentSpecificMemory(); 13 assert_greater_than_equal(result.bytes, BYTES_PER_WORKER); 14 checkMeasureMemory(result, [ 15 { 16 url: window.location.href, 17 scope: 'Window', 18 container: null, 19 }, 20 { 21 url: worker_url, 22 scope: 'DedicatedWorkerGlobalScope', 23 container: null, 24 }, 25 ]); 26 }, 'Well-formed result of performance.measureUserAgentSpecificMemory.');