Skip to content

Commit

Permalink
Reland "[LargestContentfulPaint] Set startTime"
Browse files Browse the repository at this point in the history
This reverts commit 6df4545104337f8087db2c39ebb2ff8f8b03ac89.

Reason for revert: Reverting the revert might "fix" the test now that the failures are expected after a new wpt roll:
https://crrev.com/219a669145c403c99e3d7f441abbaad0e5d23a90/third_party/blink/web_tests/platform/win7/virtual/scalefactor200withoutzoom/external/wpt/largest-contentful-paint/observe-after-untrusted-scroll-expected.txt

Original change's description:
> Revert "[LargestContentfulPaint] Set startTime"
>
> This reverts commit 58051e426031caabd8ae28b96a9be1f92f3cd913.
>
> Reason for revert: Most suspicious CL for failing paint-related test
> failures as mentioned in the linked bug.
>
> Bug: 987915
>
> Original change's description:
> > [LargestContentfulPaint] Set startTime
> >
> > Currently startTime is 0, which is a problem because getEntries()
> > methods all sort by startTime. To help with this problem, we set the
> > startTime to renderTime, if available, or to loadTime, if renderTime is
> > nt available.
> >
> > Bug: 965505
> > Change-Id: Ie70b69269f7ce4be0fdc94f33a44a84e062d3ba5
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1719379
> > Reviewed-by: Yoav Weiss <[email protected]>
> > Commit-Queue: Nicolás Peña Moreno <[email protected]>
> > Cr-Commit-Position: refs/heads/master@{#681147}
>
> [email protected],[email protected]
>
> Change-Id: Ie810b8a3ac88369ab73a66670865f462f590e1ec
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 965505
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1719351
> Reviewed-by: Friedrich [CET] <[email protected]>
> Commit-Queue: Friedrich [CET] <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#681224}

[email protected],[email protected],[email protected]

Change-Id: I02478f0c560c64268593c3a9df158b4e505f4667
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 987915, 965505
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1720811
Reviewed-by: Friedrich [CET] <[email protected]>
Commit-Queue: Friedrich [CET] <[email protected]>
Cr-Commit-Position: refs/heads/master@{#681269}
  • Loading branch information
FHorschig authored and chromium-wpt-export-bot committed Jul 26, 2019
1 parent bc60e6f commit 7706c8a
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion largest-contentful-paint/contracted-image.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'The rendering timestamp should occur after script starts running.');
assert_greater_than_equal(performance.now(), entry.renderTime,
'The rendering timestamp should occur before the entry is dispatched to the observer.');
assert_equals(entry.startTime, 0);
assert_equals(entry.startTime, entry.renderTime, 'startTime should equal renderTime');
assert_equals(entry.duration, 0);
// black-rectangle.png is 100 x 50. It occupies 50 x 50 so size will be bounded by the displayed size.
assert_equals(entry.size, 2500);
Expand Down
2 changes: 1 addition & 1 deletion largest-contentful-paint/cross-origin-image.sub.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
const entry = entryList.getEntries()[0];
assert_equals(entry.entryType, 'largest-contentful-paint');
assert_equals(entry.renderTime, 0, 'The renderTime value should be 0 for a cross origin image.');
assert_equals(entry.startTime, 0);
assert_equals(entry.startTime, entry.loadTime, 'startTime should equal loadTime');
assert_equals(entry.duration, 0);
// blue.png is 133 x 106.
assert_equals(entry.size, 14098);
Expand Down
2 changes: 1 addition & 1 deletion largest-contentful-paint/expanded-image.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'The rendering timestamp should occur after script starts running.');
assert_greater_than_equal(performance.now(), entry.renderTime,
'The rendering timestamp should occur before the entry is dispatched to the observer.');
assert_equals(entry.startTime, 0);
assert_equals(entry.startTime, entry.renderTime, 'startTime should equal renderTime');
assert_equals(entry.duration, 0);
// black-rectangle.png is 100 x 50. It occupies 300 x 300 so size will be bounded by the intrinsic size.
assert_equals(entry.size, 5000);
Expand Down
2 changes: 1 addition & 1 deletion largest-contentful-paint/image-src-change.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'The rendering timestamp should occur after script starts running.');
assert_greater_than_equal(performance.now(), entry.renderTime,
'The rendering timestamp should occur before the entry is dispatched to the observer.');
assert_equals(entry.startTime, 0);
assert_equals(entry.startTime, entry.renderTime, 'startTime should equal renderTime');
assert_equals(entry.duration, 0);
if (firstCallback) {
// blue.png is 133 x 106.
Expand Down
2 changes: 1 addition & 1 deletion largest-contentful-paint/loadTime-after-appendChild.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
assert_equals(entryList.getEntries().length, 1);
const entry = entryList.getEntries()[0];
assert_equals(entry.entryType, 'largest-contentful-paint');
assert_equals(entry.startTime, 0);
assert_equals(entry.startTime, entry.renderTime, 'startTime should equal renderTime');
assert_equals(entry.duration, 0);
assert_equals(entry.url, window.location.origin + '/images/black-rectangle.png');
assert_greater_than(entry.renderTime, entry.loadTime,
Expand Down
2 changes: 1 addition & 1 deletion largest-contentful-paint/observe-image.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'The rendering timestamp should occur after script starts running.');
assert_greater_than_equal(performance.now(), entry.renderTime,
'The rendering timestamp should occur before the entry is dispatched to the observer.');
assert_equals(entry.startTime, 0);
assert_equals(entry.startTime, entry.renderTime, 'startTime should equal renderTime');
assert_equals(entry.duration, 0);
// blue.png is 133 x 106.
assert_equals(entry.size, 14098);
Expand Down
2 changes: 1 addition & 1 deletion largest-contentful-paint/observe-text.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
assert_equals(entry.entryType, 'largest-contentful-paint');
assert_greater_than_equal(entry.renderTime, beforeRender);
assert_greater_than_equal(performance.now(), entry.renderTime);
assert_equals(entry.startTime, 0);
assert_equals(entry.startTime, entry.renderTime, 'startTime should equal renderTime');
assert_equals(entry.duration, 0);
// Some lower bound: height of at least 12 px.
// Width of at least 100 px.
Expand Down
2 changes: 1 addition & 1 deletion largest-contentful-paint/repeated-image.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
assert_equals(entryList.getEntries().length, 1);
const entry = entryList.getEntries()[0];
assert_equals(entry.entryType, 'largest-contentful-paint');
assert_equals(entry.startTime, 0);
assert_equals(entry.startTime, entry.renderTime, 'startTime should equal renderTime');
assert_equals(entry.duration, 0);
assert_equals(entry.url, path);
assert_less_than(entry.renderTime, performance.now(),
Expand Down

0 comments on commit 7706c8a

Please sign in to comment.