mirror of
https://github.com/servo/servo.git
synced 2025-10-16 00:10:23 +01:00
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.');
|
|
|