mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-09 21:00:42 +02:00
Automatic update from web-platform-tests Update performance.measureMemory to the latest proposal This changes the result format of the API to the latest version of the proposal at https://github.com/WICG/performance-measure-memory. Specifically, per-origin attribution changed to per-frame attribution with one caveat that cross-origin iframes are considered opaque and iframes nested in cross-origin iframes do not appear in the result. The previous version of API: { bytes: 70*MB, breakdown: [ {bytes: 40*MB, globals: 2, type: 'js', origins: ['foo.com']}, {bytes: 30*MB, globals: 1, type: 'js', origins: ['bar.com']} ] } The current version of the API: { bytes: 70*MB, breakdown: [ {bytes: 40*MB, type: 'window/js', attribution: ['foo.com']}, {bytes: 30*MB, type: 'window/js', attribution: ['bar.com']} ] } Bug: 1049093 Change-Id: I3bbf07ad6e978b9b483561c06cedf6c7a135b7e7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2087627 Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#747271} -- Add two missing long timeouts -- wpt-commits: d283af7ddbb88540623eb33446868ff9ea6a1df6, 1d9de5dc0876b81e5e188668e6adccde33655969 wpt-pr: 22085
17 lines
478 B
JavaScript
17 lines
478 B
JavaScript
// META: script=/common/get-host-info.sub.js
|
|
// META: script=./resources/common.js
|
|
// META: timeout=long
|
|
'use strict';
|
|
|
|
promise_test(async testCase => {
|
|
try {
|
|
let result = await performance.measureMemory();
|
|
checkMeasureMemory(result, {allowed: [window.location.href]});
|
|
} catch (error) {
|
|
if (!(error instanceof DOMException)) {
|
|
throw error;
|
|
}
|
|
assert_equals(error.name, 'SecurityError');
|
|
}
|
|
}, 'Well-formed result of performance.measureMemory.');
|
|
|