Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that disables it given conditions:
- This WPT test may be referenced by the following Test IDs:
- /resource-timing/buffer-full-add-after-full-event.html - WPT Dashboard Interop Dashboard
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<link rel="help" href="https://www.w3.org/TR/resource-timing-2/#dom-performance-setresourcetimingbuffersize">
<title>This test validates that setResourceTimingBufferFull behaves appropriately when set to the current buffer level.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/resource-loaders.js"></script>
<script src="resources/buffer-full-utilities.js"></script>
</head>
<body>
<script>
promise_test(async t => {
await forceBufferFullEvent();
performance.clearResourceTimings();
return new Promise(resolve => {
new PerformanceObserver(t.step_func(() => {
assert_equals(performance.getEntriesByType('resource').length, 1,
'The entry should be available in the performance timeline!');
resolve();
})).observe({type: 'resource'});
load.script(scriptResources[2]);
});
}, "Test that entry was added to the buffer after a buffer full event");
</script>