Update web-platform-tests to revision fb15e14b52049f952612623ee0d7fb7a620a57c9

This commit is contained in:
WPT Sync Bot 2018-11-01 21:34:37 -04:00
parent 200cc8aa6b
commit 4a942c982f
141 changed files with 2563 additions and 1589 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,4 @@
[adjacent-to-relpos-inline-that-had-block.html]
[Make sure that we're sized by the right ancestor]
expected: FAIL

View file

@ -1,3 +0,0 @@
[text-indent-percent-001.xht]
type: reftest
expected: FAIL

View file

@ -0,0 +1,10 @@
[animation-delay-computed.html]
[Property animation-delay value '20s, 10s' computes to '20s, 10s']
expected: FAIL
[Property animation-delay value 'calc(2 * 3s)' computes to '6s']
expected: FAIL
[Property animation-delay value '-500ms' computes to '-0.5s']
expected: FAIL

View file

@ -0,0 +1,10 @@
[animation-duration-computed.html]
[Property animation-duration value '20s, 10s' computes to '20s, 10s']
expected: FAIL
[Property animation-duration value 'calc(2 * 3s)' computes to '6s']
expected: FAIL
[Property animation-duration value '500ms' computes to '0.5s']
expected: FAIL

View file

@ -44,9 +44,6 @@
[Matching font-weight: '500' should prefer '500' over '450 460']
expected: FAIL
[Matching font-weight: '500' should prefer '400' over '350 399']
expected: FAIL
[Matching font-weight: '500' should prefer '351 398' over '501 550']
expected: FAIL
@ -101,9 +98,6 @@
[Matching font-style: 'italic' should prefer 'oblique 40deg 50deg' over 'oblique 5deg 10deg']
expected: FAIL
[Matching font-style: 'italic' should prefer 'oblique 5deg 10deg' over 'oblique 5deg']
expected: FAIL
[Matching font-style: 'italic' should prefer 'oblique 5deg' over 'normal']
expected: FAIL
@ -212,9 +206,6 @@
[Matching font-style: 'oblique -21deg' should prefer 'oblique -21deg' over 'oblique -60deg -40deg']
expected: FAIL
[Matching font-style: 'oblique -21deg' should prefer 'oblique -60deg -40deg' over 'oblique -10deg']
expected: FAIL
[Matching font-style: 'oblique -21deg' should prefer 'oblique -10deg' over 'italic']
expected: FAIL
@ -326,3 +317,12 @@
[Matching font-weight: '500' should prefer '450 460' over '400']
expected: FAIL
[Matching font-weight: '501' should prefer '501' over '502 510']
expected: FAIL
[Matching font-style: 'oblique -20deg' should prefer 'oblique -20deg' over 'oblique -60deg -40deg']
expected: FAIL
[Matching font-style: 'oblique 10deg' should prefer 'oblique 10deg' over 'oblique 5deg']
expected: FAIL

View file

@ -0,0 +1,2 @@
[font-descriptor-range-reversed.html]
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[hanging-scrollable-001.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[white-space-pre-wrap-trailing-spaces-001.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[white-space-pre-wrap-trailing-spaces-002.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[white-space-pre-wrap-trailing-spaces-003.html]
expected: FAIL

View file

@ -29,3 +29,39 @@
[Animation between "scale(2) rotate(360deg) translate(100px) matrix(1, 0, 0, 1, 100, 0) skew(0deg)" and "scale(3) rotate(1080deg) translate(200px) matrix(1, 0, 0, 1, 0, 200) skew(720deg)" at progress 0.25]
expected: FAIL
[Match on rotation due to 0deg angle: Animation between "rotateX(90deg) translateX(100px)" and "rotateY(0deg) translateY(200px)" at progress 0.25]
expected: FAIL
[Match on rotation vector: Animation between "rotateX(90deg) translateX(100px)" and "rotate3d(50, 0, 0, 180deg) translateY(200px)" at progress 0.25]
expected: FAIL
[Complete mismatch (except length): Animation between "scale(2) rotate(0deg) translate(100px)" and "rotate(720deg) scale(2) translate(200px)" at progress 0.25]
expected: FAIL
[Mismatched lengths (from is shorter), common part matches: Animation between "translate(100px)" and "translate(200px) rotate(720deg)" at progress 0.25]
expected: FAIL
[Perfect match: Animation between "scale(2) rotate(360deg) translate(100px) matrix(1, 0, 0, 1, 100, 0) skew(0deg)" and "scale(3) rotate(1080deg) translate(200px) matrix(1, 0, 0, 1, 0, 200) skew(720deg)" at progress 0.25]
expected: FAIL
[none -> none: Animation between "none" and "none" at progress 0.25]
expected: FAIL
[something -> none: Animation between "translate(200px) rotate(720deg)" and "none" at progress 0.25]
expected: FAIL
[Common prefix: Animation between "rotate(0deg) translate(100px)" and "rotate(720deg) scale(2) translate(200px)" at progress 0.25]
expected: FAIL
[Matches on primitives: Animation between "translateX(100px) scaleX(3) translate(500px) scale(2)" and "translateY(200px) scale(5) translateX(100px) scaleY(3)" at progress 0.25]
expected: FAIL
[Mismatched lengths (to is shorter), common part matches: Animation between "translate(100px) rotate(720deg)" and "translate(200px)" at progress 0.25]
expected: FAIL
[Complete mismatch including length: Animation between "scale(2) rotate(0deg)" and "rotate(720deg) scale(2) translate(200px)" at progress 0.25]
expected: FAIL
[none -> something: Animation between "none" and "translate(200px) rotate(720deg)" at progress 0.25]
expected: FAIL

View file

@ -0,0 +1,10 @@
[transition-duration-computed.html]
[Property transition-duration value '500ms' computes to '0.5s']
expected: FAIL
[Property transition-duration value 'calc(2 * 3s)' computes to '6s']
expected: FAIL
[Property transition-duration value '20s, 10s' computes to '20s, 10s']
expected: FAIL

View file

@ -74,6 +74,3 @@
[opacity end]
expected: FAIL
[z-index end]
expected: FAIL

View file

@ -5,6 +5,24 @@
[response.headers.get('www-authenticate')]
expected: FAIL
[response.headers.get('heya') expects , \x0b\x0c, 1, , , 2]
expected: FAIL
[response.headers.get('content-length') expects 0]
expected: FAIL
[response.headers.get('foo-test') expects 1, 2, 3]
expected: FAIL
[response.headers.get('double-trouble') expects , ]
expected: FAIL
[response.headers.get('www-authenticate') expects 1, 2, 3, 4]
expected: FAIL
[response.headers.get('content-length') expects 0, 0]
expected: FAIL
[header-value-combining.any.worker.html]
[response.headers.get('foo-test')]
@ -13,11 +31,30 @@
[response.headers.get('www-authenticate')]
expected: FAIL
[response.headers.get('heya') expects , \x0b\x0c, 1, , , 2]
expected: FAIL
[response.headers.get('content-length') expects 0]
expected: FAIL
[response.headers.get('foo-test') expects 1, 2, 3]
expected: FAIL
[response.headers.get('double-trouble') expects , ]
expected: FAIL
[response.headers.get('www-authenticate') expects 1, 2, 3, 4]
expected: FAIL
[response.headers.get('content-length') expects 0, 0]
expected: FAIL
[header-value-combining.any.serviceworker.html]
[header-value-combining]
expected: FAIL
[header-value-combining.any.sharedworker.html]
[header-value-combining]
expected: FAIL

View file

@ -0,0 +1,13 @@
[parsing-nosniff.window.html]
[X-Content-Type-Options%3A%20nosniff%0B%2Cnosniff]
expected: FAIL
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
expected: FAIL
[X-Content-Type-Options%3A%20nosniff%0B]
expected: FAIL
[X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL

View file

@ -1,4 +0,0 @@
[traverse_the_history_4.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -1,4 +1,4 @@
[traverse_the_history_2.html]
[traverse_the_history_5.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -30,3 +30,6 @@
[Set HTTP URL frame location.protocol to ftp]
expected: FAIL
[Set HTTP URL frame location.protocol to x]
expected: FAIL

View file

@ -0,0 +1,34 @@
[no-browsing-context.window.html]
[Invoking `assign` with `/` on a `Location` object sans browsing context is a no-op]
expected: FAIL
[Invoking `replace` with `/` on a `Location` object sans browsing context is a no-op]
expected: FAIL
[Setting `hash` to `test` of a `Location` object sans browsing context is a no-op]
expected: FAIL
[Setting `href` to `test test` of a `Location` object sans browsing context is a no-op]
expected: FAIL
[Invoking `replace` with `http://test:test/` on a `Location` object sans browsing context is a no-op]
expected: FAIL
[Invoking `assign` with `test test` on a `Location` object sans browsing context is a no-op]
expected: FAIL
[Getting `ancestorOrigins` of a `Location` object sans browsing context should be [\]]
expected: FAIL
[Invoking `assign` with `http://test:test/` on a `Location` object sans browsing context is a no-op]
expected: FAIL
[Setting `href` to `/` of a `Location` object sans browsing context is a no-op]
expected: FAIL
[Setting `href` to `http://test:test/` of a `Location` object sans browsing context is a no-op]
expected: FAIL
[Invoking `replace` with `test test` on a `Location` object sans browsing context is a no-op]
expected: FAIL

View file

@ -5,5 +5,5 @@
expected: NOTRUN
[calling play() on a sufficiently long video should trigger timeupdate event]
expected: FAIL
expected: NOTRUN

View file

@ -8,26 +8,8 @@
expected: FAIL
[picture: source (max-width:500px) valid image, img broken image, resize to narrow]
expected: TIMEOUT
expected: FAIL
[picture: source (max-width:500px) valid image, img valid image, resize to narrow]
expected: FAIL
[picture: source (max-width:500px) broken image, img valid image, resize to narrow]
expected: FAIL
[img (srcset 1 cand) valid image, resize to wide]
expected: FAIL
[picture: same URL in source (max-width:500px) and img, resize to wide]
expected: FAIL
[img (srcset 1 cand) valid image, resize to narrow]
expected: FAIL
[picture: source (max-width:500px) valid image, img broken image, resize to wide]
expected: FAIL
[picture: same URL in source (max-width:500px) and img, resize to narrow]
expected: FAIL

View file

@ -1,10 +0,0 @@
[non-active-document.html]
[DOMParser]
expected: FAIL
[createHTMLDocument]
expected: FAIL
[<template>]
expected: FAIL

View file

@ -1,7 +0,0 @@
[toggleEvent.html]
[Calling open twice on 'details' fires only one toggle event]
expected: FAIL
[Setting open=true to opened 'details' element should not fire a toggle event at the 'details' element]
expected: FAIL

View file

@ -1,6 +0,0 @@
[077.html]
type: testharness
expected: ERROR
[ adding several types of scripts through the DOM and removing some of them confuses scheduler ]
expected: FAIL

View file

@ -1,2 +0,0 @@
[script-onerror-insertion-point-2.html]
expected: TIMEOUT

View file

@ -2,3 +2,6 @@
[document.open() after parser is aborted]
expected: FAIL
[async document.open() after parser is aborted]
expected: FAIL

View file

@ -12,3 +12,6 @@
[Verifies the resolution of entry.startTime is at least 5 microseconds.]
expected: TIMEOUT
[Verifies the resolution of performance.now() is at least 5 microseconds.]
expected: FAIL

View file

@ -1,283 +0,0 @@
[limited-quirks.html]
[top: -\\31 .5]
expected: FAIL
[bottom: -1A]
expected: FAIL
[bottom: -1a]
expected: FAIL
[top: @1]
expected: FAIL
[top: "1a"]
expected: FAIL
[top: @a]
expected: FAIL
[bottom: "1"]
expected: FAIL
[bottom: -/**/1]
expected: FAIL
[top: +/**/1]
expected: FAIL
[bottom: @1a]
expected: FAIL
[top: 1\\31 ]
expected: FAIL
[top: url('1')]
expected: FAIL
[bottom: -\\31 ]
expected: FAIL
[top: calc(1)]
expected: FAIL
[top: \\31 ]
expected: FAIL
[bottom: +1\\31 ]
expected: FAIL
[bottom: 1\\31 .5]
expected: FAIL
[bottom: #0001]
expected: FAIL
[top: calc(2 * 2px)]
expected: FAIL
[bottom: 1a]
expected: FAIL
[bottom: A]
expected: FAIL
[bottom: #01]
expected: FAIL
[top: +\\31 .5]
expected: FAIL
[bottom: #1]
expected: FAIL
[top: -/**/1]
expected: FAIL
[bottom: +\\31 .5]
expected: FAIL
[bottom: \\31 ]
expected: FAIL
[bottom: calc(1)]
expected: FAIL
[top: #001]
expected: FAIL
[top: +\\31 ]
expected: FAIL
[bottom: +\\31 ]
expected: FAIL
[top: +1.5]
expected: FAIL
[top: +1\\31 ]
expected: FAIL
[bottom: @a]
expected: FAIL
[bottom: @1]
expected: FAIL
[top: #1]
expected: FAIL
[top: 1a]
expected: FAIL
[bottom: +1a]
expected: FAIL
[bottom: +1A]
expected: FAIL
[bottom: "a"]
expected: FAIL
[top: #00001]
expected: FAIL
[bottom: -1\\31 .5]
expected: FAIL
[top: "1"]
expected: FAIL
[bottom: 1.5]
expected: FAIL
[bottom: -\\31 .5]
expected: FAIL
[bottom: url('1')]
expected: FAIL
[bottom: -1.5]
expected: FAIL
[top: \\31 .5]
expected: FAIL
[bottom: "1a"]
expected: FAIL
[bottom: calc(2 * 2px)]
expected: FAIL
[bottom: +1\\31 .5]
expected: FAIL
[bottom: 1\\31 ]
expected: FAIL
[bottom: +/**/1]
expected: FAIL
[bottom: #00001]
expected: FAIL
[top: url(1)]
expected: FAIL
[bottom: #001]
expected: FAIL
[top: +1\\31 .5]
expected: FAIL
[top: -1a]
expected: FAIL
[top: -1A]
expected: FAIL
[bottom: url(1)]
expected: FAIL
[top: a]
expected: FAIL
[top: A]
expected: FAIL
[top: #000001]
expected: FAIL
[top: 1]
expected: FAIL
[top: 1\\31 .5]
expected: FAIL
[bottom: a]
expected: FAIL
[bottom: 1]
expected: FAIL
[bottom: +1]
expected: FAIL
[bottom: #000001]
expected: FAIL
[bottom: +a]
expected: FAIL
[bottom: +A]
expected: FAIL
[top: 1.5]
expected: FAIL
[top: +A]
expected: FAIL
[top: +a]
expected: FAIL
[top: +1]
expected: FAIL
[top: -1.5]
expected: FAIL
[top: -1\\31 .5]
expected: FAIL
[top: +1a]
expected: FAIL
[top: +1A]
expected: FAIL
[top: @1a]
expected: FAIL
[bottom: \\31 .5]
expected: FAIL
[top: "a"]
expected: FAIL
[top: #01]
expected: FAIL
[bottom: +1.5]
expected: FAIL
[bottom: -A]
expected: FAIL
[bottom: -a]
expected: FAIL
[bottom: -1\\31 ]
expected: FAIL
[top: #0001]
expected: FAIL
[bottom: -1]
expected: FAIL
[top: -\\31 ]
expected: FAIL
[top: -A]
expected: FAIL
[top: -a]
expected: FAIL
[top: -1]
expected: FAIL
[top: -1\\31 ]
expected: FAIL

View file

@ -1,283 +0,0 @@
[no-quirks.html]
[top: -\\31 .5]
expected: FAIL
[bottom: -1A]
expected: FAIL
[bottom: -1a]
expected: FAIL
[top: @1]
expected: FAIL
[top: "1a"]
expected: FAIL
[top: @a]
expected: FAIL
[bottom: "1"]
expected: FAIL
[bottom: -/**/1]
expected: FAIL
[top: +/**/1]
expected: FAIL
[bottom: @1a]
expected: FAIL
[top: 1\\31 ]
expected: FAIL
[top: url('1')]
expected: FAIL
[bottom: -\\31 ]
expected: FAIL
[top: calc(1)]
expected: FAIL
[top: \\31 ]
expected: FAIL
[bottom: +1\\31 ]
expected: FAIL
[bottom: 1\\31 .5]
expected: FAIL
[bottom: #0001]
expected: FAIL
[top: calc(2 * 2px)]
expected: FAIL
[bottom: 1a]
expected: FAIL
[bottom: A]
expected: FAIL
[bottom: #01]
expected: FAIL
[top: +\\31 .5]
expected: FAIL
[bottom: #1]
expected: FAIL
[top: -/**/1]
expected: FAIL
[bottom: +\\31 .5]
expected: FAIL
[bottom: \\31 ]
expected: FAIL
[bottom: calc(1)]
expected: FAIL
[top: #001]
expected: FAIL
[top: +\\31 ]
expected: FAIL
[bottom: +\\31 ]
expected: FAIL
[top: +1.5]
expected: FAIL
[top: +1\\31 ]
expected: FAIL
[bottom: @a]
expected: FAIL
[bottom: @1]
expected: FAIL
[top: #1]
expected: FAIL
[top: 1a]
expected: FAIL
[bottom: +1a]
expected: FAIL
[bottom: +1A]
expected: FAIL
[bottom: "a"]
expected: FAIL
[top: #00001]
expected: FAIL
[bottom: -1\\31 .5]
expected: FAIL
[top: "1"]
expected: FAIL
[bottom: 1.5]
expected: FAIL
[bottom: -\\31 .5]
expected: FAIL
[bottom: url('1')]
expected: FAIL
[bottom: -1.5]
expected: FAIL
[top: \\31 .5]
expected: FAIL
[bottom: "1a"]
expected: FAIL
[bottom: calc(2 * 2px)]
expected: FAIL
[bottom: +1\\31 .5]
expected: FAIL
[bottom: 1\\31 ]
expected: FAIL
[bottom: +/**/1]
expected: FAIL
[bottom: #00001]
expected: FAIL
[top: url(1)]
expected: FAIL
[bottom: #001]
expected: FAIL
[top: +1\\31 .5]
expected: FAIL
[top: -1a]
expected: FAIL
[top: -1A]
expected: FAIL
[bottom: url(1)]
expected: FAIL
[top: a]
expected: FAIL
[top: A]
expected: FAIL
[top: #000001]
expected: FAIL
[top: 1]
expected: FAIL
[top: 1\\31 .5]
expected: FAIL
[bottom: a]
expected: FAIL
[bottom: 1]
expected: FAIL
[bottom: +1]
expected: FAIL
[bottom: #000001]
expected: FAIL
[bottom: +a]
expected: FAIL
[bottom: +A]
expected: FAIL
[top: 1.5]
expected: FAIL
[top: +A]
expected: FAIL
[top: +a]
expected: FAIL
[top: +1]
expected: FAIL
[top: -1.5]
expected: FAIL
[top: -1\\31 .5]
expected: FAIL
[top: +1a]
expected: FAIL
[top: +1A]
expected: FAIL
[top: @1a]
expected: FAIL
[bottom: \\31 .5]
expected: FAIL
[top: "a"]
expected: FAIL
[top: #01]
expected: FAIL
[bottom: +1.5]
expected: FAIL
[bottom: -A]
expected: FAIL
[bottom: -a]
expected: FAIL
[bottom: -1\\31 ]
expected: FAIL
[top: #0001]
expected: FAIL
[bottom: -1]
expected: FAIL
[top: -\\31 ]
expected: FAIL
[top: -A]
expected: FAIL
[top: -a]
expected: FAIL
[top: -1]
expected: FAIL
[top: -1\\31 ]
expected: FAIL

View file

@ -1,283 +0,0 @@
[quirks.html]
[top: -\\31 .5]
expected: FAIL
[bottom: -1A]
expected: FAIL
[bottom: -1a]
expected: FAIL
[top: @1]
expected: FAIL
[top: "1a"]
expected: FAIL
[top: @a]
expected: FAIL
[bottom: "1"]
expected: FAIL
[bottom: -/**/1]
expected: FAIL
[top: +/**/1]
expected: FAIL
[bottom: @1a]
expected: FAIL
[top: 1\\31 ]
expected: FAIL
[top: url('1')]
expected: FAIL
[bottom: -\\31 ]
expected: FAIL
[top: calc(1)]
expected: FAIL
[top: \\31 ]
expected: FAIL
[bottom: +1\\31 ]
expected: FAIL
[bottom: 1\\31 .5]
expected: FAIL
[bottom: #0001]
expected: FAIL
[top: calc(2 * 2px)]
expected: FAIL
[bottom: 1a]
expected: FAIL
[bottom: A]
expected: FAIL
[bottom: #01]
expected: FAIL
[top: +\\31 .5]
expected: FAIL
[bottom: #1]
expected: FAIL
[top: -/**/1]
expected: FAIL
[bottom: +\\31 .5]
expected: FAIL
[bottom: \\31 ]
expected: FAIL
[bottom: calc(1)]
expected: FAIL
[top: #001]
expected: FAIL
[top: +\\31 ]
expected: FAIL
[bottom: +\\31 ]
expected: FAIL
[top: +1.5]
expected: FAIL
[top: +1\\31 ]
expected: FAIL
[bottom: @a]
expected: FAIL
[bottom: @1]
expected: FAIL
[top: #1]
expected: FAIL
[top: 1a]
expected: FAIL
[bottom: +1a]
expected: FAIL
[bottom: +1A]
expected: FAIL
[bottom: "a"]
expected: FAIL
[top: #00001]
expected: FAIL
[bottom: -1\\31 .5]
expected: FAIL
[top: "1"]
expected: FAIL
[bottom: 1.5]
expected: FAIL
[bottom: -\\31 .5]
expected: FAIL
[bottom: url('1')]
expected: FAIL
[bottom: -1.5]
expected: FAIL
[top: \\31 .5]
expected: FAIL
[bottom: "1a"]
expected: FAIL
[bottom: calc(2 * 2px)]
expected: FAIL
[bottom: +1\\31 .5]
expected: FAIL
[bottom: 1\\31 ]
expected: FAIL
[bottom: +/**/1]
expected: FAIL
[bottom: #00001]
expected: FAIL
[top: url(1)]
expected: FAIL
[bottom: #001]
expected: FAIL
[top: +1\\31 .5]
expected: FAIL
[top: -1a]
expected: FAIL
[top: -1A]
expected: FAIL
[bottom: url(1)]
expected: FAIL
[top: a]
expected: FAIL
[top: A]
expected: FAIL
[top: #000001]
expected: FAIL
[top: 1]
expected: FAIL
[top: 1\\31 .5]
expected: FAIL
[bottom: a]
expected: FAIL
[bottom: 1]
expected: FAIL
[bottom: +1]
expected: FAIL
[bottom: #000001]
expected: FAIL
[bottom: +a]
expected: FAIL
[bottom: +A]
expected: FAIL
[top: 1.5]
expected: FAIL
[top: +A]
expected: FAIL
[top: +a]
expected: FAIL
[top: +1]
expected: FAIL
[top: -1.5]
expected: FAIL
[top: -1\\31 .5]
expected: FAIL
[top: +1a]
expected: FAIL
[top: +1A]
expected: FAIL
[top: @1a]
expected: FAIL
[bottom: \\31 .5]
expected: FAIL
[top: "a"]
expected: FAIL
[top: #01]
expected: FAIL
[bottom: +1.5]
expected: FAIL
[bottom: -A]
expected: FAIL
[bottom: -a]
expected: FAIL
[bottom: -1\\31 ]
expected: FAIL
[top: #0001]
expected: FAIL
[bottom: -1]
expected: FAIL
[top: -\\31 ]
expected: FAIL
[top: -A]
expected: FAIL
[top: -a]
expected: FAIL
[top: -1]
expected: FAIL
[top: -1\\31 ]
expected: FAIL

View file

@ -5,18 +5,10 @@
[request.formData() with input: a&b&c]
expected: FAIL
[request.formData() with input: _charset_=windows-1252&test=%C2x]
expected: FAIL
[response.formData() with input: _charset_=windows-1252&test=%C2x]
expected: FAIL
[request.formData() with input: a=b&c=d&]
expected: FAIL
[urlencoded-parser.any.worker.html]
[request.formData() with input: a&b&c]
[response.formData() with input: a&b&c]
expected: FAIL
[response.formData() with input: a=b&c=d&]
@ -25,12 +17,17 @@
[response.formData() with input: a=b&c=d]
expected: FAIL
[response.formData() with input: a&b&c]
expected: FAIL
[request.formData() with input: &&&a=b&&&&c=d&]
[urlencoded-parser.any.worker.html]
[request.formData() with input: a&b&c]
expected: FAIL
[request.formData() with input: a=b&c=d&]
expected: FAIL
[request.formData() with input: a=b&c=d]
expected: FAIL
[response.formData() with input: _charset_=windows-1252&test=%C2x]
expected: FAIL

View file

@ -1,5 +1,4 @@
[import-in-moduleworker.html]
expected: ERROR
[Base URL in module dedicated workers: import]
expected: FAIL

View file

@ -12,3 +12,12 @@
[XMLHttpRequest: getAllResponseHeaders() 3]
expected: FAIL
[XMLHttpRequest: getAllResponseHeaders() 6]
expected: FAIL
[XMLHttpRequest: getAllResponseHeaders() 4]
expected: FAIL
[XMLHttpRequest: getAllResponseHeaders() 5]
expected: FAIL

View file

@ -5,6 +5,24 @@
[getResponseHeader('www-authenticate')]
expected: FAIL
[getResponseHeader('content-length') expects 0]
expected: FAIL
[getResponseHeader('heya') expects , \x0b\x0c, 1, , , 2]
expected: FAIL
[getResponseHeader('double-trouble') expects , ]
expected: FAIL
[getResponseHeader('content-length') expects 0, 0]
expected: FAIL
[getResponseHeader('www-authenticate') expects 1, 2, 3, 4]
expected: FAIL
[getResponseHeader('foo-test') expects 1, 2, 3]
expected: FAIL
[getresponseheader.any.html]
[getResponseHeader('foo-test')]
@ -13,3 +31,21 @@
[getResponseHeader('www-authenticate')]
expected: FAIL
[getResponseHeader('content-length') expects 0]
expected: FAIL
[getResponseHeader('heya') expects , \x0b\x0c, 1, , , 2]
expected: FAIL
[getResponseHeader('double-trouble') expects , ]
expected: FAIL
[getResponseHeader('content-length') expects 0, 0]
expected: FAIL
[getResponseHeader('www-authenticate') expects 1, 2, 3, 4]
expected: FAIL
[getResponseHeader('foo-test') expects 1, 2, 3]
expected: FAIL

View file

@ -0,0 +1,4 @@
[setrequestheader-combining.window.html]
[setRequestHeader() combining header values]
expected: FAIL

View file

@ -0,0 +1,64 @@
# This is the configuration file for Azure Pipelines, used to run tests on
# macOS. Documentation to help understand this setup:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema
trigger: none # disable builds for branches
jobs:
- job: macOS
pool:
vmImage: 'macOS-10.13'
steps:
- checkout: self
fetchDepth: 50
submodules: false
- script: |
echo "Test jobs:"
./wpt test-jobs | while read job; do
echo "$job"
echo "##vso[task.setvariable variable=run_$job]true";
done
displayName: 'List test jobs'
- script: |
sudo easy_install pip
sudo pip install -U virtualenv
displayName: 'Install Python packages'
condition: variables.run_wptrunner_infrastructure
# Installig Ahem in /Library/Fonts instead of using --install-fonts is a
# workaround for https://github.com/web-platform-tests/wpt/issues/13803.
- script: sudo cp fonts/Ahem.ttf /Library/Fonts
displayName: 'Install Ahem font'
condition: variables.run_wptrunner_infrastructure
- script: |
# https://github.com/web-platform-tests/results-collection/blob/master/src/scripts/trust-root-ca.sh
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain tools/certs/cacert.pem
displayName: 'Install web-platform.test certificate'
condition: variables.run_wptrunner_infrastructure
- script: |
# Pin to STP 67, as SafariDriver isn't working in 68:
# https://github.com/web-platform-tests/wpt/issues/13800
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask-versions/23fae0a88868911913c2ee7d527c89164b6d5720/Casks/safari-technology-preview.rb
# https://web-platform-tests.org/running-tests/safari.html
sudo "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --enable
defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically 1
displayName: 'Install Safari Technology Preview'
condition: variables.run_wptrunner_infrastructure
- script: ./wpt make-hosts-file | sudo tee -a /etc/hosts
displayName: 'Update /etc/hosts'
condition: variables.run_wptrunner_infrastructure
- script: ./wpt manifest
displayName: 'Update manifest'
condition: variables.run_wptrunner_infrastructure
- script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --channel=preview safari_webdriver infrastructure/
displayName: 'Run infrastructure/ tests'
condition: variables.run_wptrunner_infrastructure

View file

@ -1,89 +0,0 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Access-Control-Allow-Headers handling</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=support.js?pipe=sub></script>
<h1>Access-Control-Allow-Headers handling</h1>
<div id=log></div>
<script>
/*
* Origin header
*/
function shouldPass(origin) {
test(function () {
var client = new XMLHttpRequest()
client.open('GET', CROSSDOMAIN
+ '/resources/cors-makeheader.py?origin='
+ encodeURIComponent(origin),
false)
client.send()
r = JSON.parse(client.response)
var host = location.protocol + "//" + location.host
assert_equals(r['origin'], host, 'Request Origin: should be ' + host)
}, 'Allow origin: ' + origin.replace(/\t/g, "[tab]").replace(/ /g, '_'));
}
shouldPass('*');
shouldPass(' * ');
shouldPass(' *');
shouldPass(location.protocol + "//" + location.host);
shouldPass(" "+location.protocol + "//" + location.host);
shouldPass(" "+location.protocol + "//" + location.host + " ");
shouldPass(" "+location.protocol + "//" + location.host);
function shouldFail(origin) {
test(function () {
var client = new XMLHttpRequest()
client.open('GET', CROSSDOMAIN
+ '/resources/cors-makeheader.py?origin='
+ encodeURIComponent(origin),
false)
assert_throws("NetworkError", function() { client.send() }, 'send')
}, 'Disallow origin: ' + origin.replace('\0', '\\0'));
}
shouldFail(location.protocol + "//" + SUBDOMAIN + "." + location.host)
shouldFail("//" + location.host)
shouldFail("://" + location.host)
shouldFail("ftp://" + location.host)
shouldFail("http:://" + location.host)
shouldFail("http:/" + location.host)
shouldFail("http:" + location.host)
shouldFail(location.host)
shouldFail(location.protocol + "//" + location.host + "?")
shouldFail(location.protocol + "//" + location.host + "/")
shouldFail(location.protocol + "//" + location.host + " /")
shouldFail(location.protocol + "//" + location.host + "#")
shouldFail(location.protocol + "//" + location.host + "%23")
shouldFail(location.protocol + "//" + location.host + ":80")
shouldFail(location.protocol + "//" + location.host + ", *")
shouldFail(location.protocol + "//" + location.host + "\0")
shouldFail((location.protocol + "//" + location.host).toUpperCase())
shouldFail(location.protocol.toUpperCase() + "//" + location.host)
shouldFail("-")
shouldFail("**")
shouldFail("\0*")
shouldFail("*\0")
shouldFail("'*'")
shouldFail('"*"')
shouldFail("* *")
shouldFail("*" + location.protocol + "//" + "*")
shouldFail("*" + location.protocol + "//" + location.host)
shouldFail("* " + location.protocol + "//" + location.host)
shouldFail("*, " + location.protocol + "//" + location.host)
shouldFail("\0" + location.protocol + "//" + location.host)
shouldFail("null " + location.protocol + "//" + location.host)
shouldFail('http://example.net')
shouldFail('null')
shouldFail('')
shouldFail(location.href)
shouldFail(dirname(location.href))
shouldFail(CROSSDOMAIN)
</script>

View file

@ -122,8 +122,13 @@ function test_response_header(allow) {
test_response_header('TRUE')
test_response_header('True')
test_response_header('"true"')
test_response_header("'true'");
test_response_header('false')
test_response_header('1')
test_response_header('0')
test_response_header(',true');
test_response_header('true,');
test_response_header('true%0B');
test_response_header('true%0C');
</script>

View file

@ -71,8 +71,14 @@ shouldFail((location.protocol + "//" + location.host).toUpperCase())
shouldFail(location.protocol.toUpperCase() + "//" + location.host)
shouldFail("-")
shouldFail("**")
shouldFail(",*");
shouldFail("*,");
shouldFail("\0*")
shouldFail("\u000B*");
shouldFail("\u000C*");
shouldFail("*\0")
shouldFail("*\u000B");
shouldFail("*\u000C");
shouldFail("'*'")
shouldFail('"*"')
shouldFail("* *")

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#containing-block-details">
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#anonymous-block-level">
<p>There should be a green square below, and no red.</p>
<div style="position:relative; width:100px; height:100px; background:red;">
<span id="posMe">
<div id="removeMe"></div>
</span>
<span>
<div>
<div id="target" style="position:absolute; width:100%; height:100%; background:green;"></div>
</div>
</span>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(()=> {
document.body.offsetTop;
removeMe.style.display = "none";
document.body.offsetTop;
posMe.style.position = "relative";
assert_equals(document.getElementById("target").offsetWidth, 100);
assert_equals(document.getElementById("target").offsetHeight, 100);
assert_equals(document.getElementById("target").offsetLeft, 0);
assert_equals(document.getElementById("target").offsetTop, 0);
}, "Make sure that we're sized by the right ancestor");
</script>

View file

@ -32,13 +32,7 @@
margin-top: 0em;
}
div#X
{
float: left;
margin-left: 50%;
}
div#after-X
div
{
background-color: aqua;
width: 25%;
@ -58,9 +52,7 @@
the others should all be<br />
<em>aligned on the left</em> of the window.</p>
<div id="X">X</div>
<div id="after-X"><br />The X on the previous line should be centered across the window.</div>
<div><span style="padding-left:50%">X The first X in this sentence should be indented to the center of this block.</span></div>
</body>
</html>

View file

@ -27,7 +27,7 @@
<em>aligned on the left</em> of the window.
</p>
<div>
X The X on the previous line should be centered across the window.
X The first X in this sentence should be indented to the center of this block.
</div>
</body>
</html>

View file

@ -2,7 +2,7 @@
<title>text-indent test</title>
<style type="text/css">
div { width: 500px; }
p { width: 300px; text-indent: 50px; }
p { width: 300px; text-indent: 30px; }
</style>
</head>
<body>
@ -11,4 +11,4 @@ p { width: 300px; text-indent: 50px; }
</div>
</body></html>
</body></html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Animations: getComputedValue().animationDelay</title>
<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-delay">
<meta name="assert" content="animation-delay converts to seconds.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("animation-delay", "-500ms", "-0.5s");
test_computed_value("animation-delay", "calc(2 * 3s)", "6s");
test_computed_value("animation-delay", "20s, 10s");
</script>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Animations: getComputedValue().animationDuration</title>
<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-duration">
<meta name="assert" content="animation-duration converts to seconds.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("animation-duration", "500ms", "0.5s");
test_computed_value("animation-duration", "calc(2 * 3s)", "6s");
test_computed_value("animation-duration", "20s, 10s");
</script>
</body>
</html>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Tests that we consider main axis sizes to be definite in column flexboxes
when the height is an explicit definite height, even if the container does
not have a definite main axis size.</title>
<link rel="author" title="Google Inc." href="https://www.google.com/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#definite-sizes">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="display:flex; flex-direction:column;">
<div style="width:100px; height:100px; background:red;">
<div style="height:100%; background:green;"></div>
</div>
</div>

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<title>CSS Reference</title>
<style>
@font-face {
font-family: TestWeight;
src: url(resources/csstest-weights-100-kerned.ttf);
font-weight: 200 300;
}
@font-face {
font-family: TestWeight;
src: url(resources/csstest-weights-900-kerned.ttf);
font-weight: 300 400;
}
@font-face {
font-family: TestStyle;
src: url(resources/csstest-weights-100-kerned.ttf);
font-style: oblique 20deg 30deg;
}
@font-face {
font-family: TestStyle;
src: url(resources/csstest-weights-900-kerned.ttf);
font-style: oblique 30deg 40deg;
}
@font-face {
font-family: TestStretch;
src: url(resources/csstest-weights-100-kerned.ttf);
font-stretch: 110% 120%;
}
@font-face {
font-family: TestStretch;
src: url(resources/csstest-weights-900-kerned.ttf);
font-stretch: 120% 130%;
}
</style>
<p style="font-family: TestWeight; font-weight: 250;">A</p>
<p style="font-family: TestStyle; font-style: oblique 25deg;">A</p>
<p style="font-family: TestStretch; font-stretch: 115%;">A</p>

View file

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html class="reftest-wait">
<title>CSS Test: Matching @font-face font-weight, font-style, and font-stretch descriptors with reversed ranges</title>
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#font-prop-desc">
<link rel="match" href="font-descriptor-range-reversed-ref.html">
<!-- Using csstest-weights-{100,900}-kerned.ttf just as two convenient
different fonts here with different "A" glyphs -->
<style>
@font-face {
font-family: TestWeight;
src: url(resources/csstest-weights-100-kerned.ttf);
font-weight: 300 200;
}
@font-face {
font-family: TestWeight;
src: url(resources/csstest-weights-900-kerned.ttf);
font-weight: 300 400;
}
@font-face {
font-family: TestStyle;
src: url(resources/csstest-weights-100-kerned.ttf);
font-style: oblique 30deg 20deg;
}
@font-face {
font-family: TestStyle;
src: url(resources/csstest-weights-900-kerned.ttf);
font-style: oblique 30deg 40deg;
}
@font-face {
font-family: TestStretch;
src: url(resources/csstest-weights-100-kerned.ttf);
font-stretch: 120% 110%;
}
@font-face {
font-family: TestStretch;
src: url(resources/csstest-weights-900-kerned.ttf);
font-stretch: 120% 130%;
}
</style>
<!-- Matches `font-weight: 300 200;` -->
<p style="font-family: TestWeight; font-weight: 250;">A</p>
<!-- Matches `font-style: oblique 30deg 20deg;` -->
<p style="font-family: TestStyle; font-style: oblique 25deg;">A</p>
<!-- Matches `font-style: oblique 120% 110%;` -->
<p style="font-family: TestStretch; font-stretch: 115%;">A</p>
<script>
document.fonts.ready.then(function() {
document.documentElement.className = "";
});
</script>

View file

@ -2,6 +2,8 @@
<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api/#register-a-custom-property" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="./resources/utils.js"></script>
<div id=target></div>
<script>
// Tests for error checking during property registration
@ -45,4 +47,29 @@ test(function(){
CSS.registerProperty({name: '--inherit-test-2', syntax: '<length>', initialValue: '0px', inherits: false});
assert_throws(new TypeError(), () => CSS.registerProperty({name: '--inherit-test-3', syntax: '<length>', initialValue: '0px'}));
}, "registerProperty requires inherits");
test(function(){
try {
let name = generate_name();
target.style.setProperty(name, 'green');
target.style.transitionProperty = name;
target.style.transitionDuration = '1s';
target.style.transitionTimingFunction = 'steps(1, end)';
assert_equals(getComputedStyle(target).getPropertyValue(name), 'green');
CSS.registerProperty({
name: name,
syntax: '<color>',
initialValue: 'red',
inherits: false
});
assert_equals(getComputedStyle(target).getPropertyValue(name), 'rgb(0, 128, 0)');
} finally {
target.style = '';
}
}, 'Registering a property should not cause a transition');
</script>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://drafts.csswg.org/css-scoping/#slots-in-shadow-tree">
<div id="host"><span id="slotted">This text should be green.</span></div>
<script>
const root = host.attachShadow({mode:"open"});
root.innerHTML = '<slot name="nomatch" style="color:green"></slot><slot style="color:red"></slot>';
test(() => {
assert_equals(getComputedStyle(slotted).color, "rgb(255, 0, 0)");
}, "Initial computed color.");
test(() => {
root.querySelector("slot").removeAttribute("name");
assert_equals(getComputedStyle(slotted).color, "rgb(0, 128, 0)");
}, "Computed color after re-slotting.");
</script>

View file

@ -5,3 +5,4 @@
<div>PASS</div>
<div>PASS</div>
<div style="color:green">PASS</div>
<div style="color:green">PASS</div>

View file

@ -7,6 +7,7 @@
<div id="host1"><span></span></div>
<div id="host2"><span></span></div>
<div id="host3"><span></span></div>
<div id="host4"><span></span></div>
<style>
#host3 > span::before { content: "PASS" }
</style>
@ -19,4 +20,12 @@
attachShadowWithSlottedStyle(host1, "::slotted(span)::before { content: 'PASS' }");
attachShadowWithSlottedStyle(host2, "::slotted(span)::after { content: 'PASS' }");
attachShadowWithSlottedStyle(host3, "::slotted(span)::before { content: 'FAIL'; color: green }");
attachShadowWithSlottedStyle(host4, `
::slotted(span)::before { content: 'PASS'; color: red }
::slotted(.foo)::before { color: green }
`);
onload = function() {
host4.offsetTop;
host4.firstElementChild.classList.add("foo");
}
</script>

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: hanging punctuation is scrollable overflow</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#hanging-punctuation-property">
<meta name="flags" content="">
<link rel="match" href="reference/hanging-scrollable-001-ref.html">
<meta name="assert" content="Hanging characters that overflow their block container are treated as scrollable overflow. ">
<style>
div {
font-family: monospace;
font-size: 50px;
hanging-punctuation: last;
overflow: hidden;
color: red;
}
span {color: white; }
</style>
<p>Test passes if there is no red below.
<table><tr><td><div id="t">X<span></span></div></table>
<!--
The table is to do sizing based on the min content size.
A simpler test could be written using `div { width: min-content; }`,
but that is not widely supported yet.
-->
<script>
document.getElementById("t").scrollLeft=100;
</script>

View file

@ -0,0 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test reference</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<p>Test passes if there is no red below.

View file

@ -19,7 +19,7 @@
<body>
<p>Test passes if there is no red visible on the page.</p>
<div id="parent">
<div>X</div>
<div style="padding-left: 100px">X</div>
</div>
<p>Test passes if the following two text blocks look same in terms of margin-left and text-indent respectively.</p>
<div>
@ -31,4 +31,4 @@
ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ.<br />
</div>
</body>
</html>
</html>

View file

@ -4,11 +4,11 @@
<title>CSS Text Test reference</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<style>
body { background: white; }
div {
padding-left: 50px;
font-family: Ahem;
}
</style>
<p>Test passes if there is a single black X below and no red.
<div>X</div>

View file

@ -18,7 +18,7 @@
#reference1
{
color: red;
left: 0;
left: 100px; /* see comments for #test1 below */
position: absolute;
top: 0;
z-index: -1;
@ -29,8 +29,8 @@
}
#test1
{
text-indent: 50%;
margin-left: -50%;
margin-left: -50%; /* -50% * 400px = -200px which makes the inline-size of this block 600px */
text-indent: 50%; /* 50% * 600px = 300px (which is 100px from the start of #parent due to the negative margin) */
}
#test2
{

View file

@ -8,7 +8,7 @@
<link rel="match" href="reference/text-indent-percentage-002-ref.html">
<meta name="assert" content="Percentages in text-indent refer to width of the element's content box">
<style>
section { position: absolute; }
body { background: white; }
section, div {
border-right: 10px solid white;
margin-right: 10px;
@ -19,10 +19,7 @@ div {
box-sizing: border-box;
width: 120px;
}
.test div { text-indent: 50%; color: red; }
.ref div { text-indent: 50px; }
.test div { text-indent: 50%; }
</style>
<p>Test passes if there is a single black X below and no red.
<section class=test><div>X</div></section>
<section class=ref><div>X</div></section>

View file

@ -8,7 +8,7 @@
<link rel="match" href="reference/text-indent-percentage-002-ref.html">
<meta name="assert" content="Percentages in text-indent refer to width of the element's content box">
<style>
section { position: absolute; }
body { background: white; }
section, div {
border-right: 10px solid white;
margin-right: 10px;
@ -19,10 +19,7 @@ div {
box-sizing: border-box;
width: 120px;
}
.test div { text-indent: 50%; color: red; overflow: hidden; } /* overflow:hidden should not make any difference, but it does in some browsers */
.ref div { text-indent: 50px; }
.test div { text-indent: 50%; overflow: hidden; } /* overflow:hidden should not make any difference, but it does in some browsers */
</style>
<p>Test passes if there is a single black X below and no red.
<section class=test><div>X</div></section>
<section class=ref><div>X</div></section>

View file

@ -8,7 +8,7 @@
<link rel="match" href="reference/text-indent-percentage-002-ref.html">
<meta name="assert" content="Percentages in text-indent refer to width of the element's content box, when used in a calc expression">
<style>
section { position: absolute; }
body { background: white; }
section, div {
border-right: 10px solid white;
margin-right: 10px;
@ -19,10 +19,7 @@ div {
box-sizing: border-box;
width: 120px;
}
.test div { text-indent: calc(25px + 25%); color: red; }
.ref div { text-indent: 50px; }
.test div { text-indent: calc(25px + 25%); }
</style>
<p>Test passes if there is a single black X below and no red.
<section class=test><div>X</div></section>
<section class=ref><div>X</div></section>

View file

@ -0,0 +1,18 @@
<!doctype html>
<meta charset=utf-8>
<title>CSS Text test: hanging trailing spaces with white-space:pre-wrap</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<style>
div {
white-space: pre-wrap;
font-family: monospace;
}
</style>
<p>This test passes if the 4 letters below are verticaly aligned.
<div> P</div>
<div> A</div>
<div> S</div>
<div> S</div>

View file

@ -0,0 +1,8 @@
<!doctype html>
<meta charset=utf-8>
<title>CSS test Reference</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<p>This test passes if you can see the word PASS below, without any extra spaces.
<div>PASS</div>

View file

@ -0,0 +1,31 @@
<!doctype html>
<meta charset=utf-8>
<title>CSS Text test: hanging trailing spaces with white-space:pre-wrap</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-001-ref.html">
<meta name="assert" content="Preserved white space at the end of the line is hanged when white-space is pre-wrap.">
<style>
div {
white-space: pre-wrap;
font-family: monospace;
}
div:nth-of-type(1),
div:nth-of-type(2) {
width: 5ch;
text-align: right;
}
div:nth-of-type(3),
div:nth-of-type(4) {
width: 9ch;
text-align: center;
}
</style>
<p>This test passes if the 4 letters below are verticaly aligned.
<div>P</div>
<div>A </div>
<div>S</div>
<div>S </div>

View file

@ -0,0 +1,20 @@
<!doctype html>
<meta charset=utf-8>
<title>CSS Text test: intrinsic maximum sizing of trailing spaces with white-space:pre-wrap</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-002-ref.html">
<meta name="assert" content="Preserved white space at the end of the line is hanged when white-space is pre-wrap, and therefore does not count when computing the (maximum) intrinsic size.">
<style>
span {
display: inline-block;
white-space: pre-wrap;
}
#s1 { text-align: right; }
#s2 { text-align: center; }
</style>
<p>This test passes if you can see the word PASS below, without any extra spaces.
<div><span id=s1>P </span><span id=s2>A </span>SS</div>

View file

@ -0,0 +1,27 @@
<!doctype html>
<meta charset=utf-8>
<title>CSS Text test: intrinsic minimum sizing of trailing spaces with white-space:pre-wrap</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-002-ref.html">
<meta name="assert" content="Preserved white space at the end of the line is hanged when white-space is pre-wrap, and therefore does not count when computing the (minimum) intrinsic size.">
<style>
/* Make the table invisible */
table { border-collapse: collapse; }
td { padding: 0; }
/* for the content of the table to be sized to their mininum intrinsic size */
table { width: 0; }
span {
display: inline-block;
white-space: pre-wrap;
}
#s1 { text-align: right; }
#s2 { text-align: center; }
</style>
<p>This test passes if you can see the word PASS below, without any extra spaces.
<table><td><span id=s1>P </span><td><span id=s2>A </span><td>SS</table>

View file

@ -11,57 +11,56 @@
</head>
<body>
<script>
// none -> none
test_interpolation(
{
property: 'transform',
from: 'none',
to: 'none',
},
[{ at: 0.25, expect: 'none' }]
[{ at: 0.25, expect: 'none' }],
'none -> none'
);
// none -> something
test_interpolation(
{
property: 'transform',
from: 'none',
to: 'translate(200px) rotate(720deg)',
},
[{ at: 0.25, expect: 'translate(50px) rotate(180deg)' }]
[{ at: 0.25, expect: 'translate(50px) rotate(180deg)' }],
'none -> something'
);
// something -> none
test_interpolation(
{
property: 'transform',
from: 'translate(200px) rotate(720deg)',
to: 'none',
},
[{ at: 0.25, expect: 'translate(150px) rotate(540deg)' }]
[{ at: 0.25, expect: 'translate(150px) rotate(540deg)' }],
'something -> none'
);
// Mismatched lengths (from is shorter), common part matches
test_interpolation(
{
property: 'transform',
from: 'translate(100px)',
to: 'translate(200px) rotate(720deg)',
},
[{ at: 0.25, expect: 'translate(125px) rotate(180deg)' }]
[{ at: 0.25, expect: 'translate(125px) rotate(180deg)' }],
'Mismatched lengths (from is shorter), common part matches'
);
// Mismatched lengths (to is shorter), common part matches
test_interpolation(
{
property: 'transform',
from: 'translate(100px) rotate(720deg)',
to: 'translate(200px)',
},
[{ at: 0.25, expect: 'translate(125px) rotate(540deg)' }]
[{ at: 0.25, expect: 'translate(125px) rotate(540deg)' }],
'Mismatched lengths (to is shorter), common part matches'
);
// Perfect match
test_interpolation(
{
property: 'transform',
@ -73,47 +72,68 @@ test_interpolation(
at: 0.25,
expect: 'scale(2.25) rotate(540deg) translate(125px) matrix(1, 0, 0, 1, 75, 50) skew(180deg)',
},
]
],
'Perfect match'
);
// Matches on primitives
test_interpolation(
{
property: 'transform',
from: 'translateX(100px) scaleX(3) translate(500px) scale(2)',
to: 'translateY(200px) scale(5) translateX(100px) scaleY(3)',
},
[{ at: 0.25, expect: 'translate(75px, 50px) scale(3.5, 2) translate(400px, 0px) scale(1.75, 2.25)' }]
[{ at: 0.25, expect: 'translate(75px, 50px) scale(3.5, 2) translate(400px, 0px) scale(1.75, 2.25)' }],
'Matches on primitives'
);
test_interpolation(
{
property: 'transform',
from: 'rotateX(90deg) translateX(100px)',
to: 'rotate3d(50, 0, 0, 180deg) translateY(200px)',
},
[{ at: 0.25, expect: 'rotateX(112.5deg) translate(75px, 50px)' }],
'Match on rotation vector'
);
test_interpolation(
{
property: 'transform',
from: 'rotateX(90deg) translateX(100px)',
to: 'rotateY(0deg) translateY(200px)',
},
[{ at: 0.25, expect: 'rotateX(67.5deg) translate(75px, 50px)' }],
'Match on rotation due to 0deg angle'
);
// Common prefix
test_interpolation(
{
property: 'transform',
from: 'rotate(0deg) translate(100px)',
to: 'rotate(720deg) scale(2) translate(200px)',
},
[{ at: 0.25, expect: 'rotate(180deg) matrix(1.25, 0, 0, 1.25, 175, 0)' }]
[{ at: 0.25, expect: 'rotate(180deg) matrix(1.25, 0, 0, 1.25, 175, 0)' }],
'Common prefix'
);
// Complete mismatch (except length)
test_interpolation(
{
property: 'transform',
from: 'scale(2) rotate(0deg) translate(100px)',
to: 'rotate(720deg) scale(2) translate(200px)',
},
[{ at: 0.25, expect: 'matrix(2, 0, 0, 2, 250, 0)' }]
[{ at: 0.25, expect: 'matrix(2, 0, 0, 2, 250, 0)' }],
'Complete mismatch (except length)'
);
// Complete mismatch including length
test_interpolation(
{
property: 'transform',
from: 'scale(2) rotate(0deg)',
to: 'rotate(720deg) scale(2) translate(200px)',
},
[{ at: 0.25, expect: 'matrix(2, 0, 0, 2, 100, 0)' }]
[{ at: 0.25, expect: 'matrix(2, 0, 0, 2, 100, 0)' }],
'Complete mismatch including length'
);
</script>
</body>

View file

@ -1,5 +1,6 @@
'use strict';
function test_interpolation(settings, expectations) {
function test_interpolation(settings, expectations, name) {
var message_prefix = name ? name + ': ' : '';
// Returns a timing function that at 0.5 evaluates to progress.
function timingFunction(progress) {
if (progress === 0)
@ -13,7 +14,7 @@ function test_interpolation(settings, expectations) {
test(function(){
assert_true(CSS.supports(settings.property, settings.from), 'Value "' + settings.from + '" is supported by ' + settings.property);
assert_true(CSS.supports(settings.property, settings.to), 'Value "' + settings.to + '" is supported by ' + settings.property);
}, '"' + settings.from + '" and "' + settings.to + '" are valid ' + settings.property + ' values');
}, message_prefix + '"' + settings.from + '" and "' + settings.to + '" are valid ' + settings.property + ' values');
for (var i = 0; i < expectations.length; ++i) {
var progress = expectations[i].at;
@ -49,6 +50,6 @@ function test_interpolation(settings, expectations) {
reference.style = '';
assert_equals(getComputedStyle(target)[settings.property], getComputedStyle(reference)[settings.property]);
}, 'Animation between "' + settings.from + '" and "' + settings.to + '" at progress ' + progress);
}, message_prefix + 'Animation between "' + settings.from + '" and "' + settings.to + '" at progress ' + progress);
}
}

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Transitions: getComputedValue().transitionDuration</title>
<link rel="help" href="https://drafts.csswg.org/css-transitions/#propdef-transition-duration">
<meta name="assert" content="transition-duration converts to seconds.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("transition-duration", "500ms", "0.5s");
test_computed_value("transition-duration", "calc(2 * 3s)", "6s");
test_computed_value("transition-duration", "20s, 10s");
</script>
</body>
</html>

View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<title>When non-empty placeholder becomes empty, :placeholder-shown test</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://drafts.csswg.org/selectors-4/#placeholder">
<input id="myinput" type="text" placeholder="FAIL">
<textarea id="mytextarea" placeholder="FAIL"></textarea>
<script>
test(() => {
const input = document.querySelector("input");
input.placeholder = "";
input.value = "NO RED";
assert_false(input.matches(":placeholder-shown"));
}, "input:placeholder-shown should not be matched");
test(() => {
const textarea = document.querySelector("textarea");
textarea.placeholder = "";
textarea.value = "No RED";
assert_false(textarea.matches(":placeholder-shown"));
}, "textarea:placeholder-shown should not be matched");
</script>

View file

@ -9,6 +9,10 @@ these are especially using for [visual][] tests which need to be manually
judged and following common patterns makes it easier to correctly tell if a
given test passed or not.
## Make tests self-describing
Tests should make it obvious when they pass and when they fail. It shouldn't be necessary to consult the specification to figure out whether a test has passed of failed.
## Indicating success
Success is largely indicated by the color green; typically in one of

View file

@ -758,6 +758,9 @@ asserts that the class string of `object` as returned in
### `assert_own_property(object, property_name, description)`
assert that object has own property `property_name`
### `assert_not_own_property(object, property_name, description)`
assert that object does not have an own property named `property_name`
### `assert_inherits(object, property_name, description)`
assert that object does not have an own property named
`property_name` but that `property_name` is present in the prototype

View file

@ -0,0 +1,132 @@
<!doctype html>
<meta charset="utf8">
<title>Events must dispatch on disabled elements</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<body>
<script>
// HTML elements that can be disabled
const formElements = ["button", "fieldset", "input", "select", "textarea"];
test(() => {
for (const localName of formElements) {
const elem = document.createElement(localName);
elem.disabled = true;
// pass becomes true if the event is called and it's the right type.
let pass = false;
const listener = ({ type }) => {
pass = type === "click";
};
elem.addEventListener("click", listener, { once: true });
elem.dispatchEvent(new Event("click"));
assert_true(
pass,
`Untrusted "click" Event didn't dispatch on ${elem.constructor.name}.`
);
}
}, "Can dispatch untrusted 'click' Events at disabled HTML elements.");
test(() => {
for (const localName of formElements) {
const elem = document.createElement(localName);
elem.disabled = true;
// pass becomes true if the event is called and it's the right type.
let pass = false;
const listener = ({ type }) => {
pass = type === "pass";
};
elem.addEventListener("pass", listener, { once: true });
elem.dispatchEvent(new Event("pass"));
assert_true(
pass,
`Untrusted "pass" Event didn't dispatch on ${elem.constructor.name}`
);
}
}, "Can dispatch untrusted Events at disabled HTML elements.");
test(() => {
for (const localName of formElements) {
const elem = document.createElement(localName);
elem.disabled = true;
// pass becomes true if the event is called and it's the right type.
let pass = false;
const listener = ({ type }) => {
pass = type === "custom-pass";
};
elem.addEventListener("custom-pass", listener, { once: true });
elem.dispatchEvent(new CustomEvent("custom-pass"));
assert_true(
pass,
`CustomEvent "custom-pass" didn't dispatch on ${elem.constructor.name}`
);
}
}, "Can dispatch CustomEvents at disabled HTML elements.");
test(() => {
for (const localName of formElements) {
const elem = document.createElement(localName);
// Element is disabled... so this click() MUST NOT fire an event.
elem.disabled = true;
let pass = true;
elem.onclick = e => {
pass = false;
};
elem.click();
assert_true(
pass,
`.click() must not dispatch "click" event on disabled ${
elem.constructor.name
}.`
);
// Element is (re)enabled... so this click() fires an event.
elem.disabled = false;
pass = false;
elem.onclick = e => {
pass = true;
};
elem.click();
assert_true(
pass,
`.click() must dispatch "click" event on enabled ${
elem.constructor.name
}.`
);
}
}, "Calling click() on disabled elements must not dispatch events.");
promise_test(async () => {
for (const localName of formElements) {
const elem = document.createElement(localName);
elem.disabled = true;
document.body.appendChild(elem);
// Element is disabled, so clicking must not fire events
let pass = true;
elem.onclick = e => {
pass = false;
};
await test_driver.click(elem); // triggers "onclick"
assert_true(
pass,
`${elem.constructor.name} is disabled, so onclick must not fire.`
);
// Element is (re)enabled... so this click() will fire an event.
pass = false;
elem.disabled = false;
elem.onclick = () => {
pass = true;
};
await test_driver.click(elem); // triggers "onclick"
assert_true(
pass,
`${elem.constructor.name} is enabled, so onclick must fire.`
);
elem.remove();
}
}, "Real clicks on disabled elements must not dispatch events.");
</script>

View file

@ -0,0 +1,13 @@
<!doctype html>
<title>Ref: vertical-scroll test for scrollbar</title>
<iframe src="/feature-policy/experimental-features/resources/vertical-scroll-scrollable-content.html"></iframe>
<script>
let iframe = document.querySelector("iframe");
let overflow_y = "visible";
if (window.location.search.indexOf("no-vertical-scrollbar") !== -1)
overflow_y = "hidden"
iframe.addEventListener("load", () => {
iframe.contentDocument.body.style.overflowY = overflow_y;
});
</script>

View file

@ -0,0 +1,4 @@
<!doctype html>
<title>vertical-scroll test for vertical scrollbar</title>
<link rel="match" href="/feature-policy/experimental-features/resources/vertical-scroll-scrollbar-ref.html?no-vertical-scrollbar">
<iframe src="/feature-policy/experimental-features/resources/vertical-scroll-scrollable-content.html" allow="vertical-scroll 'none'"></iframe>

View file

@ -1,11 +1,15 @@
// META: global=window,worker
promise_test(async t => {
const response = await fetch("../../../xhr/resources/headers-basic.asis");
assert_equals(response.headers.get("foo-test"), "1, 2, 3");
}, "response.headers.get('foo-test')");
promise_test(async t => {
const response = await fetch("../../../xhr/resources/headers-www-authenticate.asis");
assert_equals(response.headers.get("www-authenticate"), "1, 2, 3, 4");
}, "response.headers.get('www-authenticate')");
[
["content-length", "0", "header-content-length"],
["content-length", "0, 0", "header-content-length-twice"],
["double-trouble", ", ", "headers-double-empty"],
["foo-test", "1, 2, 3", "headers-basic"],
["heya", ", \u000B\u000C, 1, , , 2", "headers-some-are-empty"],
["www-authenticate", "1, 2, 3, 4", "headers-www-authenticate"],
].forEach(testValues => {
promise_test(async t => {
const response = await fetch("../../../xhr/resources/" + testValues[2] + ".asis");
assert_equals(response.headers.get(testValues[0]), testValues[1]);
}, "response.headers.get('" + testValues[0] + "') expects " + testValues[1]);
});

View file

@ -1,28 +0,0 @@
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<script>
var fails = ["first", "uppercase"],
passes = ["last", "quoted", "quoted-single", "no-x"]
fails.forEach(function(urlpart) {
async_test(function(t) {
var script = document.createElement("script")
script.onerror = t.step_func_done(function(){})
script.onload = t.unreached_func("Unexpected load event")
script.src = "resources/nosniff-" + urlpart + ".asis"
document.body.appendChild(script)
}, "URL query: " + urlpart)
})
passes.forEach(function(urlpart) {
async_test(function(t) {
var script = document.createElement("script")
script.onerror = t.unreached_func("Unexpected error event")
script.onload = t.step_func_done(function(){})
script.src = "resources/nosniff-" + urlpart + ".asis"
document.body.appendChild(script)
}, "URL query: " + urlpart)
})
</script>

View file

@ -0,0 +1,24 @@
promise_test(() => fetch("resources/x-content-type-options.json").then(res => res.json()).then(runTests), "Loading JSON…");
function runTests(allTestData) {
for (let i = 0; i < allTestData.length; i++) {
const testData = allTestData[i],
input = encodeURIComponent(testData.input);
async_test(t => {
const script = document.createElement("script");
t.add_cleanup(() => script.remove());
// A <script> element loading a classic script does not care about the MIME type, unless
// X-Content-Type-Options: nosniff is specified, in which case a JavaScript MIME type is
// enforced, which x/x is not.
if (testData.nosniff) {
script.onerror = t.step_func_done();
script.onload = t.unreached_func("Script should not have loaded");
} else {
script.onerror = t.unreached_func("Script should have loaded");
script.onload = t.step_func_done();
}
script.src = "resources/nosniff.py?nosniff=" + input;
document.body.appendChild(script);
}, input);
}
}

View file

@ -1,7 +0,0 @@
HTTP/1.1 200 YOU HAVE NO POWER HERE
Content-Length: 22
Content-Type: x/x
X-Content-Type-options: nosniff
X-Content-Type-Options: no
// nothing to see here

View file

@ -1,7 +0,0 @@
HTTP/1.1 200 YOU HAVE NO POWER HERE
Content-Length: 22
Content-Type: x/x
X-Content-Type-Options: no
X-Content-Type-options: nosniff
// nothing to see here

View file

@ -1,6 +0,0 @@
HTTP/1.1 200 YOU HAVE NO POWER HERE
Content-Length: 22
Content-Type: x/x
Content-Type-Options: nosniff
// nothing to see here

View file

@ -1,6 +0,0 @@
HTTP/1.1 200 YOU HAVE NO POWER HERE
Content-Length: 22
Content-Type: x/x
X-Content-Type-Options: 'NosniFF'
// nothing to see here

View file

@ -1,6 +0,0 @@
HTTP/1.1 200 YOU HAVE NO POWER HERE
Content-Length: 22
Content-Type: x/x
X-Content-Type-Options: "nosniFF"
// nothing to see here

View file

@ -1,6 +0,0 @@
HTTP/1.1 200 YOU HAVE NO POWER HERE
Content-Length: 22
Content-Type: x/x
X-Content-Type-Options: NOSNIFF
// nothing to see here

View file

@ -0,0 +1,10 @@
def main(request, response):
response.add_required_headers = False
output = "HTTP/1.1 220 YOU HAVE NO POWER HERE\r\n"
output += "Content-Length: 22\r\n"
output += "Content-Type: x/x\r\n"
output += request.GET.first("nosniff") + "\r\n"
output += "\r\n"
output += "// nothing to see here"
response.writer.write(output)
response.close_connection = True

View file

@ -0,0 +1,58 @@
[
{
"input": "X-Content-Type-Options: NOSNIFF",
"nosniff": true
},
{
"input": "x-content-type-OPTIONS: nosniff",
"nosniff": true
},
{
"input": "X-Content-Type-Options: nosniff,,@#$#%%&^&^*()()11!",
"nosniff": true
},
{
"input": "X-Content-Type-Options: @#$#%%&^&^*()()11!,nosniff",
"nosniff": false
},
{
"input": "X-Content-Type-Options: nosniff\r\nX-Content-Type-Options: no",
"nosniff": true
},
{
"input": "X-Content-Type-Options: no\r\nX-Content-Type-Options: nosniff",
"nosniff": false
},
{
"input": "X-Content-Type-Options:\r\nX-Content-Type-Options: nosniff",
"nosniff": false
},
{
"input": "X-Content-Type-Options: ,nosniff",
"nosniff": false
},
{
"input": "X-Content-Type-Options: nosniff\u000C",
"nosniff": false
},
{
"input": "X-Content-Type-Options: nosniff\u000B",
"nosniff": false
},
{
"input": "X-Content-Type-Options: nosniff\u000B,nosniff",
"nosniff": false
},
{
"input": "X-Content-Type-Options: 'NosniFF'",
"nosniff": false
},
{
"input": "X-Content-Type-Options: \"nosniFF\"",
"nosniff": false
},
{
"input": "Content-Type-Options: nosniff",
"nosniff": false
}
]

View file

@ -0,0 +1,86 @@
test(() => {
const frame = document.body.appendChild(document.createElement("iframe")),
win = frame.contentWindow,
loc = win.location;
frame.remove();
assert_equals(win.location, loc);
}, "Window and Location are 1:1 after browsing context removal");
function bcLessLocation() {
const frame = document.body.appendChild(document.createElement("iframe")),
win = frame.contentWindow,
loc = win.location;
frame.remove();
return loc;
}
[
{
"property": "href",
"expected": "about:blank",
"values": ["https://example.com/", "/", "http://test:test/", "test test", "test:test", "chrome:fail"]
},
{
"property": "protocol",
"expected": "about:",
"values": ["http", "about", "test"]
},
{
"property": "host",
"expected": "",
"values": ["example.com", "test test", "()"]
},
{
"property": "hostname",
"expected": "",
"values": ["example.com"]
},
{
"property": "port",
"expected": "",
"values": ["80", "", "443", "notaport"]
},
{
"property": "pathname",
"expected": "blank",
"values": ["/", "x"]
},
{
"property": "search",
"expected": "",
"values": ["test"]
},
{
"property": "hash",
"expected": "",
"values": ["test", "#"]
}
].forEach(testSetup => {
testSetup.values.forEach(value => {
test(() => {
const loc = bcLessLocation();
loc[testSetup.property] = value;
assert_equals(loc[testSetup.property], testSetup.expected);
}, "Setting `" + testSetup.property + "` to `" + value + "` of a `Location` object sans browsing context is a no-op");
});
});
test(() => {
const loc = bcLessLocation();
assert_equals(loc.origin, "null");
}, "Getting `origin` of a `Location` object sans browsing context should be \"null\"");
["assign", "replace", "reload"].forEach(method => {
["about:blank", "https://example.com/", "/", "http://test:test/", "test test", "test:test", "chrome:fail"].forEach(value => {
test(() => {
const loc = bcLessLocation();
loc[method](value);
assert_equals(loc.href, "about:blank");
}, "Invoking `" + method + "` with `" + value + "` on a `Location` object sans browsing context is a no-op");
});
});
test(() => {
const loc = bcLessLocation();
assert_array_equals(loc.ancestorOrigins, []);
}, "Getting `ancestorOrigins` of a `Location` object sans browsing context should be []");

View file

@ -22,7 +22,7 @@
if(script2) {
head.removeChild(script2);
}
var script3 = createScript('data:text\/javascript, log("Script %233 ran"); createScript(\'\', \'log("Script #4 ran")\')');
var script3 = createScript('data:text\/javascript, log("Script %233 ran"); createScript(\'\', \'log("Script %234 ran")\')');
if(script3) {
head.removeChild(script3);
}

View file

@ -50,9 +50,16 @@ interface IDBFactory {
optional [EnforceRange] unsigned long long version);
[NewObject] IDBOpenDBRequest deleteDatabase(DOMString name);
Promise<sequence<IDBDatabaseInfo>> databases();
short cmp(any first, any second);
};
dictionary IDBDatabaseInfo {
DOMString name;
unsigned long long version;
};
[Exposed=(Window,Worker)]
interface IDBDatabase : EventTarget {
readonly attribute DOMString name;

View file

@ -13,6 +13,5 @@ interface Performance : EventTarget {
};
partial interface mixin WindowOrWorkerGlobalScope {
[Replaceable]
readonly attribute Performance performance;
[Replaceable] readonly attribute Performance performance;
};

View file

@ -59,6 +59,10 @@ TRAILING WHITESPACE, INDENT TABS, CR AT EOL: *.ico
TRAILING WHITESPACE, INDENT TABS, CR AT EOL: *.wasm
TRAILING WHITESPACE, INDENT TABS, CR AT EOL: *.bmp
## Whitespace needed for testing
TRAILING WHITESPACE: xhr/resources/headers-some-are-empty.asis
## Documentation ##
W3C-TEST.ORG: README.md
@ -313,10 +317,10 @@ SET TIMEOUT: resources/testharness.js
# setTimeout use in reftests
SET TIMEOUT: acid/acid3/test.html
# Travis
# CI configuration
WEB-PLATFORM.TEST: .azure-pipelines.yml
WEB-PLATFORM.TEST: .travis.yml
# Third party code
*: css/tools/apiclient/*
*: css/tools/w3ctestlib/*

View file

@ -74,7 +74,7 @@
}, "Width of scripted elements");
test(function() {
var e = 3;
var e = 3.2;
for (var i = 0; i <= 3; i++) {
assert_approx_equals(getBox("under" + i).height, getBox("under" + i + "base").height + getBox("under" + i + "under").height + e, e, "munder " + i + ": height is determined by the sum of heights of base and script plus some spacing.");
assert_approx_equals(getBox("over" + i).height, getBox("over" + i + "base").height + getBox("over" + i + "over").height + e, e, "mover " + i + ": height is determined by the sum of heights of base and script plus some spacing.");

View file

@ -71,40 +71,146 @@
var stream = await navigator.mediaDevices.getUserMedia(constraints);
assert_equals(stream.getTracks()[0].getSettings().groupId,
device.groupId);
assert_true(device.groupId.length > 0);
assert_greater_than(device.groupId.length, 0);
}
});
}, 'groupId is correctly reported by getSettings() for all devices');
promise_test(t => {
return navigator.mediaDevices.getUserMedia({audio: true}).then(stream => {
let settings = stream.getAudioTracks()[0].getSettings();
assert_equals(typeof(settings.deviceId), "string",
"deviceId should exist and it should be a string.");
assert_equals(typeof(settings.groupId), "string",
"groupId should exist and it should be a string.");
assert_equals(typeof(settings.volume), "number",
"volume should exist and it should be a number.");
assert_true(settings.volume >= 0.0 && settings.volume <= 1.0,
"volume should be a number in the range [0.0, 1.0].");
assert_equals(typeof(settings.sampleRate), "number",
"sampleRate should exist and it should be a number.");
assert_true(settings.sampleRate > 0, "sampleRate should be positive.");
assert_equals(typeof(settings.sampleSize), "number",
"sampleSize should exist and it should be a number.");
assert_true(settings.sampleSize > 0, "sampleSize should be positive.");
assert_equals(typeof(settings.echoCancellation), "boolean",
"echoCancellation should exist and it should be a boolean.");
assert_equals(typeof(settings.autoGainControl), "boolean",
"autoGainControl should exist and it should be a boolean.");
assert_equals(typeof(settings.noiseSuppression), "boolean",
"noiseSuppression should exist and it should be a boolean.");
assert_equals(typeof(settings.latency), "number",
"latency should exist and it should be a number.");
assert_true(settings.latency >= 0, "latency should not be negative.");
assert_equals(typeof(settings.channelCount), "number",
"channelCount should exist and it should be a number.");
assert_true(settings.channelCount > 0, "channelCount should be positive.");
});
}, 'audio properties are reported by getSettings()');
async function createAudioStreamAndGetSettings(t) {
const stream = await navigator.mediaDevices.getUserMedia({audio: true});
t.add_cleanup(() => stream.getAudioTracks()[0].stop());
return stream.getAudioTracks()[0].getSettings();
}
promise_test(async t => {
const settings = await createAudioStreamAndGetSettings(t);
assert_equals(typeof(settings.deviceId), "string",
"deviceId should exist and it should be a string.");
}, 'deviceId is reported by getSettings() for getUserMedia() audio tracks');
promise_test(async t => {
const settings = await createAudioStreamAndGetSettings(t);
assert_equals(typeof(settings.groupId), "string",
"groupId should exist and it should be a string.");
}, 'groupId is reported by getSettings() for getUserMedia() audio tracks');
promise_test(async t => {
const settings = await createAudioStreamAndGetSettings(t);
assert_equals(typeof(settings.volume), "number",
"volume should exist and it should be a number.");
assert_between_inclusive(settings.volume, 0.0, 1.0);
}, 'volume is reported by getSettings() for getUserMedia() audio tracks');
promise_test(async t => {
const settings = await createAudioStreamAndGetSettings(t);
assert_equals(typeof(settings.sampleRate), "number",
"sampleRate should exist and it should be a number.");
assert_greater_than(settings.sampleRate, 0);
}, 'sampleRate is reported by getSettings() for getUserMedia() audio tracks');
promise_test(async t => {
const settings = await createAudioStreamAndGetSettings(t);
assert_equals(typeof(settings.sampleSize), "number",
"sampleSize should exist and it should be a number.");
assert_greater_than(settings.sampleSize, 0);
}, 'sampleSize is reported by getSettings() for getUserMedia() audio tracks');
promise_test(async t => {
const settings = await createAudioStreamAndGetSettings(t);
assert_equals(typeof(settings.echoCancellation), "boolean",
"echoCancellation should exist and it should be a boolean.");
}, 'echoCancellation is reported by getSettings() for getUserMedia() audio tracks');
promise_test(async t => {
const settings = await createAudioStreamAndGetSettings(t);
assert_equals(typeof(settings.autoGainControl), "boolean",
"autoGainControl should exist and it should be a boolean.");
}, 'autoGainControl is reported by getSettings() for getUserMedia() audio tracks');
promise_test(async t => {
const settings = await createAudioStreamAndGetSettings(t);
assert_equals(typeof(settings.noiseSuppression), "boolean",
"noiseSuppression should exist and it should be a boolean.");
}, 'noiseSuppression is reported by getSettings() for getUserMedia() audio tracks');
promise_test(async t => {
const settings = await createAudioStreamAndGetSettings(t);
assert_equals(typeof(settings.latency), "number",
"latency should exist and it should be a number.");
assert_greater_than_equal(settings.latency,0);
}, 'latency is reported by getSettings() for getUserMedia() audio tracks');
promise_test(async t => {
const settings = await createAudioStreamAndGetSettings(t);
assert_equals(typeof(settings.channelCount), "number",
"channelCount should exist and it should be a number.");
assert_greater_than(settings.channelCount, 0);
}, 'channelCount is reported by getSettings() for getUserMedia() audio tracks');
async function createVideoStreamAndGetSettings(t) {
const stream = await navigator.mediaDevices.getUserMedia({video: true});
t.add_cleanup(() => stream.getVideoTracks()[0].stop());
return stream.getVideoTracks()[0].getSettings();
}
promise_test(async t => {
const settings = await createVideoStreamAndGetSettings(t);
assert_equals(typeof(settings.deviceId), "string",
"deviceId should exist and it should be a string.");
}, 'deviceId is reported by getSettings() for getUserMedia() video tracks');
promise_test(async t => {
const settings = await createVideoStreamAndGetSettings(t);
assert_equals(typeof(settings.groupId), "string",
"groupId should exist and it should be a string.");
}, 'groupId is reported by getSettings() for getUserMedia() video tracks');
promise_test(async t => {
const settings = await createVideoStreamAndGetSettings(t);
assert_equals(typeof(settings.width), "number",
"width should exist and it should be a number.");
assert_true(Number.isInteger(settings.width), "width should be an integer.");
assert_greater_than_equal(settings.width, 0);;
}, 'width is reported by getSettings() for getUserMedia() video tracks');
promise_test(async t => {
const settings = await createVideoStreamAndGetSettings(t);
assert_equals(typeof(settings.height), "number",
"height should exist and it should be a number.");
assert_true(Number.isInteger(settings.height), "height should be an integer.");
assert_greater_than_equal(settings.height, 0);
}, 'height is reported by getSettings() for getUserMedia() video tracks');
promise_test(async t => {
const settings = await createVideoStreamAndGetSettings(t);
assert_equals(typeof(settings.aspectRatio), "number",
"aspectRatio should exist and it should be a number.");
assert_greater_than_equal(settings.aspectRatio, 0);
}, 'aspectRatio is reported by getSettings() for getUserMedia() video tracks');
promise_test(async t => {
const settings = await createVideoStreamAndGetSettings(t);
assert_equals(typeof(settings.frameRate), "number",
"frameRate should exist and it should be a number.");
assert_greater_than_equal(settings.frameRate, 0);
}, 'frameRate is reported by getSettings() for getUserMedia() video tracks');
promise_test(async t => {
const settings = await createVideoStreamAndGetSettings(t);
// facingMode not treated as mandatory because not all platforms provide
// this information.
if (settings.facingMode) {
assert_equals(typeof(settings.facingMode), "string",
"If facingMode is provided it should be a string.");
assert_in_array(settings.facingMode,
['user', 'environment', 'left', 'right']);
}
}, 'facingMode is reported by getSettings() for getUserMedia() video tracks');
promise_test(async t => {
const settings = await createVideoStreamAndGetSettings(t);
assert_equals(typeof(settings.resizeMode), "string",
"resizeMode should exist and it should be a string.");
assert_in_array(settings.resizeMode, ['none', 'crop-and-scale']);
}, 'resizeMode is reported by getSettings() for getUserMedia() video tracks');
</script>

View file

@ -33,29 +33,6 @@ self.addEventListener('paymentrequest', event => {
return;
}
const supportedTypes = methodData.data.supportedTypes;
if (!supportedTypes) {
const msg = 'Expected supported types in payment method specific data';
event.respondWith(Promise.reject(new Error(msg)));
return;
}
if (supportedTypes.length !== 1) {
const msg = `Expected one supported type, but got ${
supportedTypes.length
} instead`;
event.respondWith(Promise.reject(new Error(msg)));
return;
}
const supportedType = supportedTypes[0];
const expectedSupportedType = 'prepaid';
if (supportedType !== expectedSupportedType) {
const msg = `Expected supported type "${expectedSupportedType}", but got "${supportedType}"`;
event.respondWith(Promise.reject(new Error(msg)));
return;
}
if (methodData.displayItems) {
const msg = 'Expected no display items';
event.respondWith(Promise.reject(new Error(msg)));

View file

@ -264,14 +264,12 @@ promise_test(async t => {
promise_test(async t => {
const methodName = 'basic-card';
await registerApp(methodName);
const cardType = 'prepaid';
const cardNetwork = 'mir';
const request = new PaymentRequest(
[
{
supportedMethods: methodName,
data: {
supportedTypes: [cardType],
supportedNetworks: [cardNetwork],
},
},
@ -305,14 +303,12 @@ promise_test(async t => {
promise_test(async t => {
const methodName = 'basic-card';
const cardType = 'prepaid';
const cardNetwork = 'mir';
const registration = await registerApp(methodName);
await registration.paymentManager.instruments.set(instrumentKey, {
name: 'Test Payment Method',
method: methodName,
capabilities: {
supportedTypes: [cardType],
supportedNetworks: [cardNetwork],
},
});
@ -321,7 +317,6 @@ promise_test(async t => {
{
supportedMethods: methodName,
data: {
supportedTypes: [cardType],
supportedNetworks: [cardNetwork],
},
},
@ -355,14 +350,12 @@ promise_test(async t => {
promise_test(async t => {
const methodName = 'basic-card';
const cardType = 'prepaid';
const cardNetwork = 'mir';
const registration = await registerApp(methodName);
await registration.paymentManager.instruments.set(instrumentKey, {
name: 'Test Payment Method',
method: methodName,
capabilities: {
supportedTypes: [cardType],
supportedNetworks: [cardNetwork],
},
});

View file

@ -77,7 +77,7 @@ function runTests(registration) {
},
],
method: 'basic-card',
capabilities: {supportedNetworks: ['mir'], supportedTypes: ['prepaid']},
capabilities: {supportedNetworks: ['mir']},
},
);
const result = await registration.paymentManager.instruments.get(
@ -104,7 +104,7 @@ function runTests(registration) {
{src: '/images/green-16x16.png', sizes: '16x16', type: 'image/png'},
],
method: 'basic-card',
capabilities: {supportedNetworks: ['mir'], supportedTypes: ['prepaid']},
capabilities: {supportedNetworks: ['mir']},
},
);
let result = await registration.paymentManager.instruments.get(
@ -120,7 +120,6 @@ function runTests(registration) {
assert_equals(result.icons[0].type, 'image/png');
assert_equals(result.method, 'basic-card');
assert_array_equals(result.capabilities.supportedNetworks, ['mir']);
assert_array_equals(result.capabilities.supportedTypes, ['prepaid']);
await registration.paymentManager.instruments.set(
'existing-instrument-key',
{
@ -133,7 +132,7 @@ function runTests(registration) {
},
],
method: 'basic-card',
capabilities: {supportedNetworks: ['visa'], supportedTypes: ['credit']},
capabilities: {supportedNetworks: ['visa']},
},
);
result = await registration.paymentManager.instruments.get(
@ -149,7 +148,6 @@ function runTests(registration) {
assert_equals(result.icons[0].type, 'image/png');
assert_equals(result.method, 'basic-card');
assert_array_equals(result.capabilities.supportedNetworks, ['visa']);
assert_array_equals(result.capabilities.supportedTypes, ['credit']);
}, 'Resetting an existing instrument updates the instrument');
promise_test(async t => {
@ -166,7 +164,7 @@ function runTests(registration) {
},
],
method: 'basic-card',
capabilities: {supportedNetworks: ['mir'], supportedTypes: ['prepaid']},
capabilities: {supportedNetworks: ['mir']},
},
);
await registration.paymentManager.instruments.clear();

View file

@ -16,7 +16,7 @@ async function setInstrumentsAndRunTests(registration) {
{src: '/images/rgrg-256x256.png', sizes: '256x256', type: 'image/png'},
],
method: 'basic-card',
capabilities: {supportedNetworks: ['mir'], supportedTypes: ['prepaid']},
capabilities: {supportedNetworks: ['mir']},
});
runTests();
}
@ -25,7 +25,7 @@ function runTests() {
promise_test(async t => {
const response = await new PaymentRequest(
[
{supportedMethods: 'basic-card', data: {supportedTypes: ['prepaid']}},
{supportedMethods: 'basic-card', data: {}},
{supportedMethods: 'interledger', data: {supportedNetworks: ['mir']}},
],
{
@ -60,7 +60,7 @@ function runTests() {
},
{
supportedMethods: 'interledger',
data: {supportedTypes: ['prepaid']},
data: {},
total: {
label: 'Prepaid total',
amount: {currency: 'USD', value: '0.0097'},

View file

@ -77,7 +77,7 @@ function runPromiseTest(button, data, expectedCard = visaCredit, expectedAddress
The test expects the following credit card.
</p>
<ol>
<li>Add credit card:
<li>Add card:
<dl>
<dt>Cardholder name:</dt>
<dd>web platform test</dd>
@ -112,22 +112,12 @@ function runPromiseTest(button, data, expectedCard = visaCredit, expectedAddress
<ol>
<li>
<button onclick="runPromiseTest(this, {});">
When passed BasicCardRequest without members, allow the user to input of any credit card type.
</button>
</li>
<li>
<button onclick="runPromiseTest(this, { supportedNetworks: [], supportedTypes: [] });">
Returns any card type on any network, because zero length supportedNetworks and supportedTypes.
When passed BasicCardRequest without members, allow the user to input a card on any network.
</button>
</li>
<li>
<button onclick="runPromiseTest(this, { supportedNetworks: [] });">
Returns any card type on any network, because supportedNetworks is missing and supportedTypes is empty.
</button>
</li>
<li>
<button onclick="runPromiseTest(this, { supportedTypes: [] });">
Returns any card type on any network missing supportedTypes, and empty supportedNetwork.
Returns a card on any network, because zero length supportedNetworks.
</button>
</li>
</ol>

View file

@ -0,0 +1,25 @@
<!doctype html>
<meta charset=utf-8>
<title>Historical Basic Card Changes</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
// https://github.com/w3c/payment-method-basic-card/pull/62
test(() => {
try {
new PaymentRequest(
[
{
supportedMethods: "basic-card",
supportedTypes: [
"this was an enum value once - so this would have thrown",
],
},
],
{ total: { label: "bar", amount: { currency: "BAZ", value: "0" } } }
);
} catch (err) {
assert_unreached("Unexpected error");
}
}, "supportedTypes and BasicCardType enum were removed from the spec");
</script>

View file

@ -18,7 +18,7 @@
}, 'Call PresentationRequest constructor with an empty sequence. NotSupportedError Exception expected.');
assert_throws('SyntaxError', () => {
new PresentationRequest('http://@');
new PresentationRequest('https://@');
}, 'Call PresentationRequest constructor with an invalid URL. SyntaxError Exception expected.');
assert_throws('NotSupportedError', () => {
@ -26,7 +26,7 @@
}, 'Call PresentationRequest constructor with an unsupported URL. NotSupportedError expected.');
assert_throws('SyntaxError', function() {
new PresentationRequest(['presentation.html', 'http://@']);
new PresentationRequest(['presentation.html', 'https://@']);
}, 'Call PresentationRequest constructor with a sequence of URLs, one of them invalid. SyntaxError Exception expected.');
assert_throws('NotSupportedError', function() {

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