clear-resource-timings.html (841B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8" /> 5 <title>This test validates the functionality of clearResourceTimings method 6 in resource timing.</title> 7 <link rel="author" title="Intel" href="http://www.intel.com/" /> 8 <link rel="help" 9 href="https://www.w3.org/TR/resource-timing-2/#dom-performance-clearresourcetimings"> 10 <script src="/resources/testharness.js"></script> 11 <script src="/resources/testharnessreport.js"></script> 12 <script> 13 test(() => { 14 assert_equals(performance.getEntriesByType("resource").length, 2, 15 "Resource timing entries exist"); 16 performance.clearResourceTimings(); 17 assert_equals(performance.getEntriesByType("resource").length, 0, 18 "Resource timing entries are cleared"); 19 }, "Test that clearResourceTimings() clears the performance timeline buffer"); 20 </script> 21 </head> 22 </html>