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 --- .../paint-timing/with-first-paint/basetest.html | 48 ++++++++++++++ .../with-first-paint/border-image.html | 28 ++++++++ .../with-first-paint/buffered-flag.window.js | 36 ++++++++++ .../child-painting-first-image.html | 46 +++++++++++++ .../first-contentful-bg-image.html | 43 ++++++++++++ .../first-contentful-canvas-webgl2.html | 47 +++++++++++++ .../with-first-paint/first-contentful-canvas.html | 43 ++++++++++++ .../with-first-paint/first-contentful-image.html | 42 ++++++++++++ .../with-first-paint/first-contentful-paint.html | 76 ++++++++++++++++++++++ .../with-first-paint/first-contentful-svg.html | 42 ++++++++++++ .../with-first-paint/first-image-child.html | 45 +++++++++++++ .../with-first-paint/first-paint-bg-color.html | 39 +++++++++++ .../with-first-paint/first-paint-only.html | 42 ++++++++++++ .../paint-timing/with-first-paint/mask-image.html | 27 ++++++++ .../with-first-paint/paint-visited.html | 48 ++++++++++++++ .../sibling-painting-first-image.html | 54 +++++++++++++++ 16 files changed, 706 insertions(+) create mode 100644 testing/web-platform/tests/paint-timing/with-first-paint/basetest.html create mode 100644 testing/web-platform/tests/paint-timing/with-first-paint/border-image.html create mode 100644 testing/web-platform/tests/paint-timing/with-first-paint/buffered-flag.window.js create mode 100644 testing/web-platform/tests/paint-timing/with-first-paint/child-painting-first-image.html create mode 100644 testing/web-platform/tests/paint-timing/with-first-paint/first-contentful-bg-image.html create mode 100644 testing/web-platform/tests/paint-timing/with-first-paint/first-contentful-canvas-webgl2.html create mode 100644 testing/web-platform/tests/paint-timing/with-first-paint/first-contentful-canvas.html create mode 100644 testing/web-platform/tests/paint-timing/with-first-paint/first-contentful-image.html create mode 100644 testing/web-platform/tests/paint-timing/with-first-paint/first-contentful-paint.html create mode 100644 testing/web-platform/tests/paint-timing/with-first-paint/first-contentful-svg.html create mode 100644 testing/web-platform/tests/paint-timing/with-first-paint/first-image-child.html create mode 100644 testing/web-platform/tests/paint-timing/with-first-paint/first-paint-bg-color.html create mode 100644 testing/web-platform/tests/paint-timing/with-first-paint/first-paint-only.html create mode 100644 testing/web-platform/tests/paint-timing/with-first-paint/mask-image.html create mode 100644 testing/web-platform/tests/paint-timing/with-first-paint/paint-visited.html create mode 100644 testing/web-platform/tests/paint-timing/with-first-paint/sibling-painting-first-image.html (limited to 'testing/web-platform/tests/paint-timing/with-first-paint') diff --git a/testing/web-platform/tests/paint-timing/with-first-paint/basetest.html b/testing/web-platform/tests/paint-timing/with-first-paint/basetest.html new file mode 100644 index 0000000000..759dfaa97a --- /dev/null +++ b/testing/web-platform/tests/paint-timing/with-first-paint/basetest.html @@ -0,0 +1,48 @@ + + +Performance Paint Timing Test + + + + +
+ + + + diff --git a/testing/web-platform/tests/paint-timing/with-first-paint/border-image.html b/testing/web-platform/tests/paint-timing/with-first-paint/border-image.html new file mode 100644 index 0000000000..4abccfe8e8 --- /dev/null +++ b/testing/web-platform/tests/paint-timing/with-first-paint/border-image.html @@ -0,0 +1,28 @@ + + + + + + +
+ + diff --git a/testing/web-platform/tests/paint-timing/with-first-paint/buffered-flag.window.js b/testing/web-platform/tests/paint-timing/with-first-paint/buffered-flag.window.js new file mode 100644 index 0000000000..0b7c8bea2e --- /dev/null +++ b/testing/web-platform/tests/paint-timing/with-first-paint/buffered-flag.window.js @@ -0,0 +1,36 @@ +setup({"hide_test_state": true}); +async_test(t => { + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); + // First observer creates second in callback to ensure the entry has been dispatched by the time + // the second observer begins observing. + let entries_seen = 0; + new PerformanceObserver(firstList => { + entries_seen += firstList.getEntries().length; + // Abort if we have not yet received both paint entries. + if (entries_seen < 2) + return; + + // Second observer requires 'buffered: true' to see the entries. + let firstPaintSeen = false; + let firstContentfulPaintSeen = false; + new PerformanceObserver(list => { + list.getEntries().forEach(t.step_func(entry => { + assert_equals(entry.entryType, 'paint'); + if (entry.name === 'first-paint') + firstPaintSeen = true; + else if (entry.name === 'first-contentful-paint') + firstContentfulPaintSeen = true; + else + assert_unreached('The observer should only see first paint or first contentful paint!'); + + if (firstPaintSeen && firstContentfulPaintSeen) + t.done(); + })); + }).observe({'type': 'paint', buffered: true}); + }).observe({'entryTypes': ['paint']}); + + // Trigger the first paint entries + const img = document.createElement("IMG"); + img.src = "resources/circles.png"; + document.body.appendChild(img); +}, "PerformanceObserver with buffered flag sees previous paint entries."); diff --git a/testing/web-platform/tests/paint-timing/with-first-paint/child-painting-first-image.html b/testing/web-platform/tests/paint-timing/with-first-paint/child-painting-first-image.html new file mode 100644 index 0000000000..92a926a2b9 --- /dev/null +++ b/testing/web-platform/tests/paint-timing/with-first-paint/child-painting-first-image.html @@ -0,0 +1,46 @@ + + + + + + + + diff --git a/testing/web-platform/tests/paint-timing/with-first-paint/first-contentful-bg-image.html b/testing/web-platform/tests/paint-timing/with-first-paint/first-contentful-bg-image.html new file mode 100644 index 0000000000..40eaa635bb --- /dev/null +++ b/testing/web-platform/tests/paint-timing/with-first-paint/first-contentful-bg-image.html @@ -0,0 +1,43 @@ + + +Performance Paint Timing Test: FCP due to background image + + + + +
+ + +