servo/tests/wpt/web-platform-tests/user-timing/performance-measure-invalid.worker.js

9 lines
287 B
JavaScript

importScripts("/resources/testharness.js");
test(() => {
assert_throws(new TypeError(), () => {
performance.measure('name', 'navigationStart', 'navigationStart');
});
}, "When converting 'navigationStart' to a timestamp, the global object has to be a Window object.");
done();