This repository has been archived by the owner on Nov 7, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1465603 [wpt PR 11257] - Change Resource Timing default buffer si…
…ze to 250., a=testonly Automatic update from web-platform-testsChange Resource Timing default buffer size to 250. Following a proposed spec change[1], this CL changes the number of entries buffered by default before the Resource Timing buffer is full. [1] w3c/resource-timing#155 Bug: 847689 Change-Id: Id93bfea902b0cf049abdac12a98cc4fba7ff1dd3 Reviewed-on: https://chromium-review.googlesource.com/1078107 Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Commit-Queue: Yoav Weiss <yoav@yoav.ws> Cr-Commit-Position: refs/heads/master@{#563133} -- wpt-commits: f696c249c6d41c32bdc04d0bec688ee00228a0cf wpt-pr: 11257
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
testing/web-platform/tests/resource-timing/resource_timing_buffer_full_eventually.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!DOCTYPE HTML> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="help" href="http://www.w3.org/TR/resource-timing/#performanceresourcetiming"/> | ||
<title>This test validates that resource timing implementations have a finite number of entries in their buffer.</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
</head> | ||
<body> | ||
<script> | ||
const t = async_test("Finite resource timing entries buffer size"); | ||
performance.onresourcetimingbufferfull = t.step_func_done(function() { | ||
}); | ||
window.onload = t.step_func( | ||
function() { | ||
// Scripts appended in JS to ensure setResourceTimingBufferSize is called before. | ||
let counter = performance.getEntriesByType("resource").length; | ||
function appendScript() { | ||
const src = "resources/empty.js?" + counter; | ||
const script = document.createElement('script'); | ||
script.type = 'text/javascript'; | ||
script.onload = function() { ++counter; appendScript()}; | ||
script.src = src; | ||
document.body.appendChild(script); | ||
} | ||
appendScript(); | ||
}); | ||
</script> | ||
</body> | ||
</html> |