Bug 1465603 [wpt PR 11257] - Change Resource Timing default buffer size to 250., a=testonly
authorYoav Weiss <yoav@yoav.ws>
Wed, 06 Jun 2018 17:17:37 +0000
changeset 422244 898838b493f9ff1a7a94f17c40998c08d50c16c9
parent 422243 a404637bd62855f29d5b70dda1e34cde379f0bbb
child 422245 353ecca0069588d118757e9c849680e83168944d
push id34122
push userebalazs@mozilla.com
push dateMon, 11 Jun 2018 09:37:00 +0000
treeherdermozilla-central@9941eb8c3b29 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1465603, 11257, 847689, 1078107, 563133
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1465603 [wpt PR 11257] - Change Resource Timing default buffer size 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] https://github.com/w3c/resource-timing/pull/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
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/resource-timing/resource_timing_buffer_full_eventually.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -365544,16 +365544,22 @@
     ]
    ],
    "resource-timing/resource_timing_TAO_cross_origin_redirect.html": [
     [
      "/resource-timing/resource_timing_TAO_cross_origin_redirect.html",
      {}
     ]
    ],
+   "resource-timing/resource_timing_buffer_full_eventually.html": [
+    [
+     "/resource-timing/resource_timing_buffer_full_eventually.html",
+     {}
+    ]
+   ],
    "resource-timing/resource_timing_buffer_full_when_populate_entries.html": [
     [
      "/resource-timing/resource_timing_buffer_full_when_populate_entries.html",
      {}
     ]
    ],
    "resource-timing/resource_timing_buffer_full_when_shrink_buffer_size.html": [
     [
@@ -600555,16 +600561,20 @@
   "resource-timing/resource_timing.worker.js": [
    "352213c5bc7533afa10003da93dfb399a101c224",
    "testharness"
   ],
   "resource-timing/resource_timing_TAO_cross_origin_redirect.html": [
    "ccf716aec242f3ec6d3754e4dd43456954d45d3c",
    "testharness"
   ],
+  "resource-timing/resource_timing_buffer_full_eventually.html": [
+   "5c0a85e6e61a11fca1682b30b6b68f317f9c343e",
+   "testharness"
+  ],
   "resource-timing/resource_timing_buffer_full_when_populate_entries.html": [
    "af0727706a4160a49aabe131b2f3a4bbca8268e0",
    "testharness"
   ],
   "resource-timing/resource_timing_buffer_full_when_shrink_buffer_size.html": [
    "7a176d4a235c8893bdc1e18079d5dbbdfd82323f",
    "testharness"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/resource-timing/resource_timing_buffer_full_eventually.html
@@ -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>