Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /js-self-profiling/with-document-policy/dedicated-worker.https.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
promise_test(async t => {
const worker = new Worker('/js-self-profiling/resources/dedicated-worker-profiler-test.js');
const result = await new Promise((resolve, reject) => {
worker.onmessage = e => resolve(e.data);
worker.onerror = e => reject(new Error(e.message));
});
assert_true(result.success, 'profiling should succeed in dedicated worker with document policy enabled');
worker.terminate();
}, 'profiling should succeed in dedicated worker with document policy enabled');
</script>
</body>
</html>