Auto merge of #20725 - servo-wpt-sync:wpt_update_30-04-2018, r=jdm

Sync WPT with upstream (30-04-2018)

Automated downstream sync of changes from upstream as of 30-04-2018.
[no-wpt-sync]

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20725)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-05-01 13:29:42 -04:00 committed by GitHub
commit 245dcc2118
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
274 changed files with 5768 additions and 2859 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,2 @@
[new-fc-beside-adjoining-float.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[new-fc-separates-from-float.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[background-size-025.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[percentage-size-subitems-001.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[font-display-preload.html]
expected: TIMEOUT

View file

@ -323,3 +323,6 @@
[Matching font-style: 'oblique 21deg' should prefer 'oblique 30deg 60deg' over 'oblique 40deg 50deg']
expected: FAIL
[Descriptor mathcing priority: Style has higher priority than weight]
expected: FAIL

View file

@ -1,5 +1,4 @@
[font-parse-numeric-stretch-style-weight.html]
[Valid value 100 matches 100 for weight in @font-face.]
expected: FAIL

View file

@ -1,5 +1,4 @@
[font-stretch.html]
[@getComputedStyle: 1e9% - huge legal percentage]
expected: FAIL

View file

@ -0,0 +1,25 @@
[gradient-position-invalid.html]
[e.style['background-image'\] = "radial-gradient(at center left 1px, red, blue)" should not set the property value]
expected: FAIL
[e.style['background-image'\] = "radial-gradient(at center top 2px, red, blue)" should not set the property value]
expected: FAIL
[e.style['background-image'\] = "radial-gradient(at right 3% center, red, blue)" should not set the property value]
expected: FAIL
[e.style['background-image'\] = "radial-gradient(at left 4px top, red, blue)" should not set the property value]
expected: FAIL
[e.style['background-image'\] = "radial-gradient(at right top 5px, red, blue)" should not set the property value]
expected: FAIL
[e.style['background-image'\] = "radial-gradient(at bottom 6% center, red, blue)" should not set the property value]
expected: FAIL
[e.style['background-image'\] = "radial-gradient(at bottom 7% left, red, blue)" should not set the property value]
expected: FAIL
[e.style['background-image'\] = "radial-gradient(at bottom right 8%, red, blue)" should not set the property value]
expected: FAIL

View file

@ -0,0 +1,28 @@
[image-orientation-invalid.html]
[e.style['image-orientation'\] = "auto" should not set the property value]
expected: FAIL
[e.style['image-orientation'\] = "none" should not set the property value]
expected: FAIL
[e.style['image-orientation'\] = "0" should not set the property value]
expected: FAIL
[e.style['image-orientation'\] = "0 flip" should not set the property value]
expected: FAIL
[e.style['image-orientation'\] = "0deg from-image" should not set the property value]
expected: FAIL
[e.style['image-orientation'\] = "flip 0deg" should not set the property value]
expected: FAIL
[e.style['image-orientation'\] = "flip from-image" should not set the property value]
expected: FAIL
[e.style['image-orientation'\] = "from-image 0deg" should not set the property value]
expected: FAIL
[e.style['image-orientation'\] = "from-image flip" should not set the property value]
expected: FAIL

View file

@ -0,0 +1,4 @@
[image-orientation-valid.html]
[e.style['image-orientation'\] = "flip" should set the property value]
expected: FAIL

View file

@ -0,0 +1,7 @@
[image-rendering-valid.html]
[e.style['image-rendering'\] = "smooth" should set the property value]
expected: FAIL
[e.style['image-rendering'\] = "high-quality" should set the property value]
expected: FAIL

View file

@ -0,0 +1,16 @@
[image-resolution-invalid.html]
[e.style['image-resolution'\] = "auto" should not set the property value]
expected: FAIL
[e.style['image-resolution'\] = "100%" should not set the property value]
expected: FAIL
[e.style['image-resolution'\] = "2" should not set the property value]
expected: FAIL
[e.style['image-resolution'\] = "3dpi snap from-image" should not set the property value]
expected: FAIL
[e.style['image-resolution'\] = "from-image snap 4dppx" should not set the property value]
expected: FAIL

View file

@ -0,0 +1,16 @@
[object-fit-invalid.html]
[e.style['object-fit'\] = "auto" should not set the property value]
expected: FAIL
[e.style['object-fit'\] = "contain cover" should not set the property value]
expected: FAIL
[e.style['object-fit'\] = "fill scale-down" should not set the property value]
expected: FAIL
[e.style['object-fit'\] = "contain fill" should not set the property value]
expected: FAIL
[e.style['object-fit'\] = "cover none" should not set the property value]
expected: FAIL

View file

@ -0,0 +1,37 @@
[object-position-invalid.html]
[e.style['object-position'\] = "auto" should not set the property value]
expected: FAIL
[e.style['object-position'\] = "1px 2px 3px" should not set the property value]
expected: FAIL
[e.style['object-position'\] = "left right" should not set the property value]
expected: FAIL
[e.style['object-position'\] = "bottom 10% top 20%" should not set the property value]
expected: FAIL
[e.style['object-position'\] = "center left 1px" should not set the property value]
expected: FAIL
[e.style['object-position'\] = "center top 2px" should not set the property value]
expected: FAIL
[e.style['object-position'\] = "right 3% center" should not set the property value]
expected: FAIL
[e.style['object-position'\] = "left 4px top" should not set the property value]
expected: FAIL
[e.style['object-position'\] = "right top 5px" should not set the property value]
expected: FAIL
[e.style['object-position'\] = "bottom 6% center" should not set the property value]
expected: FAIL
[e.style['object-position'\] = "bottom 7% left" should not set the property value]
expected: FAIL
[e.style['object-position'\] = "bottom right 8%" should not set the property value]
expected: FAIL

View file

@ -0,0 +1,22 @@
[object-position-valid.html]
[e.style['object-position'\] = "10%" should set the property value]
expected: FAIL
[e.style['object-position'\] = "bottom 10% right 20%" should set the property value]
expected: FAIL
[e.style['object-position'\] = "bottom right" should set the property value]
expected: FAIL
[e.style['object-position'\] = "center left" should set the property value]
expected: FAIL
[e.style['object-position'\] = "left" should set the property value]
expected: FAIL
[e.style['object-position'\] = "top" should set the property value]
expected: FAIL
[e.style['object-position'\] = "top center" should set the property value]
expected: FAIL

View file

@ -1,3 +1,2 @@
[adlam-anti-ref.html]
expected:
if os == "mac": FAIL
expected: FAIL

View file

@ -1,3 +1,2 @@
[cypriot-anti-ref.html]
expected:
if os == "mac": FAIL
expected: FAIL

View file

@ -3,3 +3,9 @@
[scroll-behavior: smooth on DIV element]
expected: FAIL
[Instant scrolling while doing history navigation.]
expected: TIMEOUT
[Smooth scrolling while doing history navigation.]
expected: NOTRUN

View file

@ -1,5 +0,0 @@
[Document-constructor.html]
type: testharness
[new Document(): URL parsing]
expected: FAIL

View file

@ -1,5 +0,0 @@
[headers-idl.html]
type: testharness
[Testing Symbol.iterator property of iterable interface Headers]
expected: FAIL

View file

@ -0,0 +1,19 @@
[idl.any.worker.html]
[Untitled]
expected: FAIL
[idl.any.html]
[Untitled]
expected: FAIL
[idl.any.sharedworker.html]
[Untitled]
expected: FAIL
[idl.https.any.serviceworker.html]
[Untitled]
expected: FAIL

View file

@ -1,32 +0,0 @@
[request-idl.html]
type: testharness
[Request interface: operation arrayBuffer()]
expected: FAIL
[Request interface: operation blob()]
expected: FAIL
[Request interface: operation formData()]
expected: FAIL
[Request interface: operation json()]
expected: FAIL
[Request interface: operation text()]
expected: FAIL
[Request interface: new Request("") must inherit property "arrayBuffer" with the proper type (14)]
expected: FAIL
[Request interface: attribute body]
expected: FAIL
[Request interface: new Request("") must inherit property "body" with the proper type (13)]
expected: FAIL
[Request interface: new Request("") must inherit property "arrayBuffer" with the proper type (15)]
expected: FAIL
[Request interface: new Request("") must inherit property "body" with the proper type]
expected: FAIL

View file

@ -0,0 +1,4 @@
[request-reset-attributes.https.html]
[Untitled]
expected: FAIL

View file

@ -1,44 +0,0 @@
[response-idl.html]
type: testharness
[Response interface: attribute body]
expected: FAIL
[Response interface: operation arrayBuffer()]
expected: FAIL
[Response interface: operation blob()]
expected: FAIL
[Response interface: operation formData()]
expected: FAIL
[Response interface: operation json()]
expected: FAIL
[Response interface: operation text()]
expected: FAIL
[Response interface: new Response() must inherit property "body" with the proper type (8)]
expected: FAIL
[Response interface: new Response() must inherit property "body" with the proper type (9)]
expected: FAIL
[Response interface: attribute trailer]
expected: FAIL
[Response interface: new Response() must inherit property "trailer" with the proper type (8)]
expected: FAIL
[Response interface: new Response() must inherit property "body" with the proper type (10)]
expected: FAIL
[Response interface: new Response() must inherit property "arrayBuffer" with the proper type (12)]
expected: FAIL
[Response interface: new Response() must inherit property "trailer" with the proper type]
expected: FAIL
[Response interface: new Response() must inherit property "body" with the proper type]
expected: FAIL

View file

@ -0,0 +1,2 @@
[dir_auto-N-EN.html]
expected: FAIL

View file

@ -16,9 +16,6 @@
[Should have the right origin for sandboxed iframe]
expected: NOTRUN
[We should have the right origin for our page]
expected: FAIL
[about:blank subframe origins]
expected: FAIL

View file

@ -172,36 +172,6 @@
[XHTML img usemap="http://example.org/#garbage-before-hash-id"]
expected: FAIL
[HTML (quirks) IMG usemap="no-hash-name"]
expected: FAIL
[HTML (quirks) IMG usemap="no-hash-id"]
expected: FAIL
[HTML (quirks) IMG usemap="hash-last#"]
expected: FAIL
[HTML (quirks) IMG usemap=""]
expected: FAIL
[HTML (quirks) IMG usemap="#"]
expected: FAIL
[HTML (quirks) IMG usemap="#percent-escape-name-%41"]
expected: FAIL
[HTML (quirks) IMG usemap="#percent-escape-id-%41"]
expected: FAIL
[HTML (quirks) IMG usemap="#no-such-map"]
expected: FAIL
[HTML (quirks) IMG usemap="#different-CASE-name"]
expected: FAIL
[HTML (quirks) IMG usemap="#different-CASE-id"]
expected: FAIL
[XHTML img usemap="no-hash-name"]
expected: FAIL
@ -232,3 +202,33 @@
[XHTML img usemap="#different-CASE-id"]
expected: FAIL
[HTML (standards) IMG usemap="no-hash-name"]
expected: FAIL
[HTML (standards) IMG usemap="no-hash-id"]
expected: FAIL
[HTML (standards) IMG usemap="hash-last#"]
expected: FAIL
[HTML (standards) IMG usemap=""]
expected: FAIL
[HTML (standards) IMG usemap="#"]
expected: FAIL
[HTML (standards) IMG usemap="#percent-escape-name-%41"]
expected: FAIL
[HTML (standards) IMG usemap="#percent-escape-id-%41"]
expected: FAIL
[HTML (standards) IMG usemap="#no-such-map"]
expected: FAIL
[HTML (standards) IMG usemap="#different-CASE-name"]
expected: FAIL
[HTML (standards) IMG usemap="#different-CASE-id"]
expected: FAIL

View file

@ -0,0 +1,7 @@
[constructing-form-data-set.html]
[FormData constructor always produces UTF-8 _charset_ value.]
expected: FAIL
[_charset_ control sets the expected encoding name.]
expected: FAIL

View file

@ -0,0 +1,9 @@
[abort-during-open.any.worker.html]
[XMLHttpRequest: abort() during OPEN]
expected: FAIL
[abort-during-open.any.html]
[XMLHttpRequest: abort() during OPEN]
expected: FAIL

View file

@ -1,5 +0,0 @@
[abort-during-open.htm]
type: testharness
[XMLHttpRequest: abort() during OPEN]
expected: FAIL

View file

@ -1,5 +0,0 @@
[abort-during-open.worker.html]
type: testharness
[Untitled]
expected: FAIL

View file

@ -15,9 +15,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome reftest 1 6"]
\ chrome reftest 1 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -33,9 +33,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome reftest 2 6"]
\ chrome reftest 2 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -51,9 +51,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome reftest 3 6"]
\ chrome reftest 3 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -69,9 +69,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome reftest 4 6"]
\ chrome reftest 4 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -87,9 +87,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome reftest 5 6"]
\ chrome reftest 5 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -105,9 +105,81 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome reftest 6 6"]
\ chrome reftest 6 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
github:
branches: [master]
events: [push]
metadata: {description: '', name: wpt-chrome-dev-reftest-7, owner: '{{ event.head.user.email
}}', source: '{{ event.head.repo.url }}'}
payload:
artifacts:
public/results: {path: /home/test/artifacts, type: directory}
command: [/bin/bash, --login, -c, ">-\n ~/start.sh &&\n \
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome reftest 7 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
github:
branches: [master]
events: [push]
metadata: {description: '', name: wpt-chrome-dev-reftest-8, owner: '{{ event.head.user.email
}}', source: '{{ event.head.repo.url }}'}
payload:
artifacts:
public/results: {path: /home/test/artifacts, type: directory}
command: [/bin/bash, --login, -c, ">-\n ~/start.sh &&\n \
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome reftest 8 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
github:
branches: [master]
events: [push]
metadata: {description: '', name: wpt-chrome-dev-reftest-9, owner: '{{ event.head.user.email
}}', source: '{{ event.head.repo.url }}'}
payload:
artifacts:
public/results: {path: /home/test/artifacts, type: directory}
command: [/bin/bash, --login, -c, ">-\n ~/start.sh &&\n \
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome reftest 9 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
github:
branches: [master]
events: [push]
metadata: {description: '', name: wpt-chrome-dev-reftest-10, owner: '{{ event.head.user.email
}}', source: '{{ event.head.repo.url }}'}
payload:
artifacts:
public/results: {path: /home/test/artifacts, type: directory}
command: [/bin/bash, --login, -c, ">-\n ~/start.sh &&\n \
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome reftest 10 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -125,7 +197,7 @@ tasks:
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome wdspec 1 1"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -141,9 +213,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome testharness 1 12"]
\ chrome testharness 1 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -159,9 +231,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome testharness 2 12"]
\ chrome testharness 2 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -177,9 +249,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome testharness 3 12"]
\ chrome testharness 3 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -195,9 +267,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome testharness 4 12"]
\ chrome testharness 4 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -213,9 +285,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome testharness 5 12"]
\ chrome testharness 5 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -231,9 +303,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome testharness 6 12"]
\ chrome testharness 6 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -249,9 +321,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome testharness 7 12"]
\ chrome testharness 7 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -267,9 +339,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome testharness 8 12"]
\ chrome testharness 8 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -285,9 +357,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome testharness 9 12"]
\ chrome testharness 9 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -303,9 +375,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome testharness 10 12"]
\ chrome testharness 10 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -321,9 +393,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome testharness 11 12"]
\ chrome testharness 11 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -339,9 +411,63 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome testharness 12 12"]
\ chrome testharness 12 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
github:
branches: [master]
events: [push]
metadata: {description: '', name: wpt-chrome-dev-testharness-13, owner: '{{ event.head.user.email
}}', source: '{{ event.head.repo.url }}'}
payload:
artifacts:
public/results: {path: /home/test/artifacts, type: directory}
command: [/bin/bash, --login, -c, ">-\n ~/start.sh &&\n \
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome testharness 13 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
github:
branches: [master]
events: [push]
metadata: {description: '', name: wpt-chrome-dev-testharness-14, owner: '{{ event.head.user.email
}}', source: '{{ event.head.repo.url }}'}
payload:
artifacts:
public/results: {path: /home/test/artifacts, type: directory}
command: [/bin/bash, --login, -c, ">-\n ~/start.sh &&\n \
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome testharness 14 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
github:
branches: [master]
events: [push]
metadata: {description: '', name: wpt-chrome-dev-testharness-15, owner: '{{ event.head.user.email
}}', source: '{{ event.head.repo.url }}'}
payload:
artifacts:
public/results: {path: /home/test/artifacts, type: directory}
command: [/bin/bash, --login, -c, ">-\n ~/start.sh &&\n \
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ chrome testharness 15 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -357,9 +483,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox reftest 1 6"]
\ firefox reftest 1 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -375,9 +501,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox reftest 2 6"]
\ firefox reftest 2 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -393,9 +519,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox reftest 3 6"]
\ firefox reftest 3 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -411,9 +537,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox reftest 4 6"]
\ firefox reftest 4 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -429,9 +555,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox reftest 5 6"]
\ firefox reftest 5 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -447,9 +573,81 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox reftest 6 6"]
\ firefox reftest 6 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
github:
branches: [master]
events: [push]
metadata: {description: '', name: wpt-firefox-nightly-reftest-7, owner: '{{ event.head.user.email
}}', source: '{{ event.head.repo.url }}'}
payload:
artifacts:
public/results: {path: /home/test/artifacts, type: directory}
command: [/bin/bash, --login, -c, ">-\n ~/start.sh &&\n \
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox reftest 7 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
github:
branches: [master]
events: [push]
metadata: {description: '', name: wpt-firefox-nightly-reftest-8, owner: '{{ event.head.user.email
}}', source: '{{ event.head.repo.url }}'}
payload:
artifacts:
public/results: {path: /home/test/artifacts, type: directory}
command: [/bin/bash, --login, -c, ">-\n ~/start.sh &&\n \
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox reftest 8 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
github:
branches: [master]
events: [push]
metadata: {description: '', name: wpt-firefox-nightly-reftest-9, owner: '{{ event.head.user.email
}}', source: '{{ event.head.repo.url }}'}
payload:
artifacts:
public/results: {path: /home/test/artifacts, type: directory}
command: [/bin/bash, --login, -c, ">-\n ~/start.sh &&\n \
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox reftest 9 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
github:
branches: [master]
events: [push]
metadata: {description: '', name: wpt-firefox-nightly-reftest-10, owner: '{{ event.head.user.email
}}', source: '{{ event.head.repo.url }}'}
payload:
artifacts:
public/results: {path: /home/test/artifacts, type: directory}
command: [/bin/bash, --login, -c, ">-\n ~/start.sh &&\n \
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox reftest 10 10"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -467,7 +665,7 @@ tasks:
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox wdspec 1 1"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -483,9 +681,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox testharness 1 12"]
\ firefox testharness 1 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -501,9 +699,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox testharness 2 12"]
\ firefox testharness 2 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -519,9 +717,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox testharness 3 12"]
\ firefox testharness 3 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -537,9 +735,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox testharness 4 12"]
\ firefox testharness 4 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -555,9 +753,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox testharness 5 12"]
\ firefox testharness 5 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -573,9 +771,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox testharness 6 12"]
\ firefox testharness 6 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -591,9 +789,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox testharness 7 12"]
\ firefox testharness 7 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -609,9 +807,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox testharness 8 12"]
\ firefox testharness 8 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -627,9 +825,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox testharness 9 12"]
\ firefox testharness 9 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -645,9 +843,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox testharness 10 12"]
\ firefox testharness 10 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -663,9 +861,9 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox testharness 11 12"]
\ firefox testharness 11 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
@ -681,9 +879,63 @@ tasks:
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox testharness 12 12"]
\ firefox testharness 12 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 5400
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
github:
branches: [master]
events: [push]
metadata: {description: '', name: wpt-firefox-nightly-testharness-13, owner: '{{
event.head.user.email }}', source: '{{ event.head.repo.url }}'}
payload:
artifacts:
public/results: {path: /home/test/artifacts, type: directory}
command: [/bin/bash, --login, -c, ">-\n ~/start.sh &&\n \
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox testharness 13 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
github:
branches: [master]
events: [push]
metadata: {description: '', name: wpt-firefox-nightly-testharness-14, owner: '{{
event.head.user.email }}', source: '{{ event.head.repo.url }}'}
payload:
artifacts:
public/results: {path: /home/test/artifacts, type: directory}
command: [/bin/bash, --login, -c, ">-\n ~/start.sh &&\n \
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox testharness 14 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
- extra:
github:
branches: [master]
events: [push]
metadata: {description: '', name: wpt-firefox-nightly-testharness-15, owner: '{{
event.head.user.email }}', source: '{{ event.head.repo.url }}'}
payload:
artifacts:
public/results: {path: /home/test/artifacts, type: directory}
command: [/bin/bash, --login, -c, ">-\n ~/start.sh &&\n \
\ cd /home/test/web-platform-tests &&\n git fetch {{event.head.repo.url}}\
\ &&\n git config advice.detachedHead false &&\n git\
\ checkout {{event.head.sha}} &&\n ./tools/ci/ci_taskcluster.sh\
\ firefox testharness 15 15"]
image: harjgam/web-platform-tests:0.6
maxRunTime: 7200
provisionerId: '{{ taskcluster.docker.provisionerId }}'
workerType: '{{ taskcluster.docker.workerType }}'
version: 0

