Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/performance-timing/paint-timing/first-contentful-bg-image.html

Issue 2932593002: Attempt 2: Update PaintTiming Web Perf APIs for FP & FCP to report swap time (Closed)
Patch Set: replace var with let Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <head>
3 <title>Performance Paint Timing Test: FCP due to background image</title>
4 </head>
5 <body>
6 <script src="../../resources/testharness.js"></script>
7 <script src="../../resources/testharnessreport.js"></script>
8 <div id="main"></div>
9 </body>
10 <footer>
11 <script>
12 async_test(function (t) {
13 let body = document.getElementsByTagName('body')[0];
tdresser 2017/06/12 14:44:45 const
14 body.style.backgroundImage = 'url(resources/circles.png)';
15
16 testRunner.capturePixelsAsyncThen(t.step_func_done(function() {
17 const bufferedEntries = performance.getEntriesByType('paint');
18 assert_equals(bufferedEntries.length, 2, "There should be two paint timing instances.");
19 assert_equals(bufferedEntries[0].entryType, "paint");
20 assert_equals(bufferedEntries[0].name, "first-paint");
21 assert_equals(bufferedEntries[1].entryType, "paint");
22 assert_equals(bufferedEntries[1].name, "first-contentful-paint");
23 }));
24 }, "First contentful paint fires due to background image render.");
25 </script>
26 <footer>
27 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698