From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../tests/largest-contentful-paint/META.yml | 4 + .../observe-animated-image-gif.tentative.html | 27 ++++ .../observe-animated-image-webp.tentative.html | 27 ++++ .../animated/observe-animated-image.tentative.html | 29 ++++ ...erve-cross-origin-animated-image.tentative.html | 30 ++++ ...-cross-origin-tao-animated-image.tentative.html | 30 ++++ .../observe-non-animated-image.tentative.html | 27 ++++ .../animated/observe-video.tentative.html | 30 ++++ .../largest-contentful-paint/contracted-image.html | 32 ++++ .../cross-origin-image.sub.html | 27 ++++ .../element-only-when-fully-active.html | 18 +++ .../largest-contentful-paint/expanded-image.html | 33 ++++ .../first-letter-background.html | 77 +++++++++ .../first-paint-equals-lcp-text.html | 49 ++++++ .../tests/largest-contentful-paint/idlharness.html | 30 ++++ .../iframe-content-not-observed.html | 25 +++ .../largest-contentful-paint/image-TAO.sub.html | 59 +++++++ .../image-full-viewport.html | 45 ++++++ .../largest-contentful-paint/image-inside-svg.html | 26 ++++ .../image-not-fully-visible.html | 55 +++++++ .../image-removed-before-load.html | 42 +++++ .../largest-contentful-paint/image-src-change.html | 75 +++++++++ .../image-sw-same-origin.https.html | 33 ++++ .../largest-contentful-paint/image-upscaling.html | 107 +++++++++++++ .../initially-invisible-images.html | 63 ++++++++ .../invisible-images-composited-1.html | 32 ++++ .../invisible-images-composited-2.html | 26 ++++ .../largest-contentful-paint/invisible-images.html | 22 +++ .../largest-contentful-paint/larger-image.html | 58 +++++++ .../largest-contentful-paint/larger-text.html | 93 +++++++++++ .../loadTime-after-appendChild.html | 34 ++++ .../mouseover-heuristics-background.tentative.html | 19 +++ .../mouseover-heuristics-element.tentative.html | 18 +++ .../multiple-image-same-src.html | 49 ++++++ .../multiple-redirects-TAO.html | 66 ++++++++ .../non-tao-image-load-after-fcp.tentative.html | 30 ++++ ...age-load-before-fcp-render-after.tentative.html | 36 +++++ ...ge-load-before-fcp-render-at-fcp.tentative.html | 25 +++ ...o-image-subsequent-lcp-candidate.tentative.html | 49 ++++++ .../observe-after-untrusted-scroll.html | 32 ++++ .../observe-css-generated-text.html | 88 +++++++++++ .../largest-contentful-paint/observe-image.html | 27 ++++ .../observe-svg-background-image.html | 39 +++++ .../observe-svg-data-uri-background-image.html | 41 +++++ .../observe-svg-data-uri-image.html | 29 ++++ .../observe-svg-image.html | 27 ++++ .../largest-contentful-paint/observe-text.html | 42 +++++ .../placeholder-image.html | 31 ++++ .../redirects-tao-star.html | 53 +++++++ .../largest-contentful-paint/repeated-image.html | 48 ++++++ .../resources/iframe-stores-entry.html | 12 ++ .../resources/invisible-images.js | 22 +++ .../resources/largest-contentful-paint-helpers.js | 173 +++++++++++++++++++++ .../resources/lcp-sw-from-cache.js | 8 + .../resources/lcp-sw.https.html | 15 ++ .../resources/mouseover-utils.js | 128 +++++++++++++++ .../resources/slow-style-change.py | 9 ++ .../same-origin-redirects.html | 35 +++++ .../supported-lcp-type.html | 17 ++ .../text-with-display-style.html | 76 +++++++++ .../tests/largest-contentful-paint/toJSON.html | 40 +++++ .../update-on-style-change.tentative.html | 38 +++++ .../largest-contentful-paint/video-data-uri.html | 148 ++++++++++++++++++ .../largest-contentful-paint/video-poster.html | 25 +++ .../web-font-styled-text-resize-block.html | 57 +++++++ ...-styled-text-resize-swap-after-interaction.html | 90 +++++++++++ .../web-font-styled-text-resize-swap-smaller.html | 57 +++++++ .../web-font-styled-text-resize-swap-subnode.html | 59 +++++++ .../web-font-styled-text-resize-swap.html | 57 +++++++ 69 files changed, 3080 insertions(+) create mode 100644 testing/web-platform/tests/largest-contentful-paint/META.yml create mode 100644 testing/web-platform/tests/largest-contentful-paint/animated/observe-animated-image-gif.tentative.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/animated/observe-animated-image-webp.tentative.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/animated/observe-animated-image.tentative.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/animated/observe-cross-origin-animated-image.tentative.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/animated/observe-cross-origin-tao-animated-image.tentative.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/animated/observe-non-animated-image.tentative.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/animated/observe-video.tentative.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/contracted-image.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/cross-origin-image.sub.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/element-only-when-fully-active.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/expanded-image.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/first-letter-background.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/first-paint-equals-lcp-text.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/idlharness.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/iframe-content-not-observed.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/image-TAO.sub.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/image-full-viewport.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/image-inside-svg.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/image-not-fully-visible.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/image-removed-before-load.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/image-src-change.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/image-sw-same-origin.https.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/image-upscaling.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/initially-invisible-images.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/invisible-images-composited-1.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/invisible-images-composited-2.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/invisible-images.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/larger-image.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/larger-text.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/loadTime-after-appendChild.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/mouseover-heuristics-background.tentative.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/mouseover-heuristics-element.tentative.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/multiple-image-same-src.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/multiple-redirects-TAO.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/non-tao-image-load-after-fcp.tentative.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/non-tao-image-load-before-fcp-render-after.tentative.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/non-tao-image-load-before-fcp-render-at-fcp.tentative.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/non-tao-image-subsequent-lcp-candidate.tentative.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/observe-after-untrusted-scroll.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/observe-css-generated-text.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/observe-image.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/observe-svg-background-image.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/observe-svg-data-uri-background-image.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/observe-svg-data-uri-image.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/observe-svg-image.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/observe-text.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/placeholder-image.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/redirects-tao-star.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/repeated-image.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/resources/iframe-stores-entry.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/resources/invisible-images.js create mode 100644 testing/web-platform/tests/largest-contentful-paint/resources/largest-contentful-paint-helpers.js create mode 100644 testing/web-platform/tests/largest-contentful-paint/resources/lcp-sw-from-cache.js create mode 100644 testing/web-platform/tests/largest-contentful-paint/resources/lcp-sw.https.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/resources/mouseover-utils.js create mode 100644 testing/web-platform/tests/largest-contentful-paint/resources/slow-style-change.py create mode 100644 testing/web-platform/tests/largest-contentful-paint/same-origin-redirects.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/supported-lcp-type.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/text-with-display-style.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/toJSON.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/update-on-style-change.tentative.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/video-data-uri.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/video-poster.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/web-font-styled-text-resize-block.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/web-font-styled-text-resize-swap-after-interaction.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/web-font-styled-text-resize-swap-smaller.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/web-font-styled-text-resize-swap-subnode.html create mode 100644 testing/web-platform/tests/largest-contentful-paint/web-font-styled-text-resize-swap.html (limited to 'testing/web-platform/tests/largest-contentful-paint') diff --git a/testing/web-platform/tests/largest-contentful-paint/META.yml b/testing/web-platform/tests/largest-contentful-paint/META.yml new file mode 100644 index 0000000000..e11810cc10 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/META.yml @@ -0,0 +1,4 @@ +spec: https://w3c.github.io/largest-contentful-paint/ +suggested_reviewers: + - npm1 + - yoavweiss diff --git a/testing/web-platform/tests/largest-contentful-paint/animated/observe-animated-image-gif.tentative.html b/testing/web-platform/tests/largest-contentful-paint/animated/observe-animated-image-gif.tentative.html new file mode 100644 index 0000000000..a2c0d7975a --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/animated/observe-animated-image-gif.tentative.html @@ -0,0 +1,27 @@ + + + + + Largest Contentful Paint: observe image. + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/animated/observe-animated-image-webp.tentative.html b/testing/web-platform/tests/largest-contentful-paint/animated/observe-animated-image-webp.tentative.html new file mode 100644 index 0000000000..de59d5c5f7 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/animated/observe-animated-image-webp.tentative.html @@ -0,0 +1,27 @@ + + + + + Largest Contentful Paint: observe image. + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/animated/observe-animated-image.tentative.html b/testing/web-platform/tests/largest-contentful-paint/animated/observe-animated-image.tentative.html new file mode 100644 index 0000000000..cf7d262b0f --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/animated/observe-animated-image.tentative.html @@ -0,0 +1,29 @@ + + + + + Largest Contentful Paint: observe image. + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/animated/observe-cross-origin-animated-image.tentative.html b/testing/web-platform/tests/largest-contentful-paint/animated/observe-cross-origin-animated-image.tentative.html new file mode 100644 index 0000000000..993883c607 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/animated/observe-cross-origin-animated-image.tentative.html @@ -0,0 +1,30 @@ + + + + + Largest Contentful Paint: observe image. + + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/animated/observe-cross-origin-tao-animated-image.tentative.html b/testing/web-platform/tests/largest-contentful-paint/animated/observe-cross-origin-tao-animated-image.tentative.html new file mode 100644 index 0000000000..137dde6638 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/animated/observe-cross-origin-tao-animated-image.tentative.html @@ -0,0 +1,30 @@ + + + + + Largest Contentful Paint: observe image. + + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/animated/observe-non-animated-image.tentative.html b/testing/web-platform/tests/largest-contentful-paint/animated/observe-non-animated-image.tentative.html new file mode 100644 index 0000000000..6bbc0958b1 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/animated/observe-non-animated-image.tentative.html @@ -0,0 +1,27 @@ + + + + + Largest Contentful Paint: observe image. + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/animated/observe-video.tentative.html b/testing/web-platform/tests/largest-contentful-paint/animated/observe-video.tentative.html new file mode 100644 index 0000000000..49bdd986f6 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/animated/observe-video.tentative.html @@ -0,0 +1,30 @@ + + + + + Largest Contentful Paint: observe video. + + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/contracted-image.html b/testing/web-platform/tests/largest-contentful-paint/contracted-image.html new file mode 100644 index 0000000000..8816bf4ba9 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/contracted-image.html @@ -0,0 +1,32 @@ + + +Largest Contentful Paint: contracted image bounded by display size. + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/cross-origin-image.sub.html b/testing/web-platform/tests/largest-contentful-paint/cross-origin-image.sub.html new file mode 100644 index 0000000000..0cfdd1791b --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/cross-origin-image.sub.html @@ -0,0 +1,27 @@ + + +Largest Contentful Paint: observe cross-origin images but without renderTime. + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/element-only-when-fully-active.html b/testing/web-platform/tests/largest-contentful-paint/element-only-when-fully-active.html new file mode 100644 index 0000000000..519b249196 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/element-only-when-fully-active.html @@ -0,0 +1,18 @@ + + +Largest Contentful Paint: element is only exposed for fully active documents. + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/expanded-image.html b/testing/web-platform/tests/largest-contentful-paint/expanded-image.html new file mode 100644 index 0000000000..90f803930c --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/expanded-image.html @@ -0,0 +1,33 @@ + + +Largest Contentful Paint: expanded image bounded by intrinsic size. + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/first-letter-background.html b/testing/web-platform/tests/largest-contentful-paint/first-letter-background.html new file mode 100644 index 0000000000..56ac105677 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/first-letter-background.html @@ -0,0 +1,77 @@ + + +Largest Contentful Paint: observe element with background image in its first letter + + + + + + +
A
+ diff --git a/testing/web-platform/tests/largest-contentful-paint/first-paint-equals-lcp-text.html b/testing/web-platform/tests/largest-contentful-paint/first-paint-equals-lcp-text.html new file mode 100644 index 0000000000..50bccd072e --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/first-paint-equals-lcp-text.html @@ -0,0 +1,49 @@ + + +LargestContentfulPaint compared with FirstPaint and FirstContentfulPaint on single text page. + + + + +