View file

@ -0,0 +1,23 @@
<html>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(t => {
return fetch("/client-hints/echo_client_hints_received.py").then(r => {
assert_equals(r.status, 200)
// Verify that the browser does not include client hints in the headers
// since Accept-CH is malformed (includes whitespace between attributes
// instead of comma).
assert_false(r.headers.has("device-memory-received"), "device-memory-received");
assert_false(r.headers.has("dpr-received"), "dpr-received");
assert_false(r.headers.has("viewport-width-received"), "viewport-width-received");
});
}, "Accept-CH header test");
</script>
</body>
</html>

View file

@ -0,0 +1 @@
Accept-CH: device-memory dpr

View file

@ -0,0 +1,10 @@
'use strict';
promise_test(async testCase => {
const p = cookieStore.delete('cookie-name');
assert_true(p instanceof Promise,
'cookieStore.delete() returns a promise');
const result = await p;
assert_equals(result, undefined,
'cookieStore.delete() promise resolves to undefined');
}, 'cookieStore.delete return type is Promise<void>');

View file

@ -1,8 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Async Cookies: delete cookies</title>
<meta name="help" href="https://github.com/WICG/cookie-store/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/cookie-test-helpers.js"></script>
<script src="resources/delete_cookies.js"></script>

View file

@ -1,8 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Async Cookies: delete cookies (HTTPS)</title>
<meta name="help" href="https://github.com/WICG/cookie-store/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/cookie-test-helpers.js"></script>
<script src="resources/delete_cookies.js"></script>

View file

@ -1,8 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Async Cookies: get, set, getAll</title>
<meta name="help" href="https://github.com/WICG/cookie-store/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/cookie-test-helpers.js"></script>
<script src="resources/get_set_get_all.js"></script>

View file

@ -1,8 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Async Cookies: get, set, getAll (HTTPS)</title>
<meta name="help" href="https://github.com/WICG/cookie-store/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/cookie-test-helpers.js"></script>
<script src="resources/get_set_get_all.js"></script>

View file

@ -0,0 +1,47 @@
// META: script=resources/cookie-test-helpers.js
'use strict';
cookie_test(async t => {
let eventPromise = observeNextCookieChangeEvent();
await setCookieStringHttp('HTTPONLY-cookie=value; path=/; httponly');
assert_equals(
await getCookieString(),
undefined,
'HttpOnly cookie we wrote using HTTP in cookie jar' +
' is invisible to script');
assert_equals(
await getCookieStringHttp(),
'HTTPONLY-cookie=value',
'HttpOnly cookie we wrote using HTTP in HTTP cookie jar');
await setCookieStringHttp('HTTPONLY-cookie=new-value; path=/; httponly');
assert_equals(
await getCookieString(),
undefined,
'HttpOnly cookie we overwrote using HTTP in cookie jar' +
' is invisible to script');
assert_equals(
await getCookieStringHttp(),
'HTTPONLY-cookie=new-value',
'HttpOnly cookie we overwrote using HTTP in HTTP cookie jar');
eventPromise = observeNextCookieChangeEvent();
await setCookieStringHttp(
'HTTPONLY-cookie=DELETED; path=/; max-age=0; httponly');
assert_equals(
await getCookieString(),
undefined,
'Empty cookie jar after HTTP cookie-clearing using max-age=0');
assert_equals(
await getCookieStringHttp(),
undefined,
'Empty HTTP cookie jar after HTTP cookie-clearing using max-age=0');
// HTTPONLY cookie changes should not have been observed; perform
// a dummy change to verify that nothing else was queued up.
await cookieStore.set('TEST', 'dummy');
await verifyCookieChangeEvent(
eventPromise, {changed: [{name: 'TEST', value: 'dummy'}]},
'HttpOnly cookie deletion was not observed');
}, 'HttpOnly cookies are not observed');

View file

@ -11,41 +11,6 @@ const kIsUnsecured = location.protocol !== 'https:';
const kCookieHelperCgi = 'resources/cookie_helper.py';
// Async wrapper for an async function or promise that is expected
// reject in an unsecured (non-https:) context and work in a secured
// (https:) context.
//
// Parameters:
//
// - testCase: (TestCase) test case context
// - code: (Error class or number) expected rejection type in unsecured context
// - promise: (thenable) test code
// - message: (optional; string) message to forward to promise_rejects in
// unsecured context
async function promise_rejects_when_unsecured(
testCase,
code,
promise,
message = 'Feature unavailable from unsecured contexts') {
if (kIsUnsecured)
await promise_rejects(testCase, code, promise, message);
else await promise;
};
// Converts a list of cookie records {name, value} to [name=]value; ... as
// seen in Cookie: and document.cookie.
//
// Parameters:
// - cookies: (array of {name, value}) records to convert
//
// Returns a string serializing the records, or undefined if no records were
// given.
function cookieString(cookies) {
return cookies.length ? cookies.map((
{name, value}) => (name ? (name + '=') : '') + value).join('; ') :
undefined;
}
// Approximate async equivalent to the document.cookie getter but with
// important differences: optional additional getAll arguments are
// forwarded, and an empty cookie jar returns undefined.
@ -56,7 +21,11 @@ function cookieString(cookies) {
// using parsed cookie jar contents and also allows expectations to be
// written more compactly.
async function getCookieString(...args) {
return cookieString(await cookieStore.getAll(...args));
const cookies = await cookieStore.getAll(...args);
return cookies.length
? cookies.map(({name, value}) =>
(name ? (name + '=') : '') + value).join('; ')
: undefined;
}
// Approximate async equivalent to the document.cookie getter but from
@ -240,31 +209,18 @@ async function verifyCookieChangeEvent(eventPromise, expected, description) {
async function cookie_test(func, description) {
// Wipe cookies used by tests before and after the test.
async function deleteTestCookies() {
await cookieStore.delete('');
await cookieStore.delete('TEST');
await cookieStore.delete('META-🍪');
await cookieStore.delete('DOCUMENT-🍪');
await cookieStore.delete('HTTP-🍪');
await setCookieStringHttp(
'HTTPONLY-🍪=DELETED; path=/; max-age=0; httponly');
if (!kIsUnsecured) {
await cookieStore.delete('__Host-COOKIENAME');
await cookieStore.delete('__Host-1🍪');
await cookieStore.delete('__Host-2🌟');
await cookieStore.delete('__Host-3🌱');
await cookieStore.delete('__Host-unordered1🍪');
await cookieStore.delete('__Host-unordered2🌟');
await cookieStore.delete('__Host-unordered3🌱');
}
async function deleteAllCookies() {
(await cookieStore.getAll()).forEach(({name, value}) => {
cookieStore.delete(name);
});
}
return promise_test(async t => {
await deleteTestCookies();
await deleteAllCookies();
try {
return await func(t);
} finally {
await deleteTestCookies();
await deleteAllCookies();
}
}, description);
}

View file

@ -1,44 +0,0 @@
'use strict';
cookie_test(async testCase => {
// TODO: This test doesn't create cookies and doesn't assert
// the behavior of delete(). Improve or remove it.
await cookieStore.delete('');
await cookieStore.delete('TEST');
await cookieStore.delete('META-🍪');
await cookieStore.delete('DOCUMENT-🍪');
await cookieStore.delete('HTTP-🍪');
await setCookieStringHttp(
'HTTPONLY-🍪=DELETED; path=/; max-age=0; httponly');
await promise_rejects_when_unsecured(
testCase,
new TypeError(),
cookieStore.delete('__Host-COOKIENAME'));
await promise_rejects_when_unsecured(
testCase,
new TypeError(),
cookieStore.delete('__Host-1🍪'));
await promise_rejects_when_unsecured(
testCase,
new TypeError(),
cookieStore.delete('__Host-2🌟'));
await promise_rejects_when_unsecured(
testCase,
new TypeError(),
cookieStore.delete('__Host-3🌱'));
await promise_rejects_when_unsecured(
testCase,
new TypeError(),
cookieStore.delete('__Host-unordered1🍪'));
await promise_rejects_when_unsecured(
testCase,
new TypeError(),
cookieStore.delete('__Host-unordered2🌟'));
await promise_rejects_when_unsecured(
testCase,
new TypeError(),
cookieStore.delete('__Host-unordered3🌱'));
}, 'Test cookieStore.delete');

View file

@ -2,25 +2,43 @@
cookie_test(async t => {
let eventPromise = observeNextCookieChangeEvent();
await setCookieStringDocument('DOCUMENT-🍪=🔵; path=/');
await setCookieStringDocument('DOCUMENT-cookie=value; path=/');
assert_equals(
await getCookieString(),
'DOCUMENT-🍪=🔵',
'DOCUMENT-cookie=value',
'Cookie we wrote using document.cookie in cookie jar');
assert_equals(
await getCookieStringHttp(),
'DOCUMENT-🍪=🔵',
'DOCUMENT-cookie=value',
'Cookie we wrote using document.cookie in HTTP cookie jar');
assert_equals(
await getCookieStringDocument(),
'DOCUMENT-🍪=🔵',
'DOCUMENT-cookie=value',
'Cookie we wrote using document.cookie in document.cookie');
await verifyCookieChangeEvent(
eventPromise, {changed: [{name: 'DOCUMENT-🍪', value: '🔵'}]},
eventPromise, {changed: [{name: 'DOCUMENT-cookie', value: 'value'}]},
'Cookie we wrote using document.cookie is observed');
eventPromise = observeNextCookieChangeEvent();
await setCookieStringDocument('DOCUMENT-🍪=DELETED; path=/; max-age=0');
await setCookieStringDocument('DOCUMENT-cookie=new-value; path=/');
assert_equals(
await getCookieString(),
'DOCUMENT-cookie=new-value',
'Cookie we overwrote using document.cookie in cookie jar');
assert_equals(
await getCookieStringHttp(),
'DOCUMENT-cookie=new-value',
'Cookie we overwrote using document.cookie in HTTP cookie jar');
assert_equals(
await getCookieStringDocument(),
'DOCUMENT-cookie=new-value',
'Cookie we overwrote using document.cookie in document.cookie');
await verifyCookieChangeEvent(
eventPromise, {changed: [{name: 'DOCUMENT-cookie', value: 'new-value'}]},
'Cookie we overwrote using document.cookie is observed');
eventPromise = observeNextCookieChangeEvent();
await setCookieStringDocument('DOCUMENT-cookie=DELETED; path=/; max-age=0');
assert_equals(
await getCookieString(),
undefined,
@ -36,8 +54,104 @@ cookie_test(async t => {
undefined,
'Empty document.cookie cookie jar after document.cookie' +
' cookie-clearing using max-age=0');
await verifyCookieChangeEvent(
eventPromise, {deleted: [{name: 'DOCUMENT-cookie'}]},
'Deletion observed after document.cookie cookie-clearing' +
' using max-age=0');
}, 'document.cookie set/overwrite/delete observed by CookieStore');
cookie_test(async t => {
let eventPromise = observeNextCookieChangeEvent();
await cookieStore.set('DOCUMENT-cookie', 'value');
assert_equals(
await getCookieString(),
'DOCUMENT-cookie=value',
'Cookie we wrote using CookieStore in cookie jar');
assert_equals(
await getCookieStringHttp(),
'DOCUMENT-cookie=value',
'Cookie we wrote using CookieStore in HTTP cookie jar');
assert_equals(
await getCookieStringDocument(),
'DOCUMENT-cookie=value',
'Cookie we wrote using CookieStore in document.cookie');
await verifyCookieChangeEvent(
eventPromise, {changed: [{name: 'DOCUMENT-cookie', value: 'value'}]},
'Cookie we wrote using CookieStore is observed');
eventPromise = observeNextCookieChangeEvent();
await cookieStore.set('DOCUMENT-cookie', 'new-value');
assert_equals(
await getCookieString(),
'DOCUMENT-cookie=new-value',
'Cookie we overwrote using CookieStore in cookie jar');
assert_equals(
await getCookieStringHttp(),
'DOCUMENT-cookie=new-value',
'Cookie we overwrote using CookieStore in HTTP cookie jar');
assert_equals(
await getCookieStringDocument(),
'DOCUMENT-cookie=new-value',
'Cookie we overwrote using CookieStore in document.cookie');
await verifyCookieChangeEvent(
eventPromise, {changed: [{name: 'DOCUMENT-cookie', value: 'new-value'}]},
'Cookie we overwrote using CookieStore is observed');
eventPromise = observeNextCookieChangeEvent();
await cookieStore.delete('DOCUMENT-cookie');
assert_equals(
await getCookieString(),
undefined,
'Empty cookie jar after CookieStore delete');
assert_equals(
await getCookieStringHttp(),
undefined,
'Empty HTTP cookie jar after CookieStore delete');
assert_equals(
await getCookieStringDocument(),
undefined,
'Empty document.cookie cookie jar after CookieStore delete');
await verifyCookieChangeEvent(
eventPromise, {deleted: [{name: 'DOCUMENT-cookie'}]},
'Deletion observed after CookieStore delete');
}, 'CookieStore set/overwrite/delete observed by document.cookie');
cookie_test(async t => {
let eventPromise = observeNextCookieChangeEvent();
await setCookieStringDocument('DOCUMENT-🍪=🔵; path=/');
assert_equals(
await getCookieString(),
'DOCUMENT-🍪=🔵',
'Cookie we wrote using document.cookie in cookie jar');
await verifyCookieChangeEvent(
eventPromise, {changed: [{name: 'DOCUMENT-🍪', value: '🔵'}]},
'Cookie we wrote using document.cookie is observed');
eventPromise = observeNextCookieChangeEvent();
await setCookieStringDocument('DOCUMENT-🍪=DELETED; path=/; max-age=0');
assert_equals(
await getCookieString(),
undefined,
'Empty cookie jar after document.cookie' +
' cookie-clearing using max-age=0');
await verifyCookieChangeEvent(
eventPromise, {deleted: [{name: 'DOCUMENT-🍪'}]},
'Deletion observed after document.cookie cookie-clearing' +
' using max-age=0');
}, 'Verify interoperability of document.cookie with other APIs.');
}, 'CookieStore agrees with document.cookie on encoding non-ASCII cookies');
cookie_test(async t => {
await cookieStore.set('DOCUMENT-🍪', '🔵');
assert_equals(
await getCookieStringDocument(),
'DOCUMENT-🍪=🔵',
'Cookie we wrote using CookieStore in document.cookie');
await cookieStore.delete('DOCUMENT-🍪');
assert_equals(
await getCookieStringDocument(),
undefined,
'Empty cookie jar after CookieStore delete');
}, 'document.cookie agrees with CookieStore on encoding non-ASCII cookies');

View file

@ -1,74 +0,0 @@
'use strict';
cookie_test(async t => {
let eventPromise = observeNextCookieChangeEvent();
await cookieStore.set('TEST', 'value0');
assert_equals(
await getCookieString(),
'TEST=value0',
'Cookie jar contains only cookie we set');
assert_equals(
await getCookieStringHttp(),
'TEST=value0',
'HTTP cookie jar contains only cookie we set');
await verifyCookieChangeEvent(
eventPromise,
{changed: [{name: 'TEST', value: 'value0'}]},
'Observed value that was set');
eventPromise = observeNextCookieChangeEvent();
await cookieStore.set('TEST', 'value');
assert_equals(
await getCookieString(),
'TEST=value',
'Cookie jar contains only cookie we overwrote');
await verifyCookieChangeEvent(
eventPromise,
{changed: [{name: 'TEST', value: 'value'}]},
'Observed value that was overwritten');
let allCookies = await cookieStore.getAll();
assert_equals(
allCookies[0].name,
'TEST',
'First entry in allCookies should be named TEST');
assert_equals(
allCookies[0].value,
'value',
'First entry in allCookies should have value "value"');
assert_equals(
allCookies.length,
1,
'Only one cookie should exist in allCookies');
let firstCookie = await cookieStore.get();
assert_equals(
firstCookie.name,
'TEST',
'First cookie should be named TEST');
assert_equals(
firstCookie.value,
'value',
'First cookie should have value "value"');
let allCookies_TEST = await cookieStore.getAll('TEST');
assert_equals(
allCookies_TEST[0].name,
'TEST',
'First entry in allCookies_TEST should be named TEST');
assert_equals(
allCookies_TEST[0].value,
'value',
'First entry in allCookies_TEST should have value "value"');
assert_equals(
allCookies_TEST.length,
1,
'Only one cookie should exist in allCookies_TEST');
let firstCookie_TEST = await cookieStore.get('TEST');
assert_equals(
firstCookie_TEST.name,
'TEST',
'First TEST cookie should be named TEST');
assert_equals(
firstCookie_TEST.value,
'value',
'First TEST cookie should have value "value"');
}, 'Get/set/get all cookies in store');

View file

@ -1,5 +1,50 @@
'use strict';
cookie_test(async t => {
let eventPromise = observeNextCookieChangeEvent();
await setCookieStringHttp('HTTP-cookie=value; path=/');
assert_equals(
await getCookieString(),
'HTTP-cookie=value',
'Cookie we wrote using HTTP in cookie jar');
assert_equals(
await getCookieStringHttp(),
'HTTP-cookie=value',
'Cookie we wrote using HTTP in HTTP cookie jar');
await verifyCookieChangeEvent(
eventPromise, {changed: [{name: 'HTTP-cookie', value: 'value'}]},
'Cookie we wrote using HTTP is observed');
eventPromise = observeNextCookieChangeEvent();
await setCookieStringHttp('HTTP-cookie=new-value; path=/');
assert_equals(
await getCookieString(),
'HTTP-cookie=new-value',
'Cookie we overwrote using HTTP in cookie jar');
assert_equals(
await getCookieStringHttp(),
'HTTP-cookie=new-value',
'Cookie we overwrote using HTTP in HTTP cookie jar');
await verifyCookieChangeEvent(
eventPromise, {changed: [{name: 'HTTP-cookie', value: 'new-value'}]},
'Cookie we overwrote using HTTP is observed');
eventPromise = observeNextCookieChangeEvent();
await setCookieStringHttp('HTTP-cookie=DELETED; path=/; max-age=0');
assert_equals(
await getCookieString(),
undefined,
'Empty cookie jar after HTTP cookie-clearing using max-age=0');
assert_equals(
await getCookieStringHttp(),
undefined,
'Empty HTTP cookie jar after HTTP cookie-clearing using max-age=0');
await verifyCookieChangeEvent(
eventPromise, {deleted: [{name: 'HTTP-cookie'}]},
'Deletion observed after HTTP cookie-clearing using max-age=0');
}, 'HTTP set/overwrite/delete observed in CookieStore');
cookie_test(async t => {
let eventPromise = observeNextCookieChangeEvent();
await setCookieStringHttp('HTTP-🍪=🔵; path=/');
@ -7,10 +52,6 @@ cookie_test(async t => {
await getCookieString(),
'HTTP-🍪=🔵',
'Cookie we wrote using HTTP in cookie jar');
assert_equals(
await getCookieStringHttp(),
'HTTP-🍪=🔵',
'Cookie we wrote using HTTP in HTTP cookie jar');
await verifyCookieChangeEvent(
eventPromise, {changed: [{name: 'HTTP-🍪', value: '🔵'}]},
'Cookie we wrote using HTTP is observed');
@ -21,77 +62,127 @@ cookie_test(async t => {
await getCookieString(),
undefined,
'Empty cookie jar after HTTP cookie-clearing using max-age=0');
assert_equals(
await getCookieStringHttp(),
undefined,
'Empty HTTP cookie jar after HTTP cookie-clearing using max-age=0');
await verifyCookieChangeEvent(
eventPromise, {deleted: [{name: 'HTTP-🍪'}]},
'Deletion observed after HTTP cookie-clearing using max-age=0');
await cookieStore.delete('HTTP-🍪');
}, 'Interoperability of HTTP Set-Cookie: with other APIs');
}, 'CookieStore agreed with HTTP headers agree on encoding non-ASCII cookies');
cookie_test(async t => {
let eventPromise = observeNextCookieChangeEvent();
await setCookieStringHttp('HTTPONLY-🍪=🔵; path=/; httponly');
await cookieStore.set('TEST', 'value0');
assert_equals(
await getCookieString(),
undefined,
'HttpOnly cookie we wrote using HTTP in cookie jar' +
' is invisible to script');
'TEST=value0',
'Cookie jar contains only cookie we set');
assert_equals(
await getCookieStringHttp(),
'HTTPONLY-🍪=🔵',
'HttpOnly cookie we wrote using HTTP in HTTP cookie jar');
'TEST=value0',
'HTTP cookie jar contains only cookie we set');
await verifyCookieChangeEvent(
eventPromise,
{changed: [{name: 'TEST', value: 'value0'}]},
'Observed value that was set');
eventPromise = observeNextCookieChangeEvent();
await setCookieStringHttp(
'HTTPONLY-🍪=DELETED; path=/; max-age=0; httponly');
await cookieStore.set('TEST', 'value');
assert_equals(
await getCookieString(),
'TEST=value',
'Cookie jar contains only cookie we set');
assert_equals(
await getCookieStringHttp(),
'TEST=value',
'HTTP cookie jar contains only cookie we set');
await verifyCookieChangeEvent(
eventPromise,
{changed: [{name: 'TEST', value: 'value'}]},
'Observed value that was overwritten');
eventPromise = observeNextCookieChangeEvent();
await cookieStore.delete('TEST');
assert_equals(
await getCookieString(),
undefined,
'Empty cookie jar after HTTP cookie-clearing using max-age=0');
'Cookie jar does not contain cookie we deleted');
assert_equals(
await getCookieStringHttp(),
undefined,
'Empty HTTP cookie jar after HTTP cookie-clearing using max-age=0');
// HTTPONLY cookie changes should not have been observed; perform
// a dummy change to verify that nothing else was queued up.
await cookieStore.set('TEST', 'dummy');
'HTTP cookie jar does not contain cookie we deleted');
await verifyCookieChangeEvent(
eventPromise, {changed: [{name: 'TEST', value: 'dummy'}]},
'HttpOnly cookie deletion was not observed');
}, 'HttpOnly cookies are not observed');
eventPromise,
{deleted: [{name: 'TEST'}]},
'Observed cookie that was deleted');
}, 'CookieStore set/overwrite/delete observed in HTTP headers');
cookie_test(async t => {
await cookieStore.set('🍪', '🔵');
assert_equals(
await getCookieStringHttp(),
'🍪=🔵',
'HTTP cookie jar contains only cookie we set');
await cookieStore.delete('🍪');
assert_equals(
await getCookieStringHttp(),
undefined,
'HTTP cookie jar does not contain cookie we deleted');
}, 'HTTP headers agreed with CookieStore on encoding non-ASCII cookies');
cookie_test(async t => {
// Non-UTF-8 byte sequences cause the Set-Cookie to be dropped.
let eventPromise = observeNextCookieChangeEvent();
await setCookieBinaryHttp(
unescape(encodeURIComponent('HTTP-🍪=🔵')) + '\xef\xbf\xbd; path=/');
unescape(encodeURIComponent('HTTP-cookie=value')) + '\xef\xbf\xbd; path=/');
assert_equals(
await getCookieString(),
'HTTP-🍪=🔵\ufffd',
'HTTP-cookie=value\ufffd',
'Binary cookie we wrote using HTTP in cookie jar');
assert_equals(
await getCookieStringHttp(),
'HTTP-🍪=🔵\ufffd',
'HTTP-cookie=value\ufffd',
'Binary cookie we wrote using HTTP in HTTP cookie jar');
assert_equals(
decodeURIComponent(escape(await getCookieBinaryHttp())),
'HTTP-🍪=🔵\ufffd',
'HTTP-cookie=value\ufffd',
'Binary cookie we wrote in binary HTTP cookie jar');
assert_equals(
await getCookieBinaryHttp(),
unescape(encodeURIComponent('HTTP-🍪=🔵')) + '\xef\xbf\xbd',
unescape(encodeURIComponent('HTTP-cookie=value')) + '\xef\xbf\xbd',
'Binary cookie we wrote in binary HTTP cookie jar');
await verifyCookieChangeEvent(
eventPromise, {changed: [{name: 'HTTP-🍪', value: '🔵\ufffd'}]},
eventPromise, {changed: [{name: 'HTTP-cookie', value: 'value\ufffd'}]},
'Binary cookie we wrote using HTTP is observed');
eventPromise = observeNextCookieChangeEvent();
await setCookieBinaryHttp(
unescape(encodeURIComponent('HTTP-🍪=DELETED; path=/; max-age=0')));
unescape(encodeURIComponent('HTTP-cookie=new-value')) + '\xef\xbf\xbd; path=/');
assert_equals(
await getCookieString(),
'HTTP-cookie=new-value\ufffd',
'Binary cookie we overwrote using HTTP in cookie jar');
assert_equals(
await getCookieStringHttp(),
'HTTP-cookie=new-value\ufffd',
'Binary cookie we overwrote using HTTP in HTTP cookie jar');
assert_equals(
decodeURIComponent(escape(await getCookieBinaryHttp())),
'HTTP-cookie=new-value\ufffd',
'Binary cookie we overwrote in binary HTTP cookie jar');
assert_equals(
await getCookieBinaryHttp(),
unescape(encodeURIComponent('HTTP-cookie=new-value')) + '\xef\xbf\xbd',
'Binary cookie we overwrote in binary HTTP cookie jar');
await verifyCookieChangeEvent(
eventPromise, {changed: [{name: 'HTTP-cookie', value: 'new-value\ufffd'}]},
'Binary cookie we overwrote using HTTP is observed');
eventPromise = observeNextCookieChangeEvent();
await setCookieBinaryHttp(
unescape(encodeURIComponent('HTTP-cookie=DELETED; path=/; max-age=0')));
assert_equals(
await getCookieString(),
undefined,
@ -107,6 +198,6 @@ cookie_test(async t => {
'Empty binary HTTP cookie jar after' +
' binary HTTP cookie-clearing using max-age=0');
await verifyCookieChangeEvent(
eventPromise, {deleted: [{name: 'HTTP-🍪'}]},
eventPromise, {deleted: [{name: 'HTTP-cookie'}]},
'Deletion observed after binary HTTP cookie-clearing using max-age=0');
}, 'Binary HTTP cookies');
}, 'Binary HTTP set/overwrite/delete observed in CookieStore');

