Skip to content

Commit

Permalink
Bug 1551447 [wpt PR 16451] - Update noopener tests to match spec rule…
Browse files Browse the repository at this point in the history
…s for choosing a browsing con…, a=testonly

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 whatwg/html#1826.
--

wpt-commits: 0c79d0d99c720f679fa089374971778e461e6662
wpt-pr: 16451

UltraBlame original commit: f2b4dc0d863dcdd1768145f1fa83462cf9a9271c
  • Loading branch information
marco-c committed Oct 4, 2019
1 parent bd730d5 commit 29f7fae
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@
noopener
'
should
not
reuse
existing
target
Expand All @@ -154,7 +153,7 @@
"
noopener
"
shouldReuse
shouldReturnWindow
:
false
}
Expand All @@ -178,7 +177,7 @@
=
1
"
shouldReuse
shouldReturnWindow
:
false
}
Expand All @@ -201,7 +200,7 @@
=
0
"
shouldReuse
shouldReturnWindow
:
true
}
Expand All @@ -210,16 +209,12 @@
:
"
noopener
needs
to
be
present
as
a
token
on
its
own
separated
only
by
spaces
should
work
"
secondWindowFeatureString
:
Expand All @@ -228,9 +223,9 @@
me
noopener
"
shouldReuse
shouldReturnWindow
:
true
false
}
{
testDescription
Expand All @@ -252,7 +247,7 @@
r
noopener
"
shouldReuse
shouldReturnWindow
:
false
}
Expand All @@ -276,7 +271,7 @@
hey
there
"
shouldReuse
shouldReturnWindow
:
false
}
Expand All @@ -298,7 +293,30 @@
hey
there
"
shouldReuse
shouldReturnWindow
:
false
}
{
testDescription
:
"
noreferrer
should
also
suppress
opener
when
reusing
existing
target
"
secondWindowFeatureString
:
"
noreferrer
"
shouldReturnWindow
:
false
}
Expand Down Expand Up @@ -509,7 +527,7 @@
(
test
.
shouldReuse
shouldReturnWindow
)
{
t
Expand Down Expand Up @@ -706,10 +724,10 @@
data
.
haveOpener
false
true
"
Should
not
still
have
opener
"
Expand All @@ -723,7 +741,7 @@
window
)
;
assert_equals
assert_not_equals
(
w1
.
Expand All @@ -735,6 +753,11 @@
:
blank
"
"
Should
have
navigated
"
)
;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,11 @@
special
targets
above
in
fact
ignores
is
still
able
to
reuse
existing
things
with
Expand Down Expand Up @@ -535,7 +537,7 @@
a
given
name
ignores
reuses
an
existing
window
Expand Down Expand Up @@ -596,7 +598,7 @@
.
data
;
assert_false
assert_true
(
data
.
Expand Down Expand Up @@ -628,7 +630,7 @@
window
)
;
assert_equals
assert_not_equals
(
w
.
Expand Down Expand Up @@ -710,7 +712,7 @@
a
given
name
ignores
reuses
an
existing
subframe
Expand Down Expand Up @@ -758,7 +760,7 @@
hasOpener
)
;
assert_false
assert_true
(
data
.
Expand All @@ -775,7 +777,7 @@
"
)
;
assert_equals
assert_not_equals
(
document
.
Expand Down

0 comments on commit 29f7fae

Please sign in to comment.