Skip to content

Commit

Permalink
Bug 1449107 [wpt PR 10192] - Add tests for Request.isReloadNavigation…
Browse files Browse the repository at this point in the history
…, a=testonly

Automatic update from web-platform-testsAdd tests for Request.isReloadNavigation

See whatwg/fetch#685, whatwg/html#3592, and discussion in w3c/ServiceWorker#1167.
--

wpt-commits: 58ee169367245c6fe5edc01177eac68f76c12f4a
wpt-pr: 10192

UltraBlame original commit: 96c5380b8719433164c1c86dac5b4c8db50c1966
  • Loading branch information
marco-c committed Oct 3, 2019
1 parent ce60195 commit 26c7d04
Show file tree
Hide file tree
Showing 13 changed files with 3,269 additions and 50 deletions.
668 changes: 618 additions & 50 deletions testing/web-platform/meta/MANIFEST.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions testing/web-platform/tests/fetch/api/request/request-idl.html
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,11 @@
DOMString
integrity
;
readonly
attribute
boolean
isReloadNavigation
;
[
NewObject
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,291 @@
<
!
DOCTYPE
html
>
<
script
src
=
"
/
resources
/
testharness
.
js
"
>
<
/
script
>
<
script
src
=
"
/
resources
/
testharnessreport
.
js
"
>
<
/
script
>
<
script
src
=
"
/
common
/
get
-
host
-
info
.
sub
.
js
"
>
<
/
script
>
<
script
src
=
"
/
service
-
workers
/
service
-
worker
/
resources
/
test
-
helpers
.
sub
.
js
"
>
<
/
script
>
<
body
>
<
script
>
const
worker
=
'
resources
/
request
-
reset
-
attributes
-
worker
.
js
'
;
promise_test
(
async
(
t
)
=
>
{
const
scope
=
'
resources
/
hello
.
txt
?
name
=
isReloadNavigation
'
;
let
frame
;
let
reg
;
try
{
reg
=
await
service_worker_unregister_and_register
(
t
worker
scope
)
;
await
wait_for_state
(
t
reg
.
installing
'
activated
'
)
;
frame
=
await
with_iframe
(
scope
)
;
assert_equals
(
frame
.
contentDocument
.
body
.
textContent
'
old
:
false
new
:
false
'
)
;
await
new
Promise
(
(
resolve
)
=
>
{
frame
.
onload
=
resolve
;
frame
.
contentWindow
.
location
.
reload
(
)
;
}
)
;
assert_equals
(
frame
.
contentDocument
.
body
.
textContent
'
old
:
true
new
:
false
'
)
;
}
finally
{
if
(
frame
)
{
frame
.
remove
(
)
;
}
if
(
reg
)
{
await
reg
.
unregister
(
)
;
}
}
}
'
Request
.
isReloadNavigation
is
reset
with
non
-
empty
RequestInit
'
)
;
<
/
script
>
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,21 @@
;
break
;
case
"
isReloadNavigation
"
:
defaultValue
=
false
;
newValue
=
true
;
break
;
default
:
return
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello
Loading

0 comments on commit 26c7d04

Please sign in to comment.