Commit 95daee68 authored by Steve Kobes's avatar Steve Kobes Committed by Commit Bot

Reenable LCP subframe input test with flake workaround.

The test now waits for an IntersectionObserver notification to ensure
that the subframe receives the SetViewportIntersection IPC before the
first image paint occurs.

Bug: 1115529,1135527,1149053
Change-Id: Idb3999b8adbee004c9d88fb7a8bc06e470bf1c87
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2538316Reviewed-by: default avatarNicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Steve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827800}
parent fb0e3203
<div><img src="images/green-16x16.png"></div>
<div><img id="img1"></div>
<div id="container"></div>
<script>
var last_url = null;
const test_step_1 = async () => {
// Workaround for crbug.com/1149053: wait for IntersectionObserver to say
// that we are visible before loading the <img>.
await new Promise(resolve => {
new IntersectionObserver(list => {
if (list.some(e => e.isIntersecting))
resolve();
}).observe(container);
});
img1.src = "images/green-16x16.png";
return new Promise(resolve => {
new PerformanceObserver(list => {
resolve(last_url = list.getEntries()[0].url.match(/images\/(.*)/)[1]);
......
......@@ -132,9 +132,8 @@ IN_PROC_BROWSER_TEST_F(MetricIntegrationTest, LargestContentfulPaint) {
lcp_timestamps[2].value());
}
// TODO(crbug.com/1135527): Flaky.
IN_PROC_BROWSER_TEST_F(MetricIntegrationTest,
DISABLED_LargestContentfulPaint_SubframeInput) {
LargestContentfulPaint_SubframeInput) {
Start();
Load("/lcp_subframe_input.html");
auto* sub = ChildFrameAt(web_contents()->GetMainFrame(), 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment