blob: 55edf5f7b15e0e4748b48f1111f811fc45180059 [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script src="./resources/paint-api-utils.js"></script>
</head>
<body>
<script>
description("Paint API should not be available in worker contexts.");
window.jsTestIsAsync = true;
const worker = new Worker("./resources/worker.html");
worker.onmessage = event => {
window.workerSupportedEntryTypes = JSON.parse(event.data);
shouldBeTrue('PerformanceObserver.supportedEntryTypes.includes("paint")');
shouldBeFalse('workerSupportedEntryTypes.includes("paint")');
shouldBeTrue('workerSupportedEntryTypes.includes("mark")');
testPassed("PerformanceObserver.supportedEntryTypes did not include 'paint' for workers");
finishJSTest();
};
worker.postMessage("start");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>