| Yoav Weiss | 79001b1 | 2018-12-12 17:16:56 | [diff] [blame] | 1 | <!DOCTYPE HTML> |
| 2 | <html> |
| 3 | <head onload> |
| 4 | <meta charset="utf-8" /> |
| 5 | <title>This test validates that decreasing the buffer size in onresourcetimingbufferfull callback does not result in extra entries being dropped.</title> |
| Nicolás Peña Moreno | 8a1c14c | 2021-05-27 22:27:50 | [diff] [blame] | 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"/> |
| Yoav Weiss | 79001b1 | 2018-12-12 17:16:56 | [diff] [blame] | 8 | <script src="/resources/testharness.js"></script> |
| 9 | <script src="/resources/testharnessreport.js"></script> |
| Nicolás Peña Moreno | 8a1c14c | 2021-05-27 22:27:50 | [diff] [blame] | 10 | <script src="resources/resource-loaders.js"></script> |
| Yoav Weiss | 79001b1 | 2018-12-12 17:16:56 | [diff] [blame] | 11 | <script src="resources/buffer-full-utilities.js"></script> |
| 12 | </head> |
| 13 | <body> |
| 14 | <script> |
| Yoav Weiss | 79001b1 | 2018-12-12 17:16:56 | [diff] [blame] | 15 | promise_test(async () => { |
| Nicolás Peña Moreno | 8a1c14c | 2021-05-27 22:27:50 | [diff] [blame] | 16 | performance.addEventListener('resourcetimingbufferfull', () => { |
| 17 | performance.setResourceTimingBufferSize(1); |
| 18 | }); |
| 19 | await fillUpTheBufferWithTwoResources(); |
| 20 | load.script(scriptResources[2]); |
| 21 | await bufferFullFirePromise; |
| 22 | checkEntries(2); |
| Yoav Weiss | 79001b1 | 2018-12-12 17:16:56 | [diff] [blame] | 23 | }, "Test that decreasing the buffer limit during the callback does not drop entries"); |
| 24 | </script> |
| 25 | </body> |
| 26 | </html> |