| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <head> | |
| 3 <title>Performance Paint Timing Test</title> | |
| 4 </head> | |
| 5 <body> | |
| 6 <script src="../../resources/testharness.js"></script> | |
| 7 <script src="../../resources/testharnessreport.js"></script> | |
| 8 <script> | |
| 9 | |
| 10 async_test(function (t) { | |
| 11 var observer = new PerformanceObserver( | |
| 12 t.step_func(function (entryList) { | |
| 13 var entries = entryList.getEntries(); | |
| 14 assert_equals(entries.length, 2, | |
| 15 "There should be two paint timing instances."); | |
| 16 assert_equals(entries[0].entryType, "paint", | |
| 17 "Expected entryType to be: paint."); | |
| 18 assert_equals(entries[0].duration, 0, | |
| 19 "Expected duration to be: 0."); | |
| 20 | |
| 21 assert_equals(entries[1].entryType, "paint", | |
| 22 "Expected entryType to be: paint."); | |
| 23 assert_equals(entries[1].duration, 0, | |
| 24 "Expected duration to be: 0."); | |
| 25 observer.disconnect(); | |
| 26 t.done(); | |
| 27 }) | |
| 28 ); | |
| 29 observer.observe({entryTypes: ["paint"]}); | |
| 30 | |
| 31 }, "Both first-paint-timing and first-contentful-paint timing entry are obse
rvable."); | |
| 32 | |
| 33 </script> | |
| 34 <div style="background-color:black;color:white;padding:20px;">...test...</di
v> | |
| 35 </body> | |
| 36 </html> | |
| OLD | NEW |