From ae9c3b72487621ada9e7212f3b2f28ac4da0eaf9 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Sat, 16 Dec 2023 00:50:33 +0000 Subject: [PATCH] Bug 1867404 [wpt PR 43436] - Move popover=hint related code out of non-tentative test, a=testonly Automatic update from web-platform-tests Move popover=hint related code out of non-tentative test This refactors the test logic into a shared JS file and splits the popover=hint test code into a new .tentative.html file. Per this comment: https://github.com/web-platform-tests/interop/issues/423#issuecomment-1832409034 Bug: 1416284 Change-Id: Idda2716c476cf3d9b8fea724ece6e48d66e1fb62 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5074321 Auto-Submit: Mason Freed Commit-Queue: Joey Arhar Reviewed-by: Joey Arhar Cr-Commit-Position: refs/heads/main{#1234222} -- wpt-commits: fcd111f4f95c9dae1d0dd7f938fe427699534bc0 wpt-pr: 43436 UltraBlame original commit: 86d6622633a3fc6fae712f86f82871e1bae69e87 --- ...ver-invoking-attribute-hint.tentative.html | 19 +++ .../popovers/popover-invoking-attribute.html | 125 +----------------- .../resources/popover-invoking-attribute.js | 122 +++++++++++++++++ 3 files changed, 143 insertions(+), 123 deletions(-) create mode 100644 testing/web-platform/tests/html/semantics/popovers/popover-invoking-attribute-hint.tentative.html create mode 100644 testing/web-platform/tests/html/semantics/popovers/resources/popover-invoking-attribute.js diff --git a/testing/web-platform/tests/html/semantics/popovers/popover-invoking-attribute-hint.tentative.html b/testing/web-platform/tests/html/semantics/popovers/popover-invoking-attribute-hint.tentative.html new file mode 100644 index 0000000000000..b531ddc460e83 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/popovers/popover-invoking-attribute-hint.tentative.html @@ -0,0 +1,19 @@ + + +Popover invoking attribute + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/html/semantics/popovers/popover-invoking-attribute.html b/testing/web-platform/tests/html/semantics/popovers/popover-invoking-attribute.html index 22e7dc14a17f1..8e312e90d7af1 100644 --- a/testing/web-platform/tests/html/semantics/popovers/popover-invoking-attribute.html +++ b/testing/web-platform/tests/html/semantics/popovers/popover-invoking-attribute.html @@ -11,134 +11,13 @@ + - -
This is popover #1
diff --git a/testing/web-platform/tests/html/semantics/popovers/resources/popover-invoking-attribute.js b/testing/web-platform/tests/html/semantics/popovers/resources/popover-invoking-attribute.js new file mode 100644 index 0000000000000..801ee64337163 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/popovers/resources/popover-invoking-attribute.js @@ -0,0 +1,122 @@ +const actionReflectionLogic = (action) => { + switch (action?.toLowerCase()) { + case "show": return "show"; + case "hide": return "hide"; + default: return "toggle"; + } +} +const noActivationLogic = (action) => { + return "none"; +} +function makeElementWithType(element,type) { + return (test) => { + const el = Object.assign(document.createElement(element),{type}); + document.body.appendChild(el); + test.add_cleanup(() => el.remove()); + return el; + }; +} +const supportedButtonTypes = ['button','reset','submit',''].map(type => { + return { + name: `