Text

+ diff --git a/testing/web-platform/tests/largest-contentful-paint/idlharness.html b/testing/web-platform/tests/largest-contentful-paint/idlharness.html new file mode 100644 index 0000000000..84d1c7ff9a --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/idlharness.html @@ -0,0 +1,30 @@ + +Largest Contentful Paint IDL tests + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/iframe-content-not-observed.html b/testing/web-platform/tests/largest-contentful-paint/iframe-content-not-observed.html new file mode 100644 index 0000000000..e605e9f21f --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/iframe-content-not-observed.html @@ -0,0 +1,25 @@ + + + +Largest Contentful Paint: do NOT observe elements from same-origin iframes + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/image-TAO.sub.html b/testing/web-platform/tests/largest-contentful-paint/image-TAO.sub.html new file mode 100644 index 0000000000..296fe5e65b --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/image-TAO.sub.html @@ -0,0 +1,59 @@ + + +Largest Contentful Paint: observe cross origin images with various Timing-Allow-Origin headers + + + + +
+ + diff --git a/testing/web-platform/tests/largest-contentful-paint/image-full-viewport.html b/testing/web-platform/tests/largest-contentful-paint/image-full-viewport.html new file mode 100644 index 0000000000..e67e21a17c --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/image-full-viewport.html @@ -0,0 +1,45 @@ + + +Largest Contentful Paint: size when image overflows + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/image-inside-svg.html b/testing/web-platform/tests/largest-contentful-paint/image-inside-svg.html new file mode 100644 index 0000000000..77e42fcc6d --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/image-inside-svg.html @@ -0,0 +1,26 @@ + + +Largest Contentful Paint: observe image inside SVG + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/image-not-fully-visible.html b/testing/web-platform/tests/largest-contentful-paint/image-not-fully-visible.html new file mode 100644 index 0000000000..1aee495fe1 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/image-not-fully-visible.html @@ -0,0 +1,55 @@ + + +Largest Contentful Paint: size when image overflows + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/image-removed-before-load.html b/testing/web-platform/tests/largest-contentful-paint/image-removed-before-load.html new file mode 100644 index 0000000000..3e557a4fdc --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/image-removed-before-load.html @@ -0,0 +1,42 @@ + + +Largest Contentful Paint: largest image is reported. + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/image-src-change.html b/testing/web-platform/tests/largest-contentful-paint/image-src-change.html new file mode 100644 index 0000000000..33213a570e --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/image-src-change.html @@ -0,0 +1,75 @@ + + +Largest Contentful Paint: src change triggers new entry. + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/image-sw-same-origin.https.html b/testing/web-platform/tests/largest-contentful-paint/image-sw-same-origin.https.html new file mode 100644 index 0000000000..3f375008c5 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/image-sw-same-origin.https.html @@ -0,0 +1,33 @@ + + +Largest Contentful Paint: same-origin service worker should not be treated as TAO-fail + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/image-upscaling.html b/testing/web-platform/tests/largest-contentful-paint/image-upscaling.html new file mode 100644 index 0000000000..b3ce16f03f --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/image-upscaling.html @@ -0,0 +1,107 @@ + + +Largest Contentful Paint: largest image is reported. + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/initially-invisible-images.html b/testing/web-platform/tests/largest-contentful-paint/initially-invisible-images.html new file mode 100644 index 0000000000..b4d68a5cb9 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/initially-invisible-images.html @@ -0,0 +1,63 @@ + + +Largest Contentful Paint: initially out-of-viewport image gets an LCP entry once they are visible. + + + + + +
+
+ + + + +
+
+ + diff --git a/testing/web-platform/tests/largest-contentful-paint/invisible-images-composited-1.html b/testing/web-platform/tests/largest-contentful-paint/invisible-images-composited-1.html new file mode 100644 index 0000000000..6b33c425b7 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/invisible-images-composited-1.html @@ -0,0 +1,32 @@ + +Largest Contentful Paint: invisible images are not observable + + + + + + + + + +
+
+
diff --git a/testing/web-platform/tests/largest-contentful-paint/invisible-images-composited-2.html b/testing/web-platform/tests/largest-contentful-paint/invisible-images-composited-2.html new file mode 100644 index 0000000000..8ab32ebb1f --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/invisible-images-composited-2.html @@ -0,0 +1,26 @@ + +Largest Contentful Paint: invisible images are not observable + + + + +
+
+
diff --git a/testing/web-platform/tests/largest-contentful-paint/invisible-images.html b/testing/web-platform/tests/largest-contentful-paint/invisible-images.html new file mode 100644 index 0000000000..997d70f777 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/invisible-images.html @@ -0,0 +1,22 @@ + +Largest Contentful Paint: invisible images are not observable + + + + + + + +
+
+
diff --git a/testing/web-platform/tests/largest-contentful-paint/larger-image.html b/testing/web-platform/tests/largest-contentful-paint/larger-image.html new file mode 100644 index 0000000000..948f00d0c6 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/larger-image.html @@ -0,0 +1,58 @@ + + +Largest Contentful Paint: largest image is reported. + + + + + + +

