Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="utf-8" />
<title>Resource Timing in dedicated workers</title>
<link rel="author" title="Google" href="" />
<link rel="help" href=""/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/webperftestharness.js"></script>
<script src="resources/webperftestharnessextension.js"></script>
<link rel="stylesheet" href="resources/resource_timing_test0.css" />
setup({explicit_done: true});
const worker = new Worker("resources/worker_with_images.js");
worker.onmessage = function(event) {
const context = new PerformanceContext(window.performance);
const entries = context.getEntriesByType('resource');
test_equals(entries.length, 6, "There should be six entries: 4 scripts, 1 stylesheet, and the worker itself");
<p>This test validates that resources requested by dedicated workers don't appear in the main document.</p>