From 8ae7186836bd7b938711ac93df98a6608020210c Mon Sep 17 00:00:00 2001 From: Mason Freed Date: Fri, 18 Mar 2022 10:43:51 +0000 Subject: [PATCH] Bug 1757777 [wpt PR 33029] - Add "true" to truthy values list for windowFeatures, a=testonly Automatic update from web-platform-tests Add "true" to truthy values list for windowFeatures Prior to this CL, window.open(url, '', 'noopener=true') would treat 'noopener=true' as if noopener is false. This is currently per-spec [1] but there is a desire [2][3] to change that. The I2S is here: https://groups.google.com/a/chromium.org/g/blink-dev/c/ePJ4GE6VzVc/m/urs3-4rHDAAJ [1] https://html.spec.whatwg.org/multipage/window-object.html#concept-window-open-features-parse-boolean [2] https://github.com/whatwg/html/pull/7425 [3] https://github.com/whatwg/html/issues/7399 Fixed: 1277613 Change-Id: I5b3a7e985a9bb392c2150846b50369cfcd9b05fa Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3495659 Reviewed-by: Joey Arhar Commit-Queue: Mason Freed Cr-Commit-Position: refs/heads/main@{#977722} -- wpt-commits: 2026041556d8c61e167d0a0d3d0bbbeaf99dcd70 wpt-pr: 33029 --- .../open-features-is-popup-condition.html | 13 ++++ .../support/windowFeature-values-target.html | 24 +++++++ .../window-open-noopener.html | 3 + .../window-open-windowfeatures-values.html | 72 +++++++++++++++++++ 4 files changed, 112 insertions(+) create mode 100644 testing/web-platform/tests/html/browsers/the-window-object/support/windowFeature-values-target.html create mode 100644 testing/web-platform/tests/html/browsers/the-window-object/window-open-windowfeatures-values.html diff --git a/testing/web-platform/tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-is-popup-condition.html b/testing/web-platform/tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-is-popup-condition.html index 3959b618e1d0b..4f52e2e8de64f 100644 --- a/testing/web-platform/tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-is-popup-condition.html +++ b/testing/web-platform/tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-is-popup-condition.html @@ -26,48 +26,59 @@ // The explicit popup feature. ["popup", false], ["popup=1", false], + ["popup=true", false], ["popup=0", true], // Other feature alone results in popup. ["location", false], ["location=yes", false], + ["location=true", false], ["location=no", false], ["toolbar", false], ["toolbar=yes", false], + ["toolbar=true", false], ["toolbar=no", false], ["menubar", false], ["menubar=yes", false], + ["menubar=true", false], ["menubar=no", false], ["resizable", false], ["resizable=yes", false], + ["resizable=true", false], ["resizable=no", false], ], "single-2": [ ["scrollbars", false], ["scrollbars=yes", false], + ["scrollbars=true", false], ["scrollbars=no", false], ["status", false], ["status=yes", false], + ["status=true", false], ["status=no", false], ["titlebar", false], ["titlebar=yes", false], + ["titlebar=true", false], ["titlebar=no", false], ["close", false], ["close=yes", false], + ["close=true", false], ["close=no", false], ["minimizable", false], ["minimizable=yes", false], + ["minimizable=true", false], ["minimizable=no", false], ["personalbar", false], ["personalbar=yes", false], + ["personalbar=true", false], ["personalbar=no", false], ], "position": [ @@ -113,6 +124,8 @@ // The explicit popup feature has priority than others. ["popup=1,location,toolbar,menubar,resizable,scrollbars,status", false], + ["popup=yes,location,toolbar,menubar,resizable,scrollbars,status", false], + ["popup=true,location,toolbar,menubar,resizable,scrollbars,status", false], ["popup=0,location,toolbar,menubar,resizable,scrollbars", true], ], }; diff --git a/testing/web-platform/tests/html/browsers/the-window-object/support/windowFeature-values-target.html b/testing/web-platform/tests/html/browsers/the-window-object/support/windowFeature-values-target.html new file mode 100644 index 0000000000000..3a78ddf660544 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/the-window-object/support/windowFeature-values-target.html @@ -0,0 +1,24 @@ + diff --git a/testing/web-platform/tests/html/browsers/the-window-object/window-open-noopener.html b/testing/web-platform/tests/html/browsers/the-window-object/window-open-noopener.html index c3c706605492c..8d3a95df630ea 100644 --- a/testing/web-platform/tests/html/browsers/the-window-object/window-open-noopener.html +++ b/testing/web-platform/tests/html/browsers/the-window-object/window-open-noopener.html @@ -18,6 +18,9 @@ { testDescription: "noopener=1 means the same as noopener", secondWindowFeatureString: "noopener=1", shouldReturnWindow: false }, + { testDescription: "noopener=true means the same as noopener", + secondWindowFeatureString: "noopener=true", + shouldReturnWindow: false }, { testDescription: "noopener=0 means lack of noopener", secondWindowFeatureString: "noopener=0", shouldReturnWindow: true }, diff --git a/testing/web-platform/tests/html/browsers/the-window-object/window-open-windowfeatures-values.html b/testing/web-platform/tests/html/browsers/the-window-object/window-open-windowfeatures-values.html new file mode 100644 index 0000000000000..32551dd8d70f1 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/the-window-object/window-open-windowfeatures-values.html @@ -0,0 +1,72 @@ + + + +window.open() windowFeature value parsing + + + + +