From 29f7faef46baf425ce17f1e7d6fa581ce31869df Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Fri, 4 Oct 2019 17:48:44 +0000 Subject: [PATCH] =?UTF-8?q?Bug=201551447=20[wpt=20PR=2016451]=20-=20Update?= =?UTF-8?q?=20noopener=20tests=20to=20match=20spec=20rules=20for=20choosin?= =?UTF-8?q?g=20a=20browsing=20con=E2=80=A6,=20a=3Dtestonly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automatic update from web-platform-tests HTML: correct noopener tests In particular, if a name is given use that first and potentially reuse a window. Closes https://github.com/whatwg/html/issues/1826. -- wpt-commits: 0c79d0d99c720f679fa089374971778e461e6662 wpt-pr: 16451 UltraBlame original commit: f2b4dc0d863dcdd1768145f1fa83462cf9a9271c --- .../window-open-noopener.html | 69 ++++++++++++------- .../htmlanchorelement_noopener.html | 20 +++--- 2 files changed, 57 insertions(+), 32 deletions(-) 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 5da66c3c810a..28ad123ba4f6 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 @@ -144,7 +144,6 @@ noopener ' should -not reuse existing target @@ -154,7 +153,7 @@ " noopener " -shouldReuse +shouldReturnWindow : false } @@ -178,7 +177,7 @@ = 1 " -shouldReuse +shouldReturnWindow : false } @@ -201,7 +200,7 @@ = 0 " -shouldReuse +shouldReturnWindow : true } @@ -210,16 +209,12 @@ : " noopener -needs -to -be -present -as -a -token -on -its -own +separated +only +by +spaces +should +work " secondWindowFeatureString : @@ -228,9 +223,9 @@ me noopener " -shouldReuse +shouldReturnWindow : -true +false } { testDescription @@ -252,7 +247,7 @@ r noopener " -shouldReuse +shouldReturnWindow : false } @@ -276,7 +271,7 @@ hey there " -shouldReuse +shouldReturnWindow : false } @@ -298,7 +293,30 @@ hey there " -shouldReuse +shouldReturnWindow +: +false +} +{ +testDescription +: +" +noreferrer +should +also +suppress +opener +when +reusing +existing +target +" +secondWindowFeatureString +: +" +noreferrer +" +shouldReturnWindow : false } @@ -509,7 +527,7 @@ ( test . -shouldReuse +shouldReturnWindow ) { t @@ -706,10 +724,10 @@ data . haveOpener -false +true " Should -not +still have opener " @@ -723,7 +741,7 @@ window ) ; -assert_equals +assert_not_equals ( w1 . @@ -735,6 +753,11 @@ : blank " +" +Should +have +navigated +" ) ; } diff --git a/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html b/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html index fa651e729853..6d423f5411c1 100644 --- a/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html +++ b/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html @@ -410,9 +410,11 @@ special targets above -in -fact -ignores +is +still +able +to +reuse existing things with @@ -535,7 +537,7 @@ a given name -ignores +reuses an existing window @@ -596,7 +598,7 @@ . data ; -assert_false +assert_true ( data . @@ -628,7 +630,7 @@ window ) ; -assert_equals +assert_not_equals ( w . @@ -710,7 +712,7 @@ a given name -ignores +reuses an existing subframe @@ -758,7 +760,7 @@ hasOpener ) ; -assert_false +assert_true ( data . @@ -775,7 +777,7 @@ " ) ; -assert_equals +assert_not_equals ( document .