This is some text! :)

+ + + +

More text!

+ + diff --git a/testing/web-platform/tests/largest-contentful-paint/larger-text.html b/testing/web-platform/tests/largest-contentful-paint/larger-text.html new file mode 100644 index 0000000000..8758c1c839 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/larger-text.html @@ -0,0 +1,93 @@ + + +Largest Contentful Paint: largest text is reported. + + + + + + + +
+
+ + + diff --git a/testing/web-platform/tests/largest-contentful-paint/loadTime-after-appendChild.html b/testing/web-platform/tests/largest-contentful-paint/loadTime-after-appendChild.html new file mode 100644 index 0000000000..52d8f0663b --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/loadTime-after-appendChild.html @@ -0,0 +1,34 @@ + + +Largest Contentful Paint: delayed appended image. + + + + + +
+ diff --git a/testing/web-platform/tests/largest-contentful-paint/mouseover-heuristics-background.tentative.html b/testing/web-platform/tests/largest-contentful-paint/mouseover-heuristics-background.tentative.html new file mode 100644 index 0000000000..16cbd0f0cb --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/mouseover-heuristics-background.tentative.html @@ -0,0 +1,19 @@ + + + + LCP mouseover heuristics ignore background-based zoom widgets + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/mouseover-heuristics-element.tentative.html b/testing/web-platform/tests/largest-contentful-paint/mouseover-heuristics-element.tentative.html new file mode 100644 index 0000000000..bbd87235e8 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/mouseover-heuristics-element.tentative.html @@ -0,0 +1,18 @@ + + + + LCP mouseover heuristics ignore element-based zoom widgets + + + + + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/multiple-image-same-src.html b/testing/web-platform/tests/largest-contentful-paint/multiple-image-same-src.html new file mode 100644 index 0000000000..192a7a1dec --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/multiple-image-same-src.html @@ -0,0 +1,49 @@ + + +Largest Contentful Paint:dynamically appended image with different + dimensions but same src triggers new entry. + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/multiple-redirects-TAO.html b/testing/web-platform/tests/largest-contentful-paint/multiple-redirects-TAO.html new file mode 100644 index 0000000000..b9745176bd --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/multiple-redirects-TAO.html @@ -0,0 +1,66 @@ + + + + +This test validates some Timing-Allow-Origin header usage in multiple redirects. + + + + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/non-tao-image-load-after-fcp.tentative.html b/testing/web-platform/tests/largest-contentful-paint/non-tao-image-load-after-fcp.tentative.html new file mode 100644 index 0000000000..06b065be3a --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/non-tao-image-load-after-fcp.tentative.html @@ -0,0 +1,30 @@ + + +Non-Tao Image Load and Render After FCP. + + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/non-tao-image-load-before-fcp-render-after.tentative.html b/testing/web-platform/tests/largest-contentful-paint/non-tao-image-load-before-fcp-render-after.tentative.html new file mode 100644 index 0000000000..57f29c3535 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/non-tao-image-load-before-fcp-render-after.tentative.html @@ -0,0 +1,36 @@ + + +Non-Tao Image Load Before FCP and Render After FCP. + + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/non-tao-image-load-before-fcp-render-at-fcp.tentative.html b/testing/web-platform/tests/largest-contentful-paint/non-tao-image-load-before-fcp-render-at-fcp.tentative.html new file mode 100644 index 0000000000..b209b50c8b --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/non-tao-image-load-before-fcp-render-at-fcp.tentative.html @@ -0,0 +1,25 @@ + + +Non-Tao Image Load Before LCP and Render at the Same Time of FCP. + + + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/non-tao-image-subsequent-lcp-candidate.tentative.html b/testing/web-platform/tests/largest-contentful-paint/non-tao-image-subsequent-lcp-candidate.tentative.html new file mode 100644 index 0000000000..50f9a229ea --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/non-tao-image-subsequent-lcp-candidate.tentative.html @@ -0,0 +1,49 @@ + + +Non-Tao Image Subsequent LCP candidates. + + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/observe-after-untrusted-scroll.html b/testing/web-platform/tests/largest-contentful-paint/observe-after-untrusted-scroll.html new file mode 100644 index 0000000000..c84f922e5e --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/observe-after-untrusted-scroll.html @@ -0,0 +1,32 @@ + + +Largest Contentful Paint: observe image. + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/observe-css-generated-text.html b/testing/web-platform/tests/largest-contentful-paint/observe-css-generated-text.html new file mode 100644 index 0000000000..21ae68585b --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/observe-css-generated-text.html @@ -0,0 +1,88 @@ + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/observe-image.html b/testing/web-platform/tests/largest-contentful-paint/observe-image.html new file mode 100644 index 0000000000..707840671b --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/observe-image.html @@ -0,0 +1,27 @@ + + +Largest Contentful Paint: observe image. + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/observe-svg-background-image.html b/testing/web-platform/tests/largest-contentful-paint/observe-svg-background-image.html new file mode 100644 index 0000000000..bc0b399a18 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/observe-svg-background-image.html @@ -0,0 +1,39 @@ + + +Largest Contentful Paint: observe image. + + + + + + + +
+ + diff --git a/testing/web-platform/tests/largest-contentful-paint/observe-svg-data-uri-background-image.html b/testing/web-platform/tests/largest-contentful-paint/observe-svg-data-uri-background-image.html new file mode 100644 index 0000000000..53fd1b7273 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/observe-svg-data-uri-background-image.html @@ -0,0 +1,41 @@ + + +Largest Contentful Paint: observe image. + + + + + + + +
+ + diff --git a/testing/web-platform/tests/largest-contentful-paint/observe-svg-data-uri-image.html b/testing/web-platform/tests/largest-contentful-paint/observe-svg-data-uri-image.html new file mode 100644 index 0000000000..00ea314e14 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/observe-svg-data-uri-image.html @@ -0,0 +1,29 @@ + + +Largest Contentful Paint: observe image. + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/observe-svg-image.html b/testing/web-platform/tests/largest-contentful-paint/observe-svg-image.html new file mode 100644 index 0000000000..3a6e0f6f23 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/observe-svg-image.html @@ -0,0 +1,27 @@ + + +Largest Contentful Paint: observe SVG image. + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/observe-text.html b/testing/web-platform/tests/largest-contentful-paint/observe-text.html new file mode 100644 index 0000000000..5d0244b7e3 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/observe-text.html @@ -0,0 +1,42 @@ + + +Largest Contentful Paint: observe text. + + + + + + +

