OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta charset="utf-8" /> | 4 <meta charset="utf-8" /> |
5 <title>onresourcetimingbufferfull callback of resource timing</title> | 5 <title>This test validates the functionality of onresourcetimingbufferfu
ll in resource timing.</title> |
6 <script src="/w3c/webperf/resources/webperftestharnessextension.js"></sc
ript> | 6 <script src="/w3c/webperf/resources/webperftestharnessextension.js"></sc
ript> |
7 <script> | 7 <script> |
8 var context = new PerformanceContext(performance); | 8 var context = new PerformanceContext(performance); |
9 var count = 0; | 9 var count = 0; |
10 function buffer_full_call_back() | 10 function buffer_full_call_back() |
11 { | 11 { |
12 count++; | 12 count++; |
13 } | 13 } |
14 context.registerResourceTimingBufferFullCallback(buffer_full_call_ba
ck); | 14 context.registerResourceTimingBufferFullCallback(buffer_full_call_ba
ck); |
15 context.setResourceTimingBufferSize(2); | 15 context.setResourceTimingBufferSize(2); |
16 </script> | 16 </script> |
17 <link rel="author" title="Intel" href="http://www.intel.com/" /> | 17 <link rel="author" title="Intel" href="http://www.intel.com/" /> |
18 <link rel="help" href="http://www.w3.org/TR/resource-timing/#performance
resourcetiming"/> | 18 <link rel="help" href="http://www.w3.org/TR/resource-timing/#performance
resourcetiming"/> |
19 <script src="/w3c/resources/testharness.js"></script> | 19 <script src="/w3c/resources/testharness.js"></script> |
20 <script src="/w3c/resources/testharnessreport.js"></script> | 20 <script src="/w3c/resources/testharnessreport.js"></script> |
21 <script src="/w3c/webperf/resources/webperftestharness.js"></script> | 21 <script src="/w3c/webperf/resources/webperftestharness.js"></script> |
22 <script> | 22 <script> |
23 setup({ explicit_done: true }); | 23 setup({ explicit_done: true }); |
24 function onload_test() | 24 function onload_test() |
25 { | 25 { |
26 test_equals(count, 1, "onresourcetimingbufferfull should have be
en invoked once buffer is full!"); | 26 test_equals(count, 1, "onresourcetimingbufferfull should have be
en invoked once buffer is full!"); |
27 done(); | 27 done(); |
28 } | 28 } |
29 </script> | 29 </script> |
30 </head> | 30 </head> |
31 <body onload=onload_test()> | 31 <body onload=onload_test()> |
32 <h1>Description</h1> | |
33 <p>This test validates the functionality of onresourcetimingbufferfull i
n resource timing.</p> | |
34 </body> | 32 </body> |
35 </html> | 33 </html> |
OLD | NEW |