View file

@ -1,40 +1,38 @@
'use strict';
// TODO(jsbell): Does this test really need simple origin ('__Host-') cookies?
cookie_test(async t => {
await cookieStore.set('__Host-1🍪', '🔵cookie-value1🔴');
await cookieStore.set('__Host-2🌟', '🌠cookie-value2🌠');
await cookieStore.set('__Host-3🌱', '🔶cookie-value3🔷');
await cookieStore.set('ordered-1', 'cookie-value1');
await cookieStore.set('ordered-2', 'cookie-value2');
await cookieStore.set('ordered-3', 'cookie-value3');
// NOTE: this assumes no concurrent writes from elsewhere; it also
// uses three separate cookie jar read operations where a single getAll
// would be more efficient, but this way the CookieStore does the filtering
// for us.
const matchingValues = await Promise.all([ '1🍪', '2🌟', '3🌱' ].map(
async suffix => (await cookieStore.get('__Host-' + suffix)).value));
const matchingValues = await Promise.all(['1', '2', '3'].map(
async suffix => (await cookieStore.get('ordered-' + suffix)).value));
const actual = matchingValues.join(';');
const expected = '🔵cookie-value1🔴;🌠cookie-value2🌠;🔶cookie-value3🔷';
const expected = 'cookie-value1;cookie-value2;cookie-value3';
assert_equals(actual, expected);
}, 'Set three simple origin session cookies sequentially and ensure ' +
'they all end up in the cookie jar in order.');
cookie_test(async t => {
await Promise.all([
cookieStore.set('__Host-unordered1🍪', '🔵unordered-cookie-value1🔴'),
cookieStore.set('__Host-unordered2🌟', '🌠unordered-cookie-value2🌠'),
cookieStore.set('__Host-unordered3🌱', '🔶unordered-cookie-value3🔷')
cookieStore.set('ordered-unordered1', 'unordered-cookie-value1'),
cookieStore.set('ordered-unordered2', 'unordered-cookie-value2'),
cookieStore.set('ordered-unordered3', 'unordered-cookie-value3')
]);
// NOTE: this assumes no concurrent writes from elsewhere; it also
// uses three separate cookie jar read operations where a single getAll
// would be more efficient, but this way the CookieStore does the filtering
// for us and we do not need to sort.
const matchingCookies = await Promise.all([ '1🍪', '2🌟', '3🌱' ].map(
suffix => cookieStore.get('__Host-unordered' + suffix)));
const matchingCookies = await Promise.all(['1', '2', '3'].map(
suffix => cookieStore.get('ordered-unordered' + suffix)));
const actual = matchingCookies.map(({ value }) => value).join(';');
const expected =
'🔵unordered-cookie-value1🔴;' +
'🌠unordered-cookie-value2🌠;' +
'🔶unordered-cookie-value3🔷';
'unordered-cookie-value1;' +
'unordered-cookie-value2;' +
'unordered-cookie-value3';
assert_equals(actual, expected);
}, 'Set three simple origin session cookies in undefined order using ' +
'Promise.all and ensure they all end up in the cookie jar in any ' +

View file

@ -2,6 +2,7 @@ dist
dist_last
build-temp
tools/cache
tools/_virtualenv
*.xcodeproj
*.DS_Store
*.pyc

View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<title>A new formatting context that fits beside an adjoining float, and thus pulls down the float with its top margin</title>
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#bfc-next-to-float" title="9.5 Floats">
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#flow-control" title="9.5.2 Controlling flow next to floats: the 'clear' property">
<meta name="assert" content="The float is adjoining with the box that establishes a new formatting context when it fits beside it, and will therefore be affected by its margin">
<link rel="match" href="../../reference/ref-filled-green-200px-square.html">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="overflow:hidden; width:200px; background:green;">
<div style="width:300px; margin-top:50px; background:red;">
<div>
<div style="float:left; width:200px; height:10px; background:green;"></div>
</div>
<div style="margin-top:190px; overflow:hidden; width:100px; height:10px; background:red;"></div>
</div>
</div>

View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<title>A new formatting context that doesn't fit beside a float make the float non-adjoining</title>
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#bfc-next-to-float" title="9.5 Floats">
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#flow-control" title="9.5.2 Controlling flow next to floats: the 'clear' property">
<meta name="assert" content="Although the 'clear' property isn't specified in this test, a new formatting context that doesn't fit below a float that would otherwise be adjoining will need to separate its margin from the float, so that it doesn't affect the float. This is very similar to clearance.">
<link rel="match" href="../../reference/ref-filled-green-200px-square.html">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="overflow:hidden; width:200px; background:red;">
<div>
<div>
<div style="float:left; width:200px; height:200px; background:green;"></div>
</div>
<div style="margin-top:200px; overflow:hidden; width:200px; height:1px; background:white;"></div>
</div>
</div>

View file

@ -1,32 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Background Clip Follows Rounded Corner</title>
<link rel="match" href="reference/background-rounded-image-clip.html">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#corner-clipping">
<style>
html {
background-color: green;
}
#a {
top: 20px;
left: 20px;
position: absolute;
width: 20px;
height: 20px;
background-color: black;
}
#b {
position: absolute;
width: 300px;
height: 200px;
background-image: linear-gradient(green, green);
background-clip: content-box;
border-top-left-radius: 90px;
border-width: 10px;
border-style: solid;
border-color: transparent;
}
</style>
<div id="a"></div>
<div id="b"></div>

