Skip to content

Commit cc60e0d

Browse files
Increase the amount of the soft nav paint area for two more WPT tests.
For visited-link.tentative.html, use a longer .innerText, to cause a larger paint, much like in https://chromium-review.googlesource.com/c/chromium/src/+/6513813. to support the updated criteria for soft navs in https://chromium-review.googlesource.com/c/chromium/src/+/6492746. Similarly, increase the painted area for the softnav in text-lcp-followed-by-anim-image-softnav-lcp.tentative.html. In my instrumentated run, I saw that the required_paint_area was 7690, whereas the size of the png is only 100x50 = 5000. So this change adds the image with size and width specified, so now it's 500x500 = 250000. Bug: 378148364 Change-Id: If27f78520208fff54d991dce031ae1437cd55cc6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6516042 Reviewed-by: Michal Mocny <mmocny@chromium.org> Reviewed-by: Scott Haseley <shaseley@chromium.org> Commit-Queue: Johannes Henkel <johannes@chromium.org> Cr-Commit-Position: refs/heads/main@{#1456517}
1 parent 8b44406 commit cc60e0d

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

soft-navigation-heuristics/text-lcp-followed-by-anim-image-softnav-lcp.tentative.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@
2121
addContent: async () => {
2222
const main = document.getElementById("main");
2323
main.removeChild(document.getElementsByTagName("div")[0]);
24-
await addImageToMain("anim-gr.png");
24+
const img = new Image(500, 500);
25+
img.src = "/images/anim-gr.png?" + Math.random();
26+
img.id = "imagelcp";
27+
img.setAttribute("elementtiming", "imagelcp");
28+
main.appendChild(img);
2529
},
2630
link: link,
27-
test: "Test that a text LCP followup by a smaller soft navigation image"
28-
+ " LCP properly queues an LCP entry"});
31+
test: "Test that a text LCP followup by an animaged image "
32+
+ " properly queues a soft navigation entry"});
2933
</script>
3034
</body>
3135
</html>
32-

soft-navigation-heuristics/visited-link.tentative.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,15 @@
2424
}));
2525
const main = document.getElementById("main");
2626
const div = document.createElement("div");
27-
const text = document.createTextNode("Lorem Ipsum");
27+
const text = document.createTextNode(
28+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, ' +
29+
'sed do eiusmod tempor incididunt ut labore et dolore magna ' +
30+
'aliqua. Ut enim ad minim veniam, quis nostrud exercitation ' +
31+
'ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis ' +
32+
'aute irure dolor in reprehenderit in voluptate velit esse ' +
33+
'cillum dolore eu fugiat nulla pariatur. Excepteur sint ' +
34+
'occaecat cupidatat non proident, sunt in culpa qui officia ' +
35+
'deserunt mollit anim id est laborum.');
2836
div.appendChild(text);
2937
main.appendChild(div);
3038
}

0 commit comments

Comments
 (0)