Bug 1937511 [wpt PR 49703] - Support PaintTimingMixin in LCP, a=testonly
Automatic update from web-platform-tests Support PaintTimingMixin in LCP (#49703) This make the implementation look very close to https://w3c.github.io/paint-timing/#mark-paint-timing The render coarsening and queuing logic is all consolidated into PaintTiming::MarkPaintTimingInternal. Also previous alignment mechanisms such as the buffer in WindowPerformance and clamping to FCP are no longer needed. Bug: 381270287 Change-Id: I9ef0a1ebbc9417e2d65415712fbbb554df64d8d3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6087964 Reviewed-by: Michal Mocny <mmocny@chromium.org> Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org> Cr-Commit-Position: refs/heads/main@{#1396678} Co-authored-by: Noam Rosenthal <nrosenthal@chromium.org> -- wpt-commits: 20ded9e4aef54ee59a7a3b207190fc9fa6118b2f wpt-pr: 49703
This commit is contained in:
committed by
moz-wptsync-bot
parent
51ec8adedb
commit
22d82d0d39
@@ -22,6 +22,16 @@ p {
|
||||
assert_greater_than_equal(performance.now(), entry.renderTime);
|
||||
assert_approx_equals(entry.startTime, entry.renderTime, 0.001,
|
||||
'startTime should be equal to renderTime to the precision of 1 millisecond.');
|
||||
|
||||
// PaintTimingMixin
|
||||
assert_greater_than_equal(entry.paintTime, beforeRender, 'paintTime should represent the time when the UA started painting');
|
||||
|
||||
if ("presentationTime" in entry) {
|
||||
assert_greater_than(entry.presentationTime, entry.paintTime);
|
||||
assert_equals(entry.presentationTime, entry.renderTime);
|
||||
} else {
|
||||
assert_equals(entry.renderTime, entry.paintTime);
|
||||
}
|
||||
assert_equals(entry.duration, 0);
|
||||
// Some lower bound: height of at least 12 px.
|
||||
// Width of at least 100 px.
|
||||
|
||||
@@ -52,6 +52,16 @@ function checkImage(entry, expectedUrl, expectedID, expectedSize, timeLowerBound
|
||||
assert_equals(entry.size, expectedSize);
|
||||
}
|
||||
|
||||
assert_greater_than_equal(entry.paintTime, timeLowerBound, 'paintTime should represent the time when the UA started painting');
|
||||
|
||||
// PaintTimingMixin
|
||||
if ("presentationTime" in entry) {
|
||||
assert_greater_than(entry.presentationTime, entry.paintTime);
|
||||
assert_equals(entry.presentationTime, entry.renderTime);
|
||||
} else {
|
||||
assert_equals(entry.renderTime, entry.paintTime);
|
||||
}
|
||||
|
||||
if (options.includes('animated')) {
|
||||
assert_less_than(entry.renderTime, image_delay,
|
||||
'renderTime should be smaller than the delay applied to the second frame');
|
||||
|
||||
Reference in New Issue
Block a user