View file

@ -1,17 +0,0 @@
<!doctype html>
<meta charset="utf-8">
<title>Corner Clipped Background Color</title>
<style>
html {
background-color: green;
}
#a {
top: 20px;
left: 20px;
position: absolute;
width: 20px;
height: 20px;
background-color: black;
}
</style>
<div id="a"></div>

View file

@ -0,0 +1,93 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Flexbox Test: Percentage size on child of a flex item with margin, border, padding and scrollbar</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#flex-items">
<link rel="match" href="reference/percentage-size-subitems-001-ref.html">
<meta name="assert" content="Checks that flex items children resolve properly their percentage sizes, even when the flex item has margin, border, padding and scrollbar.">
<style>
.flex {
display: inline-flex;
border: solid 5px black;
width: 150px;
height: 100px;
margin: 10px;
vertical-align: top;
}
.item {
flex: 1;
overflow: scroll;
border: solid magenta;
border-width: 12px 9px 6px 3px;
margin: 1px 2px 3px 4px;
padding: 5px 15px 10px 20px;
background: cyan;
}
.subitem {
width: 100%;
height: 100%;
background: yellow;
}
.horizontalTB { writing-mode: horizontal-tb; }
.verticalLR { writing-mode: vertical-lr; }
.verticalRL { writing-mode: vertical-rl; }
</style>
<p>The test passes if in the different examples you see scrollbars but there's no overflow, so you cannot actually scroll.</p>
<div class="flex">
<div class="item horizontalTB">
<div class="subitem"></div>
</div>
</div>
<div class="flex">
<div class="item horizontalTB">
<div class="subitem verticalLR"></div>
</div>
</div>
<div class="flex">
<div class="item horizontalTB">
<div class="subitem verticalRL"></div>
</div>
</div>
<div class="flex">
<div class="item verticalLR">
<div class="subitem"></div>
</div>
</div>
<div class="flex">
<div class="item verticalLR">
<div class="subitem horizontalTB"></div>
</div>
</div>
<div class="flex">
<div class="item verticalLR">
<div class="subitem verticalRL"></div>
</div>
</div>
<div class="flex">
<div class="item verticalRL">
<div class="subitem"></div>
</div>
</div>
<div class="flex">
<div class="item verticalRL">
<div class="subitem horizontalTB"></div>
</div>
</div>
<div class="flex">
<div class="item verticalRL">
<div class="subitem verticalLR"></div>
</div>
</div>

View file

@ -0,0 +1,92 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Refttest Reference: Percentage size on child of a flex item with margin, border, padding and scrollbar</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<style>
.flex {
display: inline-block;
border: solid 5px black;
width: 150px;
height: 100px;
margin: 10px;
vertical-align: top;
}
.item {
overflow: scroll;
border: solid magenta;
border-width: 12px 9px 6px 3px;
margin: 1px 2px 3px 4px;
padding: 5px 15px 10px 20px;
background: cyan;
width: calc(100% - 6px);
height: calc(100% - 4px);
box-sizing: border-box;
}
.subitem {
width: 100%;
height: 100%;
background: yellow;
}
.horizontalTB { writing-mode: horizontal-tb; }
.verticalLR { writing-mode: vertical-lr; }
.verticalRL { writing-mode: vertical-rl; }
</style>
<p>The test passes if in the different examples you see scrollbars but there's no overflow, so you cannot actually scroll.</p>
<div class="flex">
<div class="item horizontalTB">
<div class="subitem"></div>
</div>
</div>
<div class="flex">
<div class="item horizontalTB">
<div class="subitem verticalLR"></div>
</div>
</div>
<div class="flex">
<div class="item horizontalTB">
<div class="subitem verticalRL"></div>
</div>
</div>
<div class="flex">
<div class="item verticalLR">
<div class="subitem"></div>
</div>
</div>
<div class="flex">
<div class="item verticalLR">
<div class="subitem horizontalTB"></div>
</div>
</div>
<div class="flex">
<div class="item verticalLR">
<div class="subitem verticalRL"></div>
</div>
</div>
<div class="flex">
<div class="item verticalRL">
<div class="subitem"></div>
</div>
</div>
<div class="flex">
<div class="item verticalRL">
<div class="subitem horizontalTB"></div>
</div>
</div>
<div class="flex">
<div class="item verticalRL">
<div class="subitem verticalLR"></div>
</div>
</div>

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<title>font-display should work for preloaded fonts</title>
<style>
.arial {
height: 20px;
font-family: Arial;
}
</style>
<div id="container">
<div class="arial"></div>
<div class="arial"></div>
<div class="arial">Swap</div>
<div class="arial">Fallback</div>
<div class="arial">Optional</div>
</div>
</html>

View file

@ -0,0 +1,51 @@
<!DOCTYPE html>
<html class="reftest-wait">
<title>font-display should work for preloaded fonts</title>
<link id="link" href="/fonts/Ahem.ttf?pipe=trickle(d5)" as="font" type="font/ttf" crossorigin>
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#font-display-desc">
<link rel="match" href="font-display-preload-ref.html">
<style>
@font-face {
font-family: 'Auto';
src: url('/fonts/Ahem.ttf?pipe=trickle(d5)');
font-display: auto;
}
@font-face {
font-family: 'Block';
src: url('/fonts/Ahem.ttf?pipe=trickle(d5)');
font-display: block;
}
@font-face {
font-family: 'Swap';
src: url('/fonts/Ahem.ttf?pipe=trickle(d5)');
font-display: swap;
}
@font-face {
font-family: 'Fallback';
src: url('/fonts/Ahem.ttf?pipe=trickle(d5)');
font-display: fallback;
}
@font-face {
font-family: 'Optional';
src: url('/fonts/Ahem.ttf?pipe=trickle(d5)');
font-display: optional;
}
</style>
<div id="container" hidden>
<div style="height: 20px; font-family: 'Auto', Arial">Auto</div>
<div style="height: 20px; font-family: 'Block', Arial">Block</div>
<div style="height: 20px; font-family: 'Swap', Arial">Swap</div>
<div style="height: 20px; font-family: 'Fallback', Arial">Fallback</div>
<div style="height: 20px; font-family: 'Optional', Arial">Optional</div>
</div>
<script>
window.onload = () => {
document.getElementById('link').rel = 'preload';
document.getElementById('container').hidden = false;
const timeoutMsec = 200; // Between the short limit and the long limit
setTimeout(() => {
document.documentElement.classList.remove("reftest-wait");
}, timeoutMsec);
};
</script>
</html>

View file

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html class="reftest-wait">
<title>Test for font-display @font-face descriptor</title>
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#font-display-desc">
<link rel="match" href="font-display-ref.html">
<style>
.hidden { display: none; }

View file

@ -0,0 +1,93 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Refttest Reference: Percentage size on child of a grid item with margin, border, padding and scrollbar</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<style>
.grid {
display: inline-block;
border: solid 5px black;
width: 150px;
height: 100px;
margin: 10px;
vertical-align: top;
}
.item {
overflow: scroll;
border: solid magenta;
border-width: 12px 9px 6px 3px;
margin: 1px 2px 3px 4px;
padding: 5px 15px 10px 20px;
background: cyan;
width: calc(100% - 6px);
height: calc(100% - 4px);
box-sizing: border-box;
}
.subitem {
width: 100%;
height: 100%;
background: yellow;
font: 20px/1 Ahem;
}
.horizontalTB { writing-mode: horizontal-tb; }
.verticalLR { writing-mode: vertical-lr; }
.verticalRL { writing-mode: vertical-rl; }
</style>
<p>The test passes if in the different examples you see scrollbars but there's no overflow, so you cannot actually scroll.</p>
<div class="grid">
<div class="item horizontalTB">
<div class="subitem"></div>
</div>
</div>
<div class="grid">
<div class="item horizontalTB">
<div class="subitem verticalLR"></div>
</div>
</div>
<div class="grid">
<div class="item horizontalTB">
<div class="subitem verticalRL"></div>
</div>
</div>
<div class="grid">
<div class="item verticalLR">
<div class="subitem"></div>
</div>
</div>
<div class="grid">
<div class="item verticalLR">
<div class="subitem horizontalTB"></div>
</div>
</div>
<div class="grid">
<div class="item verticalLR">
<div class="subitem verticalRL"></div>
</div>
</div>
<div class="grid">
<div class="item verticalRL">
<div class="subitem"></div>
</div>
</div>
<div class="grid">
<div class="item verticalRL">
<div class="subitem horizontalTB"></div>
</div>
</div>
<div class="grid">
<div class="item verticalRL">
<div class="subitem verticalLR"></div>
</div>
</div>

View file