This is important text! :)

+ diff --git a/testing/web-platform/tests/largest-contentful-paint/placeholder-image.html b/testing/web-platform/tests/largest-contentful-paint/placeholder-image.html new file mode 100644 index 0000000000..6a2ce5c7c6 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/placeholder-image.html @@ -0,0 +1,31 @@ + + +Largest Contentful Paint: src change triggers new entry. + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/redirects-tao-star.html b/testing/web-platform/tests/largest-contentful-paint/redirects-tao-star.html new file mode 100644 index 0000000000..5607ed792e --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/redirects-tao-star.html @@ -0,0 +1,53 @@ + + + + +This test validates LargestContentfulPaint information for cross-origin redirect chain images. + + + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/repeated-image.html b/testing/web-platform/tests/largest-contentful-paint/repeated-image.html new file mode 100644 index 0000000000..c69cc5b615 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/repeated-image.html @@ -0,0 +1,48 @@ + + +Largest Contentful Paint: repeated image. + + + + + + + +
+ diff --git a/testing/web-platform/tests/largest-contentful-paint/resources/iframe-stores-entry.html b/testing/web-platform/tests/largest-contentful-paint/resources/iframe-stores-entry.html new file mode 100644 index 0000000000..cd60025480 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/resources/iframe-stores-entry.html @@ -0,0 +1,12 @@ + + + +

