1
0
Fork 0
firefox/testing/web-platform/tests/resource-timing/buffer-full-add-after-full-event.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

27 lines
1.1 KiB
HTML

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<link rel="author" title="Google" href="http://www.google.com/" />
<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>