blob: 43dc3d84fd3dd1b6263dfdf961113edb9e1a0da6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<!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>
|