mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
Update web-platform-tests to revision d647a1bc742a533186d8297cae2a2bee669c7780
This commit is contained in:
parent
bf192caf4b
commit
4cf0a092d0
41 changed files with 897 additions and 487 deletions
|
@ -16,15 +16,23 @@
|
|||
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);
|
||||
function appendScripts() {
|
||||
const documentFragment = document.createDocumentFragment();
|
||||
// Add 100 elements at a time to avoid page reflow every time.
|
||||
let numScriptsAccumulated = 0;
|
||||
while (numScriptsAccumulated < 100) {
|
||||
const src = "resources/empty.js?" + counter;
|
||||
const script = document.createElement('script');
|
||||
script.type = 'text/javascript';
|
||||
script.src = src;
|
||||
documentFragment.appendChild(script);
|
||||
++counter;
|
||||
++numScriptsAccumulated;
|
||||
}
|
||||
document.body.appendChild(documentFragment);
|
||||
t.step_timeout(appendScripts, 20);
|
||||
}
|
||||
appendScript();
|
||||
appendScripts();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue