-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1528954 [wpt PR 15461] - HTML: opener of a Window sans browsing c…
…ontext, a=testonly Automatic update from web-platform-tests HTML: opener of a Window sans browsing context For whatwg/html#4379. -- wpt-commits: ad1ab06b7fcdbf7ef24cf0ed8aa13ac36d04272a wpt-pr: 15461 UltraBlame original commit: 063b443f99cd6346bfaf3ac5f93f0c7019a27550
- Loading branch information
Showing
1 changed file
with
389 additions
and
0 deletions.
There are no files selected for viewing
389 changes: 389 additions & 0 deletions
389
testing/web-platform/tests/html/browsers/windows/embedded-opener-remove-frame.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,389 @@ | ||
< | ||
! | ||
doctype | ||
html | ||
> | ||
< | ||
title | ||
> | ||
opener | ||
and | ||
" | ||
removed | ||
" | ||
embedded | ||
documents | ||
< | ||
/ | ||
title | ||
> | ||
< | ||
script | ||
src | ||
= | ||
/ | ||
resources | ||
/ | ||
testharness | ||
. | ||
js | ||
> | ||
< | ||
/ | ||
script | ||
> | ||
< | ||
script | ||
src | ||
= | ||
/ | ||
resources | ||
/ | ||
testharnessreport | ||
. | ||
js | ||
> | ||
< | ||
/ | ||
script | ||
> | ||
< | ||
div | ||
id | ||
= | ||
log | ||
> | ||
< | ||
/ | ||
div | ||
> | ||
< | ||
iframe | ||
name | ||
= | ||
matchesastring | ||
> | ||
< | ||
/ | ||
iframe | ||
> | ||
< | ||
script | ||
> | ||
async_test | ||
( | ||
t | ||
= | ||
> | ||
{ | ||
const | ||
frame | ||
= | ||
document | ||
. | ||
querySelector | ||
( | ||
" | ||
iframe | ||
" | ||
) | ||
frameW | ||
= | ||
frame | ||
. | ||
contentWindow | ||
; | ||
frame | ||
. | ||
onload | ||
= | ||
t | ||
. | ||
step_func | ||
( | ||
( | ||
) | ||
= | ||
> | ||
{ | ||
/ | ||
/ | ||
Firefox | ||
and | ||
Chrome | ||
/ | ||
Safari | ||
load | ||
differently | ||
if | ||
( | ||
frame | ||
. | ||
contentWindow | ||
. | ||
location | ||
. | ||
href | ||
= | ||
= | ||
= | ||
" | ||
about | ||
: | ||
blank | ||
" | ||
) | ||
{ | ||
return | ||
; | ||
} | ||
/ | ||
/ | ||
Test | ||
bits | ||
assert_equals | ||
( | ||
frameW | ||
. | ||
opener | ||
window | ||
" | ||
opener | ||
before | ||
removal | ||
" | ||
) | ||
; | ||
const | ||
openerDesc | ||
= | ||
Object | ||
. | ||
getOwnPropertyDescriptor | ||
( | ||
frameW | ||
" | ||
opener | ||
" | ||
) | ||
openerGet | ||
= | ||
openerDesc | ||
. | ||
get | ||
; | ||
assert_equals | ||
( | ||
openerGet | ||
( | ||
) | ||
window | ||
" | ||
opener | ||
before | ||
removal | ||
via | ||
directly | ||
invoking | ||
the | ||
getter | ||
" | ||
) | ||
; | ||
frame | ||
. | ||
remove | ||
( | ||
) | ||
; | ||
assert_equals | ||
( | ||
frameW | ||
. | ||
opener | ||
null | ||
" | ||
opener | ||
after | ||
removal | ||
" | ||
) | ||
; | ||
assert_equals | ||
( | ||
openerGet | ||
( | ||
) | ||
null | ||
" | ||
opener | ||
after | ||
removal | ||
via | ||
directly | ||
invoking | ||
the | ||
getter | ||
" | ||
) | ||
; | ||
frameW | ||
. | ||
opener | ||
= | ||
null | ||
; | ||
assert_equals | ||
( | ||
openerGet | ||
( | ||
) | ||
null | ||
" | ||
opener | ||
after | ||
setting | ||
it | ||
null | ||
via | ||
directly | ||
invoking | ||
the | ||
getter | ||
" | ||
) | ||
; | ||
const | ||
openerDescNull | ||
= | ||
Object | ||
. | ||
getOwnPropertyDescriptor | ||
( | ||
frameW | ||
" | ||
opener | ||
" | ||
) | ||
; | ||
assert_not_equals | ||
( | ||
openerDescNull | ||
openerDesc | ||
) | ||
; | ||
assert_object_equals | ||
( | ||
openerDescNull | ||
openerDesc | ||
) | ||
; | ||
frameW | ||
. | ||
opener | ||
= | ||
" | ||
immaterial | ||
" | ||
; | ||
assert_equals | ||
( | ||
openerGet | ||
( | ||
) | ||
null | ||
" | ||
opener | ||
after | ||
setting | ||
it | ||
\ | ||
" | ||
immaterial | ||
\ | ||
" | ||
via | ||
directly | ||
invoking | ||
the | ||
getter | ||
" | ||
) | ||
; | ||
const | ||
openerDescImmaterial | ||
= | ||
Object | ||
. | ||
getOwnPropertyDescriptor | ||
( | ||
frameW | ||
" | ||
opener | ||
" | ||
) | ||
; | ||
assert_equals | ||
( | ||
openerDescImmaterial | ||
. | ||
value | ||
" | ||
immaterial | ||
" | ||
) | ||
; | ||
assert_true | ||
( | ||
openerDescImmaterial | ||
. | ||
writable | ||
) | ||
; | ||
assert_true | ||
( | ||
openerDescImmaterial | ||
. | ||
enumerable | ||
) | ||
; | ||
assert_true | ||
( | ||
openerDescImmaterial | ||
. | ||
configurable | ||
) | ||
; | ||
t | ||
. | ||
done | ||
( | ||
) | ||
; | ||
} | ||
) | ||
; | ||
window | ||
. | ||
open | ||
( | ||
" | ||
/ | ||
common | ||
/ | ||
blank | ||
. | ||
html | ||
" | ||
" | ||
matchesastring | ||
" | ||
) | ||
; | ||
} | ||
) | ||
; | ||
< | ||
/ | ||
script | ||
> |