Text

+ + + diff --git a/testing/web-platform/tests/largest-contentful-paint/resources/invisible-images.js b/testing/web-platform/tests/largest-contentful-paint/resources/invisible-images.js new file mode 100644 index 0000000000..bad078e35f --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/resources/invisible-images.js @@ -0,0 +1,22 @@ +async_test(t => { + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + const observer = new PerformanceObserver( + t.step_func(entryList => { + entryList.getEntries().forEach(entry => { + // May receive a text entry. Ignore that entry. + if (!entry.url) { + return; + } + // The images should not have caused an entry, so fail test. + assert_unreached('Should not have received an entry! Received one with id ' + + entryList.getEntries()[0].id); + }); + }) + ); + observer.observe({type: 'largest-contentful-paint', buffered: true}); + // Images have been added but should not cause entries to be dispatched. + // Wait for 500ms and end test, ensuring no entry was created. + t.step_timeout(() => { + t.done(); + }, 500); +}, 'Images with opacity: 0, visibility: hidden, or display: none are not observable by LargestContentfulPaint.'); diff --git a/testing/web-platform/tests/largest-contentful-paint/resources/largest-contentful-paint-helpers.js b/testing/web-platform/tests/largest-contentful-paint/resources/largest-contentful-paint-helpers.js new file mode 100644 index 0000000000..3ac3705e8e --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/resources/largest-contentful-paint-helpers.js @@ -0,0 +1,173 @@ +const image_delay = 1000; +const delay_pipe_value = image_delay / 1000; + +const await_with_timeout = async (delay, message, promise, cleanup = ()=>{}) => { + let timeout_id; + const timeout = new Promise((_, reject) => { + timeout_id = step_timeout(() => + reject(new DOMException(message, "TimeoutError")), delay) + }); + let result = null; + try { + result = await Promise.race([promise, timeout]); + clearTimeout(timeout_id); + } finally { + cleanup(); + } + return result; +}; + +// Receives an image LargestContentfulPaint |entry| and checks |entry|'s attribute values. +// The |timeLowerBound| parameter is a lower bound on the loadTime value of the entry. +// The |options| parameter may contain some string values specifying the following: +// * 'renderTimeIs0': the renderTime should be 0 (image does not pass Timing-Allow-Origin checks). +// When not present, the renderTime should not be 0 (image passes the checks). +// * 'sizeLowerBound': the |expectedSize| is only a lower bound on the size attribute value. +// When not present, |expectedSize| must be exactly equal to the size attribute value. +// * 'approximateSize': the |expectedSize| is only approximate to the size attribute value. +// This option is mutually exclusive to 'sizeLowerBound'. +function checkImage(entry, expectedUrl, expectedID, expectedSize, timeLowerBound, options = []) { + assert_equals(entry.name, '', "Entry name should be the empty string"); + assert_equals(entry.entryType, 'largest-contentful-paint', + "Entry type should be largest-contentful-paint"); + assert_equals(entry.duration, 0, "Entry duration should be 0"); + // The entry's url can be truncated. + assert_equals(expectedUrl.substr(0, 100), entry.url.substr(0, 100), + `Expected URL ${expectedUrl} should at least start with the entry's URL ${entry.url}`); + assert_equals(entry.id, expectedID, "Entry ID matches expected one"); + assert_equals(entry.element, document.getElementById(expectedID), + "Entry element is expected one"); + if (options.includes('skip')) { + return; + } + if (options.includes('renderTimeIs0')) { + assert_equals(entry.renderTime, 0, 'renderTime should be 0'); + assert_between_exclusive(entry.loadTime, timeLowerBound, performance.now(), + 'loadTime should be between the lower bound and the current time'); + assert_approx_equals(entry.startTime, entry.loadTime, 0.001, + 'startTime should be equal to renderTime to the precision of 1 millisecond.'); + } else { + assert_between_exclusive(entry.loadTime, timeLowerBound, entry.renderTime, + 'loadTime should occur between the lower bound and the renderTime'); + assert_greater_than_equal(performance.now(), entry.renderTime, + 'renderTime should occur before the entry is dispatched to the observer.'); + assert_approx_equals(entry.startTime, entry.renderTime, 0.001, + 'startTime should be equal to renderTime to the precision of 1 millisecond.'); + } + if (options.includes('sizeLowerBound')) { + assert_greater_than(entry.size, expectedSize); + } else if (options.includes('approximateSize')) { + assert_approx_equals(entry.size, expectedSize, 1); + } else{ + assert_equals(entry.size, expectedSize); + } + + if (options.includes('animated')) { + assert_greater_than(entry.loadTime, entry.firstAnimatedFrameTime, + 'firstAnimatedFrameTime should be smaller than loadTime'); + assert_greater_than(entry.renderTime, entry.firstAnimatedFrameTime, + 'firstAnimatedFrameTime should be smaller than renderTime'); + assert_less_than(entry.firstAnimatedFrameTime, image_delay, + 'firstAnimatedFrameTime should be smaller than the delay applied to the second frame'); + assert_greater_than(entry.firstAnimatedFrameTime, 0, + 'firstAnimatedFrameTime should be larger than 0'); + } + if (options.includes('animated-zero')) { + assert_equals(entry.firstAnimatedFrameTime, 0, 'firstAnimatedFrameTime should be 0'); + } +} + +const load_and_observe = url => { + return new Promise(resolve => { + (new PerformanceObserver(entryList => { + for (let entry of entryList.getEntries()) { + if (entry.url == url) { + resolve(entryList.getEntries()[0]); + } + } + })).observe({ type: 'largest-contentful-paint', buffered: true }); + const img = new Image(); + img.id = 'image_id'; + img.src = url; + document.body.appendChild(img); + }); +}; + +const load_video_and_observe = url => { + return new Promise(resolve => { + (new PerformanceObserver(entryList => { + for (let entry of entryList.getEntries()) { + if (entry.url == url) { + resolve(entryList.getEntries()[0]); + } + } + })).observe({ type: 'largest-contentful-paint', buffered: true }); + const video = document.createElement("video"); + video.id = 'video_id'; + video.src = url; + video.autoplay = true; + video.muted = true; + video.loop = true; + document.body.appendChild(video); + }); +}; + +const getLCPStartTime = (identifier) => { + return new Promise(resolve => { + new PerformanceObserver((entryList, observer) => { + entryList.getEntries().forEach(e => { + if (e.url.includes(identifier)) { + resolve(e); + observer.disconnect(); + } + }); + }).observe({ type: 'largest-contentful-paint', buffered: true }); + }); +} + +const getFCPStartTime = () => { + return performance.getEntriesByName('first-contentful-paint')[0]; +} + +const add_text = (text) => { + const paragraph = document.createElement('p'); + paragraph.innerHTML = text; + document.body.appendChild(paragraph); +} + +const loadImage = (url, shouldBeIgnoredForLCP = false) => { + return new Promise(function (resolve, reject) { + let image = document.createElement('img'); + image.addEventListener('load', () => { resolve(image); }); + image.addEventListener('error', reject); + image.src = url; + if (shouldBeIgnoredForLCP) + image.style.opacity = 0; + document.body.appendChild(image); + }); +} + +const checkLCPEntryForNonTaoImages = (times = {}) => { + const lcp = times['lcp']; + const fcp = times['fcp']; + const lcp_url_components = lcp.url.split('/'); + + if (lcp.loadTime <= fcp.startTime) { + assert_approx_equals(lcp.startTime, fcp.startTime, 0.001, + 'LCP start time should be the same as FCP for ' + + lcp_url_components[lcp_url_components.length - 1]) + + ' when LCP load time is less than FCP.'; + } else { + assert_approx_equals(lcp.startTime, lcp.loadTime, 0.001, + 'LCP start time should be the same as LCP load time for ' + + lcp_url_components[lcp_url_components.length - 1]) + + ' when LCP load time is no less than FCP.'; + } + + assert_equals(lcp.renderTime, 0, + 'The LCP render time of Non-Tao image should always be 0.'); +} + +const raf = () => { + return new Promise(resolve => requestAnimationFrame(resolve)); +} diff --git a/testing/web-platform/tests/largest-contentful-paint/resources/lcp-sw-from-cache.js b/testing/web-platform/tests/largest-contentful-paint/resources/lcp-sw-from-cache.js new file mode 100644 index 0000000000..c650a0b747 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/resources/lcp-sw-from-cache.js @@ -0,0 +1,8 @@ +self.addEventListener("fetch", e => { + if (e.request.url.endsWith('green.svg')) { + e.respondWith(new Response(` + + + `, { headers: { 'Content-Type': 'image/svg+xml' } })); + } +}); diff --git a/testing/web-platform/tests/largest-contentful-paint/resources/lcp-sw.https.html b/testing/web-platform/tests/largest-contentful-paint/resources/lcp-sw.https.html new file mode 100644 index 0000000000..069a50eae9 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/resources/lcp-sw.https.html @@ -0,0 +1,15 @@ + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/resources/mouseover-utils.js b/testing/web-platform/tests/largest-contentful-paint/resources/mouseover-utils.js new file mode 100644 index 0000000000..1836f2e4ad --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/resources/mouseover-utils.js @@ -0,0 +1,128 @@ +let counter = 0; +const loadImage = size => { + return event => { + let zoom; + if (location.search.includes("replace")) { + zoom = document.getElementById("image"); + } else { + zoom = new Image(); + } + zoom.src=`/images/green-${size}.png`; + ++counter; + zoom.elementTiming = "zoom" + counter; + document.body.appendChild(zoom); + } +}; +const loadBackgroundImage = size => { + return event => { + const div = document.createElement("div"); + const [width, height] = size.split("x"); + ++counter; + div.style = `background-image: + url(/images/green-${size}.png?${counter}); width: ${width}px; height: ${height}px`; + div.elementTiming = "zoom" + counter; + document.body.appendChild(div); + } +}; + +const registerMouseover = background => { + const image = document.getElementById("image"); + const span = document.getElementById("span"); + const func = background ? loadBackgroundImage : loadImage; + image.addEventListener("mouseover", func("100x50")); + span.addEventListener("mouseover", func("256x256")); +} + +const dispatch_mouseover = () => { + span.dispatchEvent(new Event("mouseover")) +}; + +const wait_for_lcp_entries = async entries_expected => { + await new Promise(resolve => { + let entries_seen = 0; + const PO = new PerformanceObserver(list => { + const entries = list.getEntries(); + for (let entry of entries) { + if (entry.url) { + entries_seen++; + } + } + if (entries_seen == entries_expected) { + PO.disconnect(); + resolve() + } else if (entries_seen > entries_expected) { + PO.disconnect(); + reject(); + } + }); + PO.observe({type: "largest-contentful-paint", buffered: true}); + }); +}; +const wait_for_element_timing_entry = async identifier => { + await new Promise(resolve => { + const PO = new PerformanceObserver(list => { + const entries = list.getEntries(); + for (let entry of entries) { + if (entry.identifier == identifier) { + PO.disconnect(); + resolve() + } + } + }); + PO.observe({type: "element", buffered: true}); + }); +}; +const wait_for_resource_timing_entry = async name => { + await new Promise(resolve => { + const PO = new PerformanceObserver(list => { + const entries = list.getEntries(); + for (let entry of entries) { + if (entry.name.includes(name)) { + PO.disconnect(); + resolve() + } + } + }); + PO.observe({type: "resource", buffered: true}); + }); +}; + +const run_mouseover_test = background => { + promise_test(async t => { + // await the first LCP entry + await wait_for_lcp_entries(1); + // Hover over the image + registerMouseover(background); + if (test_driver) { + await new test_driver.Actions().pointerMove(0, 0, {origin: image}).send(); + } + if (!background) { + await wait_for_element_timing_entry("zoom1"); + } else { + await wait_for_resource_timing_entry("png?1"); + await new Promise(r => requestAnimationFrame(r)); + } + // There's only a single LCP entry, because the zoom was skipped. + await wait_for_lcp_entries(1); + + // Wait 600 ms as the heuristic is 500 ms. + // This will no longer be necessary once the heuristic relies on Task + // Attribution. + await new Promise(r => step_timeout(r, 600)); + + // Hover over the span. + if (test_driver) { + await new test_driver.Actions().pointerMove(0, 0, {origin: span}).send(); + } + if (!background) { + await wait_for_element_timing_entry("zoom2"); + } else { + await wait_for_resource_timing_entry("png?2"); + await new Promise(r => requestAnimationFrame(r)); + } + // There are 2 LCP entries, as the image loaded due to span hover is a + // valid LCP candidate. + await wait_for_lcp_entries(2); + }, `LCP mouseover heuristics ignore ${background ? + "background" : "element"}-based zoom widgets`); +} diff --git a/testing/web-platform/tests/largest-contentful-paint/resources/slow-style-change.py b/testing/web-platform/tests/largest-contentful-paint/resources/slow-style-change.py new file mode 100644 index 0000000000..780d5736c4 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/resources/slow-style-change.py @@ -0,0 +1,9 @@ +import time + +def main(request, response): + time.sleep(1) + return [ ("Content-Type", "text/css")], """ + #text { + font-size: 4em; + } + """ diff --git a/testing/web-platform/tests/largest-contentful-paint/same-origin-redirects.html b/testing/web-platform/tests/largest-contentful-paint/same-origin-redirects.html new file mode 100644 index 0000000000..b5cf9da2d1 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/same-origin-redirects.html @@ -0,0 +1,35 @@ + + + + +This test validates LargestContentfulPaint for same-origin redirect chain. + + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/supported-lcp-type.html b/testing/web-platform/tests/largest-contentful-paint/supported-lcp-type.html new file mode 100644 index 0000000000..25d4eaa036 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/supported-lcp-type.html @@ -0,0 +1,17 @@ + + +PerformanceObserver.supportedEntryTypes contains "largest-contentful-paint" + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/text-with-display-style.html b/testing/web-platform/tests/largest-contentful-paint/text-with-display-style.html new file mode 100644 index 0000000000..69edc168c5 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/text-with-display-style.html @@ -0,0 +1,76 @@ + + +Largest Contentful Paint: observe text with display style. + + + + +

I am a title!

+ + diff --git a/testing/web-platform/tests/largest-contentful-paint/toJSON.html b/testing/web-platform/tests/largest-contentful-paint/toJSON.html new file mode 100644 index 0000000000..5ea84eeb2b --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/toJSON.html @@ -0,0 +1,40 @@ + + +Largest Contentful Paint: toJSON + + + +

Text!

+ + diff --git a/testing/web-platform/tests/largest-contentful-paint/update-on-style-change.tentative.html b/testing/web-platform/tests/largest-contentful-paint/update-on-style-change.tentative.html new file mode 100644 index 0000000000..dd34e61b0f --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/update-on-style-change.tentative.html @@ -0,0 +1,38 @@ + + +LargestContentfulPaint entries should generate for updates to previous LargestContentfulPaint nodes. + + + + + +
text
+ + diff --git a/testing/web-platform/tests/largest-contentful-paint/video-data-uri.html b/testing/web-platform/tests/largest-contentful-paint/video-data-uri.html new file mode 100644 index 0000000000..a26ddd1420 --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/video-data-uri.html @@ -0,0 +1,148 @@ + + +This test verifies a video element of data uri src triggers an LCP entry + to be emitted + + + + + + + + + + diff --git a/testing/web-platform/tests/largest-contentful-paint/video-poster.html b/testing/web-platform/tests/largest-contentful-paint/video-poster.html new file mode 100644 index 0000000000..fdc691819b --- /dev/null +++ b/testing/web-platform/tests/largest-contentful-paint/video-poster.html @@ -0,0 +1,25 @@ + + +Largest Contentful Paint: observe video poster image + + + + +