tor-browser

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

buffer-full-add-after-full-event.html (1124B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <link rel="author" title="Google" href="http://www.google.com/" />
      6 <link rel="help" href="https://www.w3.org/TR/resource-timing-2/#dom-performance-setresourcetimingbuffersize">
      7 <title>This test validates that setResourceTimingBufferFull behaves appropriately when set to the current buffer level.</title>
      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    await forceBufferFullEvent();
     17    performance.clearResourceTimings();
     18    return new Promise(resolve => {
     19      new PerformanceObserver(t.step_func(() => {
     20        assert_equals(performance.getEntriesByType('resource').length, 1,
     21            'The entry should be available in the performance timeline!');
     22        resolve();
     23      })).observe({type: 'resource'});
     24      load.script(scriptResources[2]);
     25    });
     26 }, "Test that entry was added to the buffer after a buffer full event");
     27 </script>