4 <meta charset="utf-8" />
5 <title>clearResourceTimings functionality of resource timing</title>
6 <link rel="author" title="Intel" href="http://www.intel.com/" />
7 <link rel="help" href="http://www.w3.org/TR/resource-timing/#performanceresourcetiming"/>
8 <script src="/w3c/resources/testharness.js"></script>
9 <script src="/w3c/resources/testharnessreport.js"></script>
10 <script src="/w3c/webperf/resources/webperftestharness.js"></script>
11 <script src="/w3c/webperf/resources/webperftestharnessextension.js"></script>
13 setup({ explicit_done: true });
14 var context = new PerformanceContext(performance);
15 function onload_test()
17 test_equals(context.getEntriesByType("resource").length, 4, 4 + " resource timing entries should be stored in this page!");
18 context.clearResourceTimings();
19 test_equals(context.getEntriesByType("resource").length, 0, "No resource timing entries should be stored after clearResourceTimings!");
24 <body onload=onload_test()>
26 <p>This test validates the functionality of clearResourceTimings method in resource timing.</p>