@ -0,0 +1,91 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Test: Percentage size on child of a grid item with margin, border, padding and scrollbar</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-items">
<link rel="match" href="percentage-size-subitems-001-ref.html">
<meta name="assert" content="Checks that grid items children resolve properly their percentage sizes, even when the grid item has margin, border, padding and scrollbar.">
<style>
.grid {
display: inline-grid;
border: solid 5px black;
grid: 100px / 150px;
margin: 10px;
vertical-align: top;
}
.item {
overflow: scroll;
border: solid magenta;
border-width: 12px 9px 6px 3px;
margin: 1px 2px 3px 4px;
padding: 5px 15px 10px 20px;
background: cyan;
}
.subitem {
width: 100%;
height: 100%;
background: yellow;
}
.horizontalTB { writing-mode: horizontal-tb; }
.verticalLR { writing-mode: vertical-lr; }
.verticalRL { writing-mode: vertical-rl; }
</style>
<p>The test passes if in the different examples you see scrollbars but there's no overflow, so you cannot actually scroll.</p>
<div class="grid">
<div class="item horizontalTB">
<div class="subitem"></div>
</div>
</div>
<div class="grid">
<div class="item horizontalTB">
<div class="subitem verticalLR"></div>
</div>
</div>
<div class="grid">
<div class="item horizontalTB">
<div class="subitem verticalRL"></div>
</div>
</div>
<div class="grid">
<div class="item verticalLR">
<div class="subitem"></div>
</div>
</div>
<div class="grid">
<div class="item verticalLR">
<div class="subitem horizontalTB"></div>
</div>
</div>
<div class="grid">
<div class="item verticalLR">
<div class="subitem verticalRL"></div>
</div>
</div>
<div class="grid">
<div class="item verticalRL">
<div class="subitem"></div>
</div>
</div>
<div class="grid">
<div class="item verticalRL">
<div class="subitem horizontalTB"></div>
</div>
</div>
<div class="grid">
<div class="item verticalRL">
<div class="subitem verticalLR"></div>
</div>
</div>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 3: parsing gradients with invalid position values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#typedef-position">
<meta name="assert" content="gradient positions support only the '<position>' grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
// The following were supported in an earlier version of the spec.
// https://github.com/w3c/csswg-drafts/issues/2140
// Deprecated in Blink with support to be removed in M68, around July 2018.
test_invalid_value("background-image", "radial-gradient(at center left 1px, red, blue)");
test_invalid_value("background-image", "radial-gradient(at center top 2px, red, blue)");
test_invalid_value("background-image", "radial-gradient(at right 3% center, red, blue)");
test_invalid_value("background-image", "radial-gradient(at left 4px top, red, blue)");
test_invalid_value("background-image", "radial-gradient(at right top 5px, red, blue)");
test_invalid_value("background-image", "radial-gradient(at bottom 6% center, red, blue)");
test_invalid_value("background-image", "radial-gradient(at bottom 7% left, red, blue)");
test_invalid_value("background-image", "radial-gradient(at bottom right 8%, red, blue)");
</script>
</body>
</html>

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 3: parsing gradients with valid position values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#typedef-position">
<meta name="assert" content="gradient positions support the full '<position>' grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
// Where two values are shown, the first serialization is being used by Blink/Firefox/WebKit and the second by Edge.
test_valid_value("background-image", "radial-gradient(at 10%, red, blue)", ["radial-gradient(at 10% center, red, blue)", "radial-gradient(at 10%, red, blue)"]);
test_valid_value("background-image", "radial-gradient(at 20% 30px, red, blue)");
test_valid_value("background-image", "radial-gradient(at 30px center, red, blue)", ["radial-gradient(at 30px center, red, blue)", "radial-gradient(at 30px, red, blue)"]);
test_valid_value("background-image", "radial-gradient(at 40px top, red, blue)");
test_valid_value("background-image", "radial-gradient(at bottom 10% right 20%, red, blue)", "radial-gradient(at right 20% bottom 10%, red, blue)");
test_valid_value("background-image", "radial-gradient(at bottom right, red, blue)", "radial-gradient(at right bottom, red, blue)");
test_valid_value("background-image", "radial-gradient(at center, red, blue)", ["radial-gradient(at center center, red, blue)", "radial-gradient(at center, red, blue)"]);
test_valid_value("background-image", "radial-gradient(at center 50px, red, blue)");
test_valid_value("background-image", "radial-gradient(at center bottom, red, blue)", ["radial-gradient(at center bottom, red, blue)", "radial-gradient(at bottom, red, blue)"]);
test_valid_value("background-image", "radial-gradient(at center center, red, blue)", ["radial-gradient(at center center, red, blue)", "radial-gradient(at center, red, blue)"]);
test_valid_value("background-image", "radial-gradient(at center left, red, blue)", ["radial-gradient(at left center, red, blue)", "radial-gradient(at left, red, blue)"]);
test_valid_value("background-image", "radial-gradient(at left, red, blue)", ["radial-gradient(at left center, red, blue)", "radial-gradient(at left, red, blue)"]);
test_valid_value("background-image", "radial-gradient(at left bottom, red, blue)");
test_valid_value("background-image", "radial-gradient(at left center, red, blue)", ["radial-gradient(at left center, red, blue)", "radial-gradient(at left, red, blue)"]);
test_valid_value("background-image", "radial-gradient(at right 40%, red, blue)");
test_valid_value("background-image", "radial-gradient(at right 30% top 60px, red, blue)");
test_valid_value("background-image", "radial-gradient(at top, red, blue)", ["radial-gradient(at center top, red, blue)", "radial-gradient(at top, red, blue)"]);
test_valid_value("background-image", "radial-gradient(at top center, red, blue)", ["radial-gradient(at center top, red, blue)", "radial-gradient(at top, red, blue)"]);
</script>
</body>
</html>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 3: parsing image-orientation with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-images-3/#propdef-image-orientation">
<meta name="assert" content="image-orientation supports only the grammar 'from-image | <angle> | [ <angle>? flip ]'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("image-orientation", "auto");
test_invalid_value("image-orientation", "none");
test_invalid_value("image-orientation", "0");
test_invalid_value("image-orientation", "0 flip");
test_invalid_value("image-orientation", "0deg from-image");
test_invalid_value("image-orientation", "flip 0deg");
test_invalid_value("image-orientation", "flip from-image");
test_invalid_value("image-orientation", "from-image 0deg");
test_invalid_value("image-orientation", "from-image flip");
</script>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 3: parsing image-orientation with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-images-3/#propdef-image-orientation">
<meta name="assert" content="image-orientation supports the full grammar 'from-image | <angle> | [ <angle>? flip ]'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("image-orientation", "from-image");
test_valid_value("image-orientation", "30deg");
test_valid_value("image-orientation", "flip", "0deg flip"); // "0deg flip" in Firefox.
test_valid_value("image-orientation", "-1.25turn flip");
</script>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 3: parsing image-rendering with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-images-3/#propdef-image-rendering">
<meta name="assert" content="image-rendering supports only the grammar 'auto | smooth | high-quality | crisp-edges | pixelated'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("image-rendering", "none");
test_invalid_value("image-rendering", "high-quality crisp-edges");
</script>
</body>
</html>

View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 3: parsing image-rendering with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-images-3/#propdef-image-rendering">
<meta name="assert" content="image-rendering supports the full grammar 'auto | smooth | high-quality | crisp-edges | pixelated'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("image-rendering", "auto");
test_valid_value("image-rendering", "smooth");
test_valid_value("image-rendering", "high-quality");
test_valid_value("image-rendering", "crisp-edges");
test_valid_value("image-rendering", "pixelated");
</script>
</body>
</html>

View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 4: parsing image-resolution with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#propdef-image-resolution">
<meta name="assert" content="image-resolution supports only the grammar '[ from-image || <resolution> ] && snap?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("image-resolution", "auto");
test_invalid_value("image-resolution", "100%");
test_invalid_value("image-resolution", "2");
test_invalid_value("image-resolution", "3dpi snap from-image");
test_invalid_value("image-resolution", "from-image snap 4dppx");
</script>
</body>
</html>

View file

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 4: parsing image-resolution with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#propdef-image-resolution">
<meta name="assert" content="image-resolution supports the full grammar '[ from-image || <resolution> ] && snap?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("image-resolution", "1dpi");
test_valid_value("image-resolution", "2dpcm from-image");
test_valid_value("image-resolution", "3dppx from-image snap");
test_valid_value("image-resolution", "4dpi snap");
test_valid_value("image-resolution", "from-image");
test_valid_value("image-resolution", "from-image 5dpcm");
test_valid_value("image-resolution", "from-image 6dppx snap");
test_valid_value("image-resolution", "from-image snap");
test_valid_value("image-resolution", "snap 7.5dpi");
test_valid_value("image-resolution", "snap -8dpcm from-image");
test_valid_value("image-resolution", "snap from-image");
test_valid_value("image-resolution", "snap from-image 0dppx");
</script>
</body>
</html>

View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 4: parsing object-fit with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#propdef-object-fit">
<meta name="assert" content="object-fit supports only the grammar 'fill | none | [contain | cover] || scale-down'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("object-fit", "auto");
test_invalid_value("object-fit", "contain cover");
test_invalid_value("object-fit", "fill scale-down");
test_invalid_value("object-fit", "contain fill");
test_invalid_value("object-fit", "cover none");
</script>
</body>
</html>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 4: parsing object-fit with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#propdef-object-fit">
<meta name="assert" content="object-fit supports the full grammar 'fill | none | [contain | cover] || scale-down'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("object-fit", "contain");
test_valid_value("object-fit", "contain scale-down");
test_valid_value("object-fit", "cover");
test_valid_value("object-fit", "cover scale-down");
test_valid_value("object-fit", "fill");
test_valid_value("object-fit", "none");
test_valid_value("object-fit", "scale-down");
test_valid_value("object-fit", "scale-down contain");
test_valid_value("object-fit", "scale-down cover");
</script>
</body>
</html>

View file

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 3: parsing object-position with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-images-3/#propdef-object-position">
<meta name="assert" content="object-position supports only the '<position>' grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("object-position", "auto");
test_invalid_value("object-position", "1px 2px 3px");
test_invalid_value("object-position", "left right");
test_invalid_value("object-position", "bottom 10% top 20%");
// The following were supported in an earlier version of the spec.
// https://github.com/w3c/csswg-drafts/issues/2140
// Deprecated in Blink with support to be removed in M68, around July 2018.
test_invalid_value("object-position", "center left 1px");
test_invalid_value("object-position", "center top 2px");
test_invalid_value("object-position", "right 3% center");
test_invalid_value("object-position", "left 4px top");
test_invalid_value("object-position", "right top 5px");
test_invalid_value("object-position", "bottom 6% center");
test_invalid_value("object-position", "bottom 7% left");
test_invalid_value("object-position", "bottom right 8%");
</script>
</body>
</html>

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 3: parsing object-position with valid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-images-3/#propdef-object-position">
<meta name="assert" content="object-position supports the full '<position>' grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/parsing-testcommon.js"></script>
</head>
<body>
<script>
// First serialization is being returned by Blink/Firefox/WebKit, second by Edge.
test_valid_value("object-position", "10%", ["10% center", "10% 50%"]);
test_valid_value("object-position", "right 30% top 60px"); // "calc(70%) 60px" in Edge.
test_valid_value("object-position", "20% 30px");
test_valid_value("object-position", "30px center", ["30px center", "30px 50%"]);
test_valid_value("object-position", "40px top", ["40px top", "40px 0%"]);
test_valid_value("object-position", "bottom 10% right 20%", "right 20% bottom 10%"); // "calc(80%) calc(90%)" in Edge.
test_valid_value("object-position", "bottom right", ["right bottom", "100% 100%"]);
test_valid_value("object-position", "center 50px", ["center 50px", "50% 50px"]);
test_valid_value("object-position", "center bottom", ["center bottom", "50% 100%"]);
test_valid_value("object-position", "center left", ["left center", "0% 50%"]);
test_valid_value("object-position", "left", ["left center", "0% 50%"]);
test_valid_value("object-position", "left bottom", ["left bottom", "0% 100%"]);
test_valid_value("object-position", "left center", ["left center", "0% 50%"]);
test_valid_value("object-position", "right 40%", ["right 40%", "100% 40%"]);
test_valid_value("object-position", "top", ["center top", "50% 0%"]);
test_valid_value("object-position", "top center", ["center top", "50% 0%"]);
// ["center center"] in Blink and Firefox, "center" in WebKit, "50% 50%" in Edge.
test_valid_value("object-position", "center", ["center center", "center", "50% 50%"]);
test_valid_value("object-position", "center center", ["center center", "center", "50% 50%"]);
</script>
</body>
</html>

