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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/performance-timing/paint-timing/basetest.html

Issue 2932593002: Attempt 2: Update PaintTiming Web Perf APIs for FP & FCP to report swap time (Closed)
Patch Set: rebase to head 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/performance-timing/paint-timing/first-contentful-bg-image.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 <div id="main"></div>
9
10 <script>
11 async_test(function(t) {
12 testRunner.capturePixelsAsyncThen(t.step_func(function() {
13 const bufferedEntries = performance.getEntriesByType('paint');
14 assert_equals(bufferedEntries.length, 0, "No paint entries yet");
15
16 const div = document.createElement("div");
17 div.style.width = "100px";
18 div.style.height = "100px";
19 div.style.backgroundColor = "red";
20 div.style.color = "blue";
21 div.innerHTML = "test"
22 document.getElementById("main").appendChild(div);
23
24 testRunner.capturePixelsAsyncThen(t.step_func_done(function() {
25 const bufferedEntries = performance.getEntriesByType('paint');
26 assert_equals(bufferedEntries.length, 2, "FP and FCP.");
27 assert_equals(bufferedEntries[0].entryType, "paint");
28 assert_equals(bufferedEntries[0].name, "first-paint");
29 assert_equals(bufferedEntries[1].entryType, "paint");
30 assert_equals(bufferedEntries[1].name, "first-contentful-paint") ;
31 }));
32 }));
33 }, "Basic test to check existence of FP and FCP.");
34 </script>
35 </body>
36 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/performance-timing/paint-timing/first-contentful-bg-image.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698