tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

buffer-full-then-increased.html (1244B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head onload>
      4 <meta charset="utf-8" />
      5 <title>This test validates that synchronously adding entries in onresourcetimingbufferfull callback results in these entries being properly handled.</title>
      6 <link rel="author" title="Google" href="http://www.google.com/" />
      7 <link rel="help" href="https://www.w3.org/TR/resource-timing-2/#dom-performance-onresourcetimingbufferfull"/>
      8 <script src="/resources/testharness.js"></script>
      9 <script src="/resources/testharnessreport.js"></script>
     10 <script src="resources/resource-loaders.js"></script>
     11 <script src="resources/buffer-full-utilities.js"></script>
     12 </head>
     13 <body>
     14 <script>
     15 promise_test(async t => {
     16    addAssertUnreachedBufferFull(t);
     17    await fillUpTheBufferWithSingleResource();
     18    // These resources overflow the entry buffer, and go into the secondary buffer.
     19    load.xhr_sync(scriptResources[1]);
     20    load.xhr_sync(scriptResources[2]);
     21    // Immediately increase the size: the bufferfull event should not be fired.
     22    performance.setResourceTimingBufferSize(3);
     23    await waitForNextTask();
     24    checkEntries(3);
     25 }, "Test that overflowing the buffer and immediately increasing its limit does not trigger the resourcetimingbufferfull event");
     26 </script>
     27 </body>
     28 </html>