View file

@ -0,0 +1,39 @@
'use strict';
// serializedValue can be the expected serialization of value,
// or an array of permitted serializations,
// or omitted if value should serialize as value.
function test_valid_value(property, value, serializedValue) {
if (arguments.length < 3)
serializedValue = value;
var stringifiedValue = JSON.stringify(value);
test(function(){
var div = document.createElement('div');
div.style[property] = value;
assert_not_equals(div.style[property], "", "property should be set");
var div = document.createElement('div');
div.style[property] = value;
var readValue = div.style[property];
if (serializedValue instanceof Array)
assert_true(serializedValue.includes(readValue), "serialization should be sound");
else
assert_equals(readValue, serializedValue, "serialization should be canonical");
div.style[property] = readValue;
assert_equals(div.style[property], readValue, "serialization should round-trip");
}, "e.style['" + property + "'] = " + stringifiedValue + " should set the property value");
}
function test_invalid_value(property, value) {
var stringifiedValue = JSON.stringify(value);
test(function(){
var div = document.createElement('div');
div.style[property] = value;
assert_equals(div.style[property], "");
}, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
}

View file

@ -0,0 +1,12 @@
<!doctype html>
<meta charset=utf-8>
<!-- Our target div should be placed as if it were a child of the overflowing --
-- thing; this is simplest to accomplish by just having the overflowing thing --
-- absolutely positioned so the target div is placed as if it were not there -->
<div style="overflow: auto; height: 100px; width: 200px; position: absolute">
<div style="width: 400px; height: 10px"></div>
</div>
<div id="target">Modified text</div>
<script>
document.querySelector("div").scrollLeft = 1000;
</script>

View file

@ -0,0 +1,17 @@
<!doctype html>
<meta charset=utf-8>
<title></title>
<link rel=match href=hypothetical-box-scroll-parent-ref.html>
<link rel="help"
href="https://www.w3.org/TR/CSS2/visudet.html#abs-non-replaced-width">
<div style="overflow: auto; height: 100px; width: 200px">
<div id="target" style="position: absolute">Original text</div>
<div style="width: 400px; height: 10px"></div>
</div>
<script>
// Scroll the parent.
document.querySelector("div").scrollLeft = 1000;
// Now force relayout of the abs pos div.
document.getElementById("target").textContent = "Modified text";
</script>

View file

@ -0,0 +1,7 @@
<!doctype html>
<meta charset=utf-8>
<div>Modified text</div>
<div style="width: 200vw; height: 10px"></div>
<script>
window.scrollTo(window.innerWidth * 2, 0);
</script>

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<title></title>
<link rel=match href=hypothetical-box-scroll-viewport-ref.html>
<link rel="help"
href="https://www.w3.org/TR/CSS2/visudet.html#abs-non-replaced-width">
<div style="position: absolute">Original text</div>
<div style="width: 200vw; height: 10px"></div>
<script>
// Scroll the viewport.
window.scrollTo(window.innerWidth * 2, 0);
// Now force relayout of the abs pos div.
document.querySelector("div").textContent = "Modified text";
</script>

View file

@ -0,0 +1,54 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Declarations trim whitespace from their beginning/ending</title>
<meta name="author" title="Tab Atkins-Bittner">
<link rel=help href="https://drafts.csswg.org/css-syntax/#consume-declaration">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<div id="log"></div>
<style id="style-el">
#foo {
--foo-1:bar;
--foo-2: bar;
--foo-3:bar ;
--foo-4: bar ;
--foo-5: bar !important;
--foo-6: bar !important ;
--foo-7:bar!important;
--foo-8:bar!important ;
--foo-9:bar
}
</style>
<p id=foo>foo</p>
<script>
let stylesheet = getComputedStyle(document.querySelector("#foo"));
let canonical = "bar";
test(function() {
assert_equals(stylesheet.getPropertyValue("--foo-1"), canonical);
}, "--foo-1:bar;");
test(function() {
assert_equals(stylesheet.getPropertyValue("--foo-2"), canonical);
}, "--foo-2: bar;");
test(function() {
assert_equals(stylesheet.getPropertyValue("--foo-3"), canonical);
}, "--foo-3:bar ;");
test(function() {
assert_equals(stylesheet.getPropertyValue("--foo-4"), canonical);
}, "--foo-4: bar ;");
test(function() {
assert_equals(stylesheet.getPropertyValue("--foo-5"), canonical);
}, "--foo-5: bar !important;");
test(function() {
assert_equals(stylesheet.getPropertyValue("--foo-6"), canonical);
}, "--foo-6: bar !important ;");
test(function() {
assert_equals(stylesheet.getPropertyValue("--foo-7"), canonical);
}, "--foo-7:bar!important;");
test(function() {
assert_equals(stylesheet.getPropertyValue("--foo-8"), canonical);
}, "--foo-8:bar!important ;");
test(function() {
assert_equals(stylesheet.getPropertyValue("--foo-9"), canonical);
}, "--foo-9:bar (then ws until end of rule)");
</script>

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reftest Reference: Percentage sizing of table cell children with margin, border, padding and scrollbar</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<style>
.table {
display: block;
border: solid 5px black;
width: 150px;
height: 100px;
}
.td {
background: cyan;
overflow: scroll;
padding: 5px 15px 10px 20px;
border: solid magenta;
border-width: 12px 9px 6px 3px;
height: 100px;
box-sizing: border-box;
}
.child {
background: yellow;
width: 100%;
height: 100%;
}
</style>
<p>The test passes if you see scrollbars but there's no overflow, so you cannot actually scroll.</p>
<div class="table">
<div class="td">
<div class="child"></div>
</div>
</div>

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Table Test: Percentage sizing of table cell children with margin, border, padding and scrollbar</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-tables-3/#content-measure">
<link rel="match" href="percentage-sizing-of-table-cell-children-002-ref.html">
<meta name="assert" content="Checks that table cell children resolve properly their percentage sizes, even when the table cell has margin, border, padding and scrollbar.">
<style>
.table {
display: table;
border: solid 5px black;
width: 150px;
height: 100px;
}
.td {
display: table-cell;
background: cyan;
overflow: scroll;
margin: 1px 2px 3px 4px;
padding: 5px 15px 10px 20px;
border: solid magenta;
border-width: 12px 9px 6px 3px;
}
.child {
background: yellow;
width: 100%;
height: 100%;
}
</style>
<p>The test passes if you see scrollbars but there's no overflow, so you cannot actually scroll.</p>
<div class="table">
<div class="td">
<div class="child"></div>
</div>
</div>

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reftest Reference: Percentage sizing of table cell children with margin, border, padding and scrollbar</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<style>
.table {
display: block;
border: solid 5px black;
width: 150px;
height: 100px;
}
.td {
background: cyan;
overflow: scroll;
padding: 5px 15px 10px 20px;
border: solid magenta;
border-width: 12px 9px 6px 3px;
height: 100px;
box-sizing: border-box;
}
img {
display: block;
background: yellow;
width: 100%;
height: 100%;
}
</style>
<p>The test passes if you see scrollbars but there's no overflow, so you cannot actually scroll.</p>
<div class="table">
<div class="td">
<img />
</div>
</div>

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Table Test: Percentage sizing of table cell replaced children with margin, border, padding and scrollbar</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-tables-3/#content-measure">
<link rel="match" href="percentage-sizing-of-table-cell-replaced-children-001-ref.html">
<meta name="assert" content="Checks that table cell replaced children resolve properly their percentage sizes, even when the table cell has margin, border, padding and scrollbar.">
<style>
.table {
display: table;
border: solid 5px black;
width: 150px;
height: 100px;
}
.td {
display: table-cell;
background: cyan;
overflow: scroll;
margin: 1px 2px 3px 4px;
padding: 5px 15px 10px 20px;
border: solid magenta;
border-width: 12px 9px 6px 3px;
}
img {
display: block;
background: yellow;
width: 100%;
height: 100%;
}
</style>
<p>The test passes if you see scrollbars but there's no overflow, so you cannot actually scroll.</p>
<div class="table">
<div class="td">
<img />
</div>
</div>

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reftest Reference: Percentage size on orthogonal replaced elements</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<style>
.container {
display: inline-block;
border: solid 5px black;
margin: 10px;
vertical-align: top;
width: 200px;
height: 100px;
}
img {
display: block;
width: 200px;
height: 100px;
}
</style>
<p>The test passes if you see four filled lime rectangles with black border and <strong>no red</strong>.</p>
<div class="container">
<img src="support/100x100-lime.png" />
</div>
<div class="container">
<img src="support/100x100-lime.png" />
</div>
<div class="container">
<img src="support/100x100-lime.png" />
</div>
<div class="container">
<img src="support/100x100-lime.png" />
</div>

View file

@ -0,0 +1,46 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Writing Modes Test: Percentage size on orthogonal replaced elements</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#orthogonal-auto">
<link rel="match" href="sizing-percentages-replaced-orthogonal-001-ref.html">
<meta name="assert" content="Checks that orthogonal replaced elements resolve properly their percentage sizes against the expected axis from their containing block.">
<style>
.container {
display: inline-block;
border: solid 5px black;
margin: 10px;
vertical-align: top;
width: 200px;
height: 100px;
background: red;
}
img {
display: block;
width: 100%;
height: 100%;
}
.horizontalTB { writing-mode: horizontal-tb; }
.verticalLR { writing-mode: vertical-lr; }
.verticalRL { writing-mode: vertical-rl; }
</style>
<p>The test passes if you see four filled lime rectangles with black border and <strong>no red</strong>.</p>
<div class="container horizontalTB">
<img class="verticalLR" src="support/100x100-lime.png" />
</div>
<div class="container horizontalTB">
<img class="verticalRL" src="support/100x100-lime.png" />
</div>
<div class="container verticalLR">
<img class="horizontalTB" src="support/100x100-lime.png" />
</div>
<div class="container verticalRL">
<img class="horizontalTB" src="support/100x100-lime.png" />
</div>

View file

@ -56,5 +56,85 @@
window.scrollTo(0, 0);
}, "BODY element scroll-behavior should not propagate to viewport");
var instantHistoryNavigationTest =
async_test("Instant scrolling while doing history navigation.");
var smoothHistoryNavigationTest =
async_test("Smooth scrolling while doing history navigation.");
function instant() {
document.documentElement.className = "";
document.body.className = "";
window.scrollTo(0, 0);
var p = document.createElement("pre");
p.textContent = new Array(1000).join("newline\n");
var a = document.createElement("a");
a.href = "#";
a.name = "foo";
a.textContent = "foo";
p.appendChild(a);
document.body.appendChild(p);
window.onhashchange = function() {
window.onhashchange = function() {
instantHistoryNavigationTest.step(function() {
assert_equals(location.hash, "", "Shouldn't be scrolled to a fragment.");
assert_equals(window.scrollY, 0, "Shouldn't be scrolled back to top yet.");
});
p.remove();
instantHistoryNavigationTest.done();
smooth();
}
instantHistoryNavigationTest.step(function() {
assert_equals(location.hash, "#foo", "Should be scrolled to a fragment.");
assert_not_equals(window.scrollY, 0, "Shouldn't be scrolled to top anymore.");
});
history.back();
}
instantHistoryNavigationTest.step(function() {
assert_equals(window.scrollY, 0, "Should be scrolled to top.");
assert_equals(location.hash, "", "Shouldn't be scrolled to a fragment.");
});
location.hash = "foo";
};
instant();
function smooth() {
document.documentElement.className = "";
document.body.className = "";
window.scrollTo(0, 0);
var p = document.createElement("pre");
p.textContent = new Array(1000).join("newline\n");
var a = document.createElement("a");
a.href = "#";
a.name = "bar";
a.textContent = "bar";
p.appendChild(a);
document.body.appendChild(p);
window.onhashchange = function() {
window.onhashchange = function() {
smoothHistoryNavigationTest.step(function() {
assert_equals(location.hash, "", "Shouldn't be scrolled to a fragment.");
assert_not_equals(window.scrollY, 0, "Shouldn't be scrolled back to top yet.");
});
p.remove();
smoothHistoryNavigationTest.done();
}
smoothHistoryNavigationTest.step(function() {
assert_equals(location.hash, "#bar", "Should be scrolled to a fragment.");
assert_not_equals(window.scrollY, 0, "Shouldn't be scrolled to top anymore.");
});
history.back();
}
smoothHistoryNavigationTest.step(function() {
assert_equals(window.scrollY, 0, "Should be scrolled to top.");
assert_equals(location.hash, "", "Shouldn't be scrolled to a fragment.");
});
location.hash = "bar";
document.documentElement.className = "smooth";
};
testContainer.style.display = "none";
</script>

