blob: 707247ebfdb36f2400af09496b2c191959a10781 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/profile-utils.js"></script>
</head>
<body>
<script>
promise_test(async t => {
const profiler = await performance.profile({
sampleInterval: 10,
maxBufferSize: 2,
});
// Force 10 samples with a max buffer size of 2.
for (let i = 0; i < 10; i++) {
ProfileUtils.forceSample();
}
const trace = await profiler.stop();
assert_equals(trace.samples.length, 2);
}, 'max buffer size is not exceeded');
</script>
</body>
</html>