Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <head> | |
| 3 <title>Performance Paint Timing Test</title> | |
| 4 </head> | |
| 5 <body> | |
| 6 <div style="background-color:black;color:white;padding:20px;"></div> | |
| 7 <script src="../../resources/testharness.js"></script> | |
| 8 <script src="../../resources/testharnessreport.js"></script> | |
| 9 <script> | |
| 10 | |
| 11 async_test(function (t) { | |
| 12 var observer = new PerformanceObserver( | |
| 13 t.step_func(function (entryList) { | |
| 14 var entries = entryList.getEntries(); | |
|
panicker
2016/12/05 20:51:23
Add comment indicating why FP is present and FCP i
sunjian
2016/12/07 21:55:43
Done.
| |
| 15 assert_equals(entries.length, 1, | |
| 16 "There should be one paint timing instance."); | |
| 17 assert_equals(entries[0].entryType, "paint", | |
| 18 "Expected entryType to be: paint."); | |
| 19 assert_equals(entries[0].name, "first-paint", | |
| 20 "Expected name to be: first-paint."); | |
| 21 assert_equals(entries[0].duration, 0, | |
| 22 "Expected duration to be: 0."); | |
| 23 observer.disconnect(); | |
| 24 t.done(); | |
| 25 }) | |
| 26 ); | |
| 27 observer.observe({entryTypes: ["paint"]}); | |
| 28 | |
| 29 }, "Performance first paint timing entry is observable."); | |
| 30 | |
| 31 </script> | |
| 32 </body> | |
| 33 </html> | |
| OLD | NEW |