View file

@ -36,6 +36,7 @@ test(function() {
assert_equals(doc.contentType, "application/xml");
assert_equals(doc.origin, document.origin);
assert_equals(doc.createElement("DIV").localName, "DIV");
assert_equals(doc.createElement("a").constructor, Element);
}, "new Document(): metadata")
test(function() {
@ -47,7 +48,8 @@ test(function() {
test(function() {
var doc = new Document();
var a = doc.createElement("a");
var a = doc.createElementNS("http://www.w3.org/1999/xhtml", "a");
assert_equals(a.constructor, HTMLAnchorElement);
// In UTF-8: 0xC3 0xA4
a.href = "http://example.org/?\u00E4";
assert_equals(a.href, "http://example.org/?%C3%A4");

View file

@ -1,36 +0,0 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Headers idl interface</title>
<meta name="help" href="https://fetch.spec.whatwg.org/#response">
<meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
</head>
<body>
<script id="headers-idl" type="text/plain">
typedef (sequence<sequence<ByteString>> or record<ByteString, ByteString>) HeadersInit;
[Constructor(optional HeadersInit init),
Exposed=(Window,Worker)]
interface Headers {
void append(ByteString name, ByteString value);
void delete(ByteString name);
ByteString? get(ByteString name);
boolean has(ByteString name);
void set(ByteString name, ByteString value);
iterable<ByteString, ByteString>;
};
</script>
<script>
var idlsArray = new IdlArray();
var idl = document.getElementById("headers-idl").textContent
idlsArray.add_idls(idl);
idlsArray.add_objects({ Headers: ['new Headers()'] });
idlsArray.test();
</script>
</body>
</html>

View file

@ -0,0 +1,18 @@
// META: global=window,worker
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
promise_test(async() => {
const text = await (await fetch("/interfaces/fetch.idl")).text();
const idl_array = new IdlArray();
idl_array.add_idls(text);
idl_array.add_untested_idls("[Exposed=(Window,Worker)] interface AbortSignal {};");
idl_array.add_untested_idls("[Exposed=(Window,Worker)] interface ReadableStream {};");
idl_array.add_untested_idls("enum ReferrerPolicy {};");
idl_array.add_objects({
Headers: ["new Headers()"],
Request: ["new Request('about:blank')"],
Response: ["new Response()"],
});
idl_array.test();
}, "Fetch Standard IDL");

View file

@ -425,4 +425,18 @@ promise_test(async t => {
});
}, 'HTMLLinkElement with rel=preload and as=manifest fetches with a "manifest" Request.destination');
// HTMLLinkElement with rel=prefetch - empty string destination
promise_test(async t => {
await new Promise((resolve, reject) => {
let node = frame.contentWindow.document.createElement("link");
node.rel = "prefetch";
node.onload = resolve;
node.onerror = reject;
node.href = "dummy?dest=";
frame.contentWindow.document.body.appendChild(node);
}).catch(() => {
assert_unreached("Fetch errored.");
});
}, 'HTMLLinkElement with rel=prefetch fetches with an empty string Request.destination');
</script>

View file

@ -1,88 +0,0 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Request idl interface</title>
<meta name="help" href="https://fetch.spec.whatwg.org/#response">
<meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
</head>
<body>
<script id="body-idl" type="text/plain">
typedef any JSON;
typedef (Blob or BufferSource or FormData or URLSearchParams or USVString) BodyInit;
interface mixin Body {
readonly attribute ReadableStream? body;
readonly attribute boolean bodyUsed;
[NewObject] Promise<ArrayBuffer> arrayBuffer();
[NewObject] Promise<Blob> blob();
[NewObject] Promise<FormData> formData();
[NewObject] Promise<JSON> json();
[NewObject] Promise<USVString> text();
};
</script>
<script id="request-idl" type="text/plain">
typedef (Request or USVString) RequestInfo;
[Constructor(RequestInfo input, optional RequestInit init),
Exposed=(Window,Worker)]
interface Request {
readonly attribute ByteString method;
readonly attribute USVString url;
[SameObject] readonly attribute Headers headers;
readonly attribute RequestDestination destination;
readonly attribute USVString referrer;
readonly attribute ReferrerPolicy referrerPolicy;
readonly attribute RequestMode mode;
readonly attribute RequestCredentials credentials;
readonly attribute RequestCache cache;
readonly attribute RequestRedirect redirect;
readonly attribute DOMString integrity;
[NewObject] Request clone();
};
Request includes Body;
dictionary RequestInit {
ByteString method;
HeadersInit headers;
BodyInit? body;
USVString referrer;
ReferrerPolicy referrerPolicy;
RequestMode mode;
RequestCredentials credentials;
RequestCache cache;
RequestRedirect redirect;
DOMString integrity;
any window; // can only be set to null
};
enum RequestType { "", "audio", "font", "image", "script", "style", "track", "video" };
enum RequestDestination { "", "document", "sharedworker", "subresource", "unknown", "worker" };
enum RequestMode { "navigate", "same-origin", "no-cors", "cors" };
enum RequestCredentials { "omit", "same-origin", "include" };
enum RequestCache { "default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached" };
enum RequestRedirect { "follow", "error", "manual" };
enum ReferrerPolicy {
"", "no-referrer", "no-referrer-when-downgrade", "origin",
"origin-when-cross-origin", "unsafe-url", "same-origin", "strict-origin",
"strict-origin-when-cross-origin"
};
</script>
<script>
var idlsArray = new IdlArray();
var idl = document.getElementById("body-idl").textContent
idl += document.getElementById("request-idl").textContent
idlsArray.add_idls(idl);
idlsArray.add_untested_idls("interface Headers {};");
idlsArray.add_objects({ Request: ['new Request("")'] });
idlsArray.test();
</script>
</body>
</html>

View file

@ -0,0 +1,36 @@
<!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>

View file

@ -99,6 +99,11 @@
newValue = true;
break;
case "isReloadNavigation":
defaultValue = false;
newValue = true;
break;
default:
return;
}

View file

@ -0,0 +1 @@
hello

View file

@ -0,0 +1,19 @@
self.addEventListener('fetch', (event) => {
const params = new URL(event.request.url).searchParams;
if (params.has('ignore')) {
return;
}
if (!params.has('name')) {
event.respondWith(Promise.reject(TypeError('No name is provided.')));
return;
}
const name = params.get('name');
const old_attribute = event.request[name];
// If any of |init|'s member is present...
const init = {cache: 'no-store'}
const new_attribute = (new Request(event.request, init))[name];
event.respondWith(
new Response(`old: ${old_attribute}, new: ${new_attribute}`));
});

View file

@ -1,68 +0,0 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Response idl interface</title>
<meta name="help" href="https://fetch.spec.whatwg.org/#response">
<meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
</head>
<body>
<script id="body-idl" type="text/plain">
typedef any JSON;
typedef (Blob or BufferSource or FormData or URLSearchParams or USVString) BodyInit;
interface mixin Body {
readonly attribute ReadableStream? body;
readonly attribute boolean bodyUsed;
[NewObject] Promise<ArrayBuffer> arrayBuffer();
[NewObject] Promise<Blob> blob();
[NewObject] Promise<FormData> formData();
[NewObject] Promise<JSON> json();
[NewObject] Promise<USVString> text();
};
</script>
<script id="response-idl" type="text/plain">
[Constructor(optional BodyInit body, optional ResponseInit init),
Exposed=(Window,Worker)]
interface Response {
[NewObject] static Response error();
[NewObject] static Response redirect(USVString url, optional unsigned short status = 302);
readonly attribute ResponseType type;
readonly attribute USVString url;
readonly attribute unsigned short status;
readonly attribute boolean ok;
readonly attribute ByteString statusText;
[SameObject] readonly attribute Headers headers;
readonly attribute Promise<Headers> trailer;
[NewObject] Response clone();
};
Response includes Body;
dictionary ResponseInit {
unsigned short status = 200;
ByteString statusText = "OK";
HeadersInit headers;
};
enum ResponseType { "basic", "cors", "default", "error", "opaque", "opaqueredirect" };
</script>
<script>
var idlsArray = new IdlArray();
var idl = document.getElementById("body-idl").textContent
idl += document.getElementById("response-idl").textContent
idlsArray.add_idls(idl);
idlsArray.add_untested_idls("interface Headers {};");
idlsArray.add_untested_idls("interface ReadableStream {};");
idlsArray.add_objects({ Response: ['new Response()'] });
idlsArray.test();
</script>
</body>
</html>

View file

@ -1,24 +0,0 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>History pushState sets the url</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>
<script>
async_test(function(t) {
var oldLocation = window.location.toString();
window.history.pushState(null, "", "#hash");
assert_equals(oldLocation + "#hash", window.location.toString(), "pushState updates url");
history.back();
window.onhashchange = () => {
assert_equals(oldLocation, window.location.toString(), 'history traversal restores old url');
t.done();
};
}, "history pushState sets url");
</script>
</body>
</html>

View file

@ -25,12 +25,18 @@
</div>
<script>
function showOnline() {
document.getElementById('actualMsg').innerHTML = 'online event is raised.';
function showOnline(e) {
let msg = 'online event is raised';
if (e.target != window)
msg += ' (on the WRONG target)';
document.getElementById('actualMsg').innerHTML = msg + '.';
}
function showOffline() {
document.getElementById('actualMsg').innerHTML = 'offline event is raised.';
function showOffline(e) {
let msg = 'offline event is raised';
if (e.target != window)
msg += ' (on the WRONG target)';
document.getElementById('actualMsg').innerHTML = msg + '.';
}
window.addEventListener("online", showOnline, false);

View file

@ -0,0 +1,22 @@
// In an ideal world this test would eventually be obsolete due to mutation events disappearing. Or
// would have to change to account for mutation events not firing synchronously. Neither seems
// realistic to the author though.
test(t => {
const frame = document.body.appendChild(document.createElement("iframe"));
frame.contentWindow.addEventListener("DOMNodeInserted", t.unreached_func());
frame.contentWindow.addEventListener("DOMNodeInserted", t.unreached_func(), true);
frame.contentWindow.addEventListener("DOMNodeInsertedIntoDocument", t.unreached_func(), true);
frame.contentWindow.addEventListener("DOMNodeRemoved", t.unreached_func());
frame.contentWindow.addEventListener("DOMNodeRemoved", t.unreached_func(), true);
frame.contentWindow.addEventListener("DOMNodeRemovedFromDocument", t.unreached_func(), true);
frame.contentWindow.addEventListener("DOMSubtreeModified", t.unreached_func());
frame.contentWindow.addEventListener("DOMSubtreeModified", t.unreached_func(), true);
assert_equals(frame.contentDocument.documentElement.localName, "html");
frame.contentDocument.open();
assert_equals(frame.contentDocument.documentElement, null);
frame.contentDocument.write("<div>heya</div>");
frame.contentDocument.close();
assert_equals(frame.contentDocument.documentElement.localName, "html");
frame.remove();
}, "document.open(), the HTML parser, and mutation events");

View file

@ -0,0 +1,32 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<link rel="help" href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#constructing-the-form-data-set">
<link ref="help" href="https://xhr.spec.whatwg.org/#dom-formdata">
<link rel="help" href="https://fetch.spec.whatwg.org/#concept-bodyinit-extract">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<iframe name="frame1"></iframe>
<form accept-charset="iso-8859-1" target="frame1" action="/common/blank.html">
<input type="hidden" name="_charset_">
</form>
<script>
test(() => {
let formData = new FormData(document.querySelector('form'));
assert_equals(formData.get('_charset_'), 'UTF-8');
}, 'FormData constructor always produces UTF-8 _charset_ value.');
let t = async_test('_charset_ control sets the expected encoding name.');
t.step(() => {
let iframe = document.querySelector('iframe');
iframe.onload = t.step_func_done(() => {
assert_not_equals(iframe.contentDocument.URL.indexOf('_charset_=windows-1252'), -1);
});
document.querySelector('form').submit();
});
</script>
</body>

Some files were not shown because too many files have changed in this diff Show more