From fa843523ba0062569f6bbdd365abc033f5b95e5a Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Fri, 4 Oct 2019 01:43:15 +0000 Subject: [PATCH] Bug 1527139 [wpt PR 15188] - HTML: target=_blank implies noopener; opener support, a=testonly Automatic update from web-platform-tests HTML: target=_blank implies noopener; opener support (#15188) For https://github.com/whatwg/html/pull/4330. -- wpt-commits: e81ca209b45fbe73c1bb7a20e1c7af51ef46258b wpt-pr: 15188 UltraBlame original commit: de035411df5175e229feddb7f1cf2f17eeafb872 --- ...ml => target_blank_implicit_noopener.html} | 0 .../target_blank_implicit_noopener.html | 1084 +++++++++++++++++ ... target_blank_implicit_noopener_base.html} | 264 +++- 3 files changed, 1283 insertions(+), 65 deletions(-) rename testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/support/{target_blank_iplicit_noopener.html => target_blank_implicit_noopener.html} (100%) create mode 100644 testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html rename testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/{target_blank_implicit_noopener.tentative.html => target_blank_implicit_noopener_base.html} (76%) diff --git a/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/support/target_blank_iplicit_noopener.html b/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/support/target_blank_implicit_noopener.html similarity index 100% rename from testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/support/target_blank_iplicit_noopener.html rename to testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/support/target_blank_implicit_noopener.html diff --git a/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html b/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html new file mode 100644 index 0000000000000..85c2c5e1a2a7b --- /dev/null +++ b/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html @@ -0,0 +1,1084 @@ +< +! +DOCTYPE +html +> +< +html +> +< +head +> +< +meta +charset += +utf +- +8 +> +< +title +> +Test +behavior +of +target += +_blank +links +< +/ +title +> +< +script +src += +/ +resources +/ +testharness +. +js +> +< +/ +script +> +< +script +src += +/ +resources +/ +testharnessreport +. +js +> +< +/ +script +> +< +/ +head +> +< +body +> +< +a +href += +" +support +/ +target_blank_implicit_noopener +. +html +? +a1 +" +id += +" +a1 +" +rel += +" +noopener +" +target += +" +_blank +" +> +Click +me +< +/ +a +> +< +a +href += +" +support +/ +target_blank_implicit_noopener +. +html +? +a2 +" +id += +" +a2 +" +rel += +" +opener +" +target += +" +_blank +" +> +Click +me +< +/ +a +> +< +a +href += +" +support +/ +target_blank_implicit_noopener +. +html +? +a3 +" +id += +" +a3 +" +target += +" +_blank +" +> +Click +me +< +/ +a +> +< +a +href += +" +support +/ +target_blank_implicit_noopener +. +html +? +a4 +" +id += +" +a4 +" +rel += +" +opener +noopener +" +target += +" +_blank +" +> +Click +me +< +/ +a +> +< +a +href += +" +support +/ +target_blank_implicit_noopener +. +html +? +a5 +" +id += +" +a5 +" +rel += +" +noopener +opener +" +target += +" +_blank +" +> +Click +me +< +/ +a +> +< +a +href += +" +support +/ +target_blank_implicit_noopener +. +html +? +a6 +" +id += +" +a6 +" +rel += +" +noreferrer +" +target += +" +_blank +" +> +Click +me +< +/ +a +> +< +a +href += +" +support +/ +target_blank_implicit_noopener +. +html +? +a7 +" +id += +" +a7 +" +rel += +" +opener +noreferrer +" +target += +" +_blank +" +> +Click +me +< +/ +a +> +< +a +href += +" +support +/ +target_blank_implicit_noopener +. +html +? +a8 +" +id += +" +a8 +" +rel += +" +noopener +opener +noreferrer +" +target += +" +_blank +" +> +Click +me +< +/ +a +> +< +img +src += +" +/ +images +/ +threecolors +. +png +" +/ +> +< +area +shape += +" +rect +" +coords += +" +0 +0 +99 +50 +" +href += +" +support +/ +target_blank_implicit_noopener +. +html +? +area1 +" +id += +" +area1 +" +rel += +" +noopener +" +target += +" +_blank +" +/ +> +< +/ +img +> +< +img +src += +" +/ +images +/ +threecolors +. +png +" +/ +> +< +area +shape += +" +rect +" +coords += +" +0 +0 +99 +50 +" +href += +" +support +/ +target_blank_implicit_noopener +. +html +? +area2 +" +id += +" +area2 +" +rel += +" +opener +" +target += +" +_blank +" +/ +> +< +/ +img +> +< +img +src += +" +/ +images +/ +threecolors +. +png +" +/ +> +< +area +shape += +" +rect +" +coords += +" +0 +0 +99 +50 +" +href += +" +support +/ +target_blank_implicit_noopener +. +html +? +area3 +" +id += +" +area3 +" +target += +" +_blank +" +/ +> +< +/ +img +> +< +img +src += +" +/ +images +/ +threecolors +. +png +" +/ +> +< +area +shape += +" +rect +" +coords += +" +0 +0 +99 +50 +" +href += +" +support +/ +target_blank_implicit_noopener +. +html +? +area4 +" +id += +" +area4 +" +rel += +" +opener +noopener +" +target += +" +_blank +" +/ +> +< +/ +img +> +< +img +src += +" +/ +images +/ +threecolors +. +png +" +/ +> +< +area +shape += +" +rect +" +coords += +" +0 +0 +99 +50 +" +href += +" +support +/ +target_blank_implicit_noopener +. +html +? +area5 +" +id += +" +area5 +" +rel += +" +noopener +opener +" +target += +" +_blank +" +/ +> +< +/ +img +> +< +script +> +let +tests += +[ +{ +id +: +" +a1 +" +hasOpener +: +false +name +: +" +Anchor +element +with +target += +_blank +with +rel += +noopener +" +} +{ +id +: +" +a2 +" +hasOpener +: +true +name +: +" +Anchor +element +with +target += +_blank +with +rel += +opener +" +} +{ +id +: +" +a3 +" +hasOpener +: +false +name +: +" +Anchor +element +with +target += +_blank +with +implicit +rel += +noopener +" +} +{ +id +: +" +a4 +" +hasOpener +: +false +name +: +" +Anchor +element +with +target += +_blank +with +rel += +opener ++ +noopener +" +} +{ +id +: +" +a5 +" +hasOpener +: +false +name +: +" +Anchor +element +with +target += +_blank +with +rel += +noopener ++ +opener +" +} +{ +id +: +" +a6 +" +hasOpener +: +false +name +: +" +Anchor +element +with +target += +_blank +with +rel += +noreferrer +" +} +{ +id +: +" +a7 +" +hasOpener +: +false +name +: +" +Anchor +element +with +target += +_blank +with +rel += +opener ++ +noreferrer +" +} +{ +id +: +" +a8 +" +hasOpener +: +false +name +: +" +Anchor +element +with +target += +_blank +with +rel += +noopener ++ +opener ++ +noreferrer +" +} +{ +id +: +" +area1 +" +hasOpener +: +false +name +: +" +Area +element +with +target += +_blank +with +rel += +noopener +" +} +{ +id +: +" +area2 +" +hasOpener +: +true +name +: +" +Area +element +with +target += +_blank +with +rel += +opener +" +} +{ +id +: +" +area3 +" +hasOpener +: +false +name +: +" +Area +element +with +target += +_blank +with +implicit +rel += +noopener +" +} +{ +id +: +" +area4 +" +hasOpener +: +false +name +: +" +Area +element +with +target += +_blank +with +rel += +opener ++ +noopener +" +} +{ +id +: +" +area5 +" +hasOpener +: +false +name +: +" +Area +element +with +target += +_blank +with +rel += +noopener ++ +opener +" +} +] +; +tests +. +forEach +( +data += +> +{ +async_test +( +test += +> +{ +let +bc += +new +BroadcastChannel +( +data +. +id +) +; +bc +. +addEventListener +( +" +message +" +test +. +step_func_done +( +e += +> +{ +assert_equals +( +e +. +data +. +hasOpener +data +. +hasOpener +) +; +} +) +{ +once +: +true +} +) +; +document +. +getElementById +( +data +. +id +) +. +click +( +) +; +} +data +. +name +) +; +} +) +; +< +/ +script +> +< +/ +body +> +< +/ +html +> diff --git a/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.tentative.html b/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener_base.html similarity index 76% rename from testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.tentative.html rename to testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener_base.html index e97d26c0a974a..12e0a997348e6 100644 --- a/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.tentative.html +++ b/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener_base.html @@ -23,11 +23,10 @@ Test behavior of -rel +base +target = -" -noopener -" +_blank links < / @@ -64,6 +63,12 @@ script > < +base +target += +_blank +> +< / head > @@ -77,7 +82,7 @@ " support / -target_blank_iplicit_noopener +target_blank_implicit_noopener . html ? @@ -93,11 +98,6 @@ " noopener " -target -= -" -_blank -" > Click me @@ -112,7 +112,7 @@ " support / -target_blank_iplicit_noopener +target_blank_implicit_noopener . html ? @@ -128,10 +128,30 @@ " opener " -target +> +Click +me +< +/ +a +> +< +a +href = " -_blank +support +/ +target_blank_implicit_noopener +. +html +? +a3 +" +id += +" +a3 " > Click @@ -147,21 +167,22 @@ " support / -target_blank_iplicit_noopener +target_blank_implicit_noopener . html ? -a3 +a4 " id = " -a3 +a4 " -target +rel = " -_blank +opener +noopener " > Click @@ -177,27 +198,52 @@ " support / -target_blank_iplicit_noopener +target_blank_implicit_noopener . html ? -a4 +a5 " id = " -a4 +a5 " rel = " -opener noopener +opener " -target +> +Click +me +< +/ +a +> +< +a +href = " -_blank +support +/ +target_blank_implicit_noopener +. +html +? +a6 +" +id += +" +a6 +" +rel += +" +noreferrer " > Click @@ -213,27 +259,54 @@ " support / -target_blank_iplicit_noopener +target_blank_implicit_noopener . html ? -a5 +a7 " id = " -a5 +a7 " rel = " -noopener opener +noreferrer " -target +> +Click +me +< +/ +a +> +< +a +href = " -_blank +support +/ +target_blank_implicit_noopener +. +html +? +a8 +" +id += +" +a8 +" +rel += +" +noopener +opener +noreferrer " > Click @@ -276,7 +349,7 @@ " support / -target_blank_iplicit_noopener +target_blank_implicit_noopener . html ? @@ -292,12 +365,6 @@ " noopener " -target -= -" -_blank -" -/ > < / @@ -337,7 +404,7 @@ " support / -target_blank_iplicit_noopener +target_blank_implicit_noopener . html ? @@ -353,12 +420,6 @@ " opener " -target -= -" -_blank -" -/ > < / @@ -398,7 +459,7 @@ " support / -target_blank_iplicit_noopener +target_blank_implicit_noopener . html ? @@ -409,12 +470,6 @@ " area3 " -target -= -" -_blank -" -/ > < / @@ -454,7 +509,7 @@ " support / -target_blank_iplicit_noopener +target_blank_implicit_noopener . html ? @@ -471,12 +526,6 @@ opener noopener " -target -= -" -_blank -" -/ > < / @@ -516,7 +565,7 @@ " support / -target_blank_iplicit_noopener +target_blank_implicit_noopener . html ? @@ -533,12 +582,6 @@ noopener opener " -target -= -" -_blank -" -/ > < / @@ -566,6 +609,7 @@ Anchor element with +base target = _blank @@ -590,6 +634,7 @@ Anchor element with +base target = _blank @@ -614,6 +659,7 @@ Anchor element with +base target = _blank @@ -639,6 +685,7 @@ Anchor element with +base target = _blank @@ -665,6 +712,7 @@ Anchor element with +base target = _blank @@ -680,6 +728,87 @@ id : " +a6 +" +hasOpener +: +false +name +: +" +Anchor +element +with +base +target += +_blank +with +rel += +noreferrer +" +} +{ +id +: +" +a7 +" +hasOpener +: +false +name +: +" +Anchor +element +with +base +target += +_blank +with +rel += +opener ++ +noreferrer +" +} +{ +id +: +" +a8 +" +hasOpener +: +false +name +: +" +Anchor +element +with +base +target += +_blank +with +rel += +noopener ++ +opener ++ +noreferrer +" +} +{ +id +: +" area1 " hasOpener @@ -691,6 +820,7 @@ Area element with +base target = _blank @@ -715,6 +845,7 @@ Area element with +base target = _blank @@ -739,6 +870,7 @@ Area element with +base target = _blank @@ -764,6 +896,7 @@ Area element with +base target = _blank @@ -790,6 +923,7 @@ Area element with +base target = _blank