mirror of
https://github.com/servo/servo.git
synced 2025-07-07 23:43:39 +01:00
Update web-platform-tests to revision 6340a70e8df5e850ea44436b54105f59dd5aa22e
This commit is contained in:
parent
5788e8c050
commit
7be3e2f06b
131 changed files with 3893 additions and 1852 deletions
|
@ -14,9 +14,6 @@
|
|||
[Revoke blob URL after creating Request, will fetch]
|
||||
expected: FAIL
|
||||
|
||||
[Revoke blob URL after calling fetch, fetch should succeed]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[url-with-fetch.any.html]
|
||||
[Untitled]
|
||||
|
@ -37,6 +34,3 @@
|
|||
[Revoke blob URL after creating Request, will fetch]
|
||||
expected: FAIL
|
||||
|
||||
[Revoke blob URL after calling fetch, fetch should succeed]
|
||||
expected: FAIL
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,70 @@
|
|||
[place-content-computed.html]
|
||||
[Property place-content value 'space-around' computes to 'space-around']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'space-between' computes to 'space-between']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'last baseline' computes to 'last baseline start']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'last baseline flex-start' computes to 'last baseline flex-start']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'baseline' computes to 'baseline start']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'center' computes to 'center']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'normal stretch' computes to 'normal stretch']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'first baseline' computes to 'baseline start']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'normal normal' computes to 'normal']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'flex-start flex-start' computes to 'flex-start']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'center normal' computes to 'center normal']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'baseline unsafe left' computes to 'baseline unsafe left']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'space-evenly unsafe end' computes to 'space-evenly unsafe end']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'baseline space-around' computes to 'baseline space-around']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'first baseline start' computes to 'baseline start']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'space-evenly' computes to 'space-evenly']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'first baseline stretch' computes to 'baseline stretch']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'safe flex-start' computes to 'safe flex-start']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'end' computes to 'end']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'unsafe end unsafe end' computes to 'unsafe end']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'stretch' computes to 'stretch']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'baseline stretch' computes to 'baseline stretch']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-content value 'normal right' computes to 'normal right']
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
[place-items-computed.html]
|
||||
[Property place-items value 'stretch legacy left' computes to 'stretch legacy left']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'normal right' computes to 'normal right']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'first baseline' computes to 'baseline']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'stretch stretch' computes to 'stretch']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'normal' computes to 'normal']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'last baseline center' computes to 'last baseline center']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'flex-end' computes to 'flex-end']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'first baseline right legacy' computes to 'baseline legacy right']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'self-start' computes to 'self-start']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'last baseline last baseline' computes to 'last baseline']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'safe self-end normal' computes to 'safe self-end normal']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'center' computes to 'center']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'baseline unsafe left' computes to 'baseline unsafe left']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'unsafe center unsafe center' computes to 'unsafe center']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'flex-end legacy' computes to 'flex-end legacy center']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'end end' computes to 'end']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'safe self-end' computes to 'safe self-end']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-items value 'stretch baseline' computes to 'stretch baseline']
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
[place-self-computed.html]
|
||||
[Property place-self value 'flex-end' computes to 'flex-end']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-self value 'start' computes to 'start']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-self value 'self-start' computes to 'self-start']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-self value 'auto last baseline' computes to 'auto last baseline']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-self value 'baseline flex-end' computes to 'baseline flex-end']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-self value 'stretch' computes to 'stretch']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-self value 'normal' computes to 'normal']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-self value 'unsafe center stretch' computes to 'unsafe center stretch']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-self value 'baseline unsafe left' computes to 'baseline unsafe left']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-self value 'normal right' computes to 'normal right']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-self value 'auto auto' computes to 'auto']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-self value 'safe self-end safe self-end' computes to 'safe self-end']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-self value 'unsafe center' computes to 'unsafe center']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-self value 'last baseline last baseline' computes to 'last baseline']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-self value 'first baseline' computes to 'baseline']
|
||||
expected: FAIL
|
||||
|
||||
[Property place-self value 'center center' computes to 'center']
|
||||
expected: FAIL
|
||||
|
|
@ -1079,3 +1079,12 @@
|
|||
[text-indent percentage(%) / values]
|
||||
expected: FAIL
|
||||
|
||||
[margin-top length(ex) / values]
|
||||
expected: FAIL
|
||||
|
||||
[margin-top length(mm) / values]
|
||||
expected: FAIL
|
||||
|
||||
[margin-top length(pt) / values]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -24,6 +24,3 @@
|
|||
[boundsAttribute1: points]
|
||||
expected: FAIL
|
||||
|
||||
[p1Top4Attributes1: bounds]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -312,24 +312,6 @@
|
|||
[<iframe>: separate response Content-Type: */* text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: */* text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
[X-Content-Type-Options%3A%20nosniff%0C]
|
||||
expected: FAIL
|
||||
|
||||
[Content-Type-Options%3A%20nosniff]
|
||||
[X-Content-Type-Options%3A%20'NosniFF']
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%20%22nosniFF%22]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
[fetch-preflight.tentative.https.sub.html]
|
||||
[Same-site fetch with preflight]
|
||||
expected: FAIL
|
||||
|
||||
[Cross-site fetch with preflight]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[006.html]
|
||||
[Link with onclick form submit and href navigation ]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[traverse_the_history_1.html]
|
||||
[Multiple history traversals from the same task]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[traverse_the_history_5.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -1,24 +1,5 @@
|
|||
[open-features-negative-innerwidth-innerheight.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[HTML: window.open `features`: negative values for legacy `innerwidth`, `innerheight`]
|
||||
expected: FAIL
|
||||
|
||||
[features "innerheight=-404.5" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "innerwidth=-404.5" should NOT set "width=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "innerwidth=-404" should NOT set "width=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "innerheight=-404e1" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "innerheight=-404" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "innerwidth=-404e1" should NOT set "width=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,24 +1,5 @@
|
|||
[open-features-negative-screenx-screeny.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[HTML: window.open `features`: negative values for legacy `screenx`, `screeny`]
|
||||
expected: FAIL
|
||||
|
||||
[features "screenx=-204" should NOT set "left=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "screeny=-204" should NOT set "top=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "screeny=-204.5" should NOT set "top=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "screeny=-0" should NOT set "top=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "screenx=-0" should NOT set "left=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "screenx=-204.5" should NOT set "left=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,24 +1,5 @@
|
|||
[open-features-negative-top-left.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[HTML: window.open `features`: negative values for `top`, `left`]
|
||||
expected: FAIL
|
||||
|
||||
[features "top=-204" should NOT set "top=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "top=-204.5" should NOT set "top=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "left=-204" should NOT set "left=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "top=-0" should NOT set "top=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "left=-204.5" should NOT set "left=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "left=-0" should NOT set "left=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,24 +1,5 @@
|
|||
[open-features-negative-width-height.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[HTML: window.open `features`: negative values for `width`, `height`]
|
||||
expected: FAIL
|
||||
|
||||
[features "height=-404" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "height=-404e1" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "height=-404.5" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "width=-404" should NOT set "width=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "width=-404e1" should NOT set "width=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "width=-404.5" should NOT set "width=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,48 +1,32 @@
|
|||
[open-features-non-integer-height.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[HTML: window.open `features`: non-integer values for feature `height`]
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405*3" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405.32" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405e1" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405/5" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405^4" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405.5" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405e-1" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405 " should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405LLl" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "height=/404" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[top=0,left=0,width=401,: absence of feature "height" should be treated same as "height=0"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[top=0,left=0: absence of feature "height" should be treated same as "height=0"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "height=_404" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "height=L404" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,42 +1,32 @@
|
|||
[open-features-non-integer-innerheight.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[HTML: window.open `features`: non-integer values for legacy feature `innerheight`]
|
||||
expected: FAIL
|
||||
|
||||
[features "innerheight=405e-1" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "innerheight=405LLl" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "innerheight=405^4" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "innerheight=405e1" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "innerheight=405 " should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "innerheight=405/5" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "innerheight=405.32" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "innerheight=405.5" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "innerheight=405*3" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "innerheight=_404" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "innerheight=L404" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "innerheight=/404" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,42 +1,32 @@
|
|||
[open-features-non-integer-innerwidth.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[HTML: window.open `features`: non-integer values for legacy feature `innerwidth`]
|
||||
expected: FAIL
|
||||
|
||||
[features "innerwidth=405e-1" should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "innerwidth=405*3" should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "innerwidth=405.5" should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "innerwidth=405e1" should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "innerwidth=405.32" should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "innerwidth=405 " should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "innerwidth=405LLl" should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "innerwidth=405/5" should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "innerwidth=405^4" should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "innerwidth=/404" should NOT set "width=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "innerwidth=_404" should NOT set "width=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "innerwidth=L404" should NOT set "width=404"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,42 +1,32 @@
|
|||
[open-features-non-integer-left.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[HTML: window.open `features`: non-integer values for feature `left`]
|
||||
expected: FAIL
|
||||
|
||||
[features "left=105e1" should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "left=105 " should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "left=105/5" should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "left=105e-1" should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "left=105^4" should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "left=105LLl" should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "left=105.32" should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "left=105*3" should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "left=105.5" should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "left=L104" should NOT set "left=104"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "left=/104" should NOT set "left=104"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "left=_104" should NOT set "left=104"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,42 +1,32 @@
|
|||
[open-features-non-integer-screenx.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[HTML: window.open `features`: non-integer values for legacy feature `screenx`]
|
||||
expected: FAIL
|
||||
|
||||
[features "screenx=105.5" should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "screenx=105e1" should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "screenx=105 " should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "screenx=105*3" should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "screenx=105e-1" should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "screenx=105^4" should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "screenx=105LLl" should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "screenx=105/5" should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "screenx=105.32" should set "left=105"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "screenx=_104" should NOT set "left=104"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "screenx=L104" should NOT set "left=104"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "screenx=/104" should NOT set "left=104"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,42 +1,32 @@
|
|||
[open-features-non-integer-screeny.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[HTML: window.open `features`: non-integer values for legacy feature `screeny`]
|
||||
expected: FAIL
|
||||
|
||||
[features "screeny=405^4" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "screeny=405e-1" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "screeny=405LLl" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "screeny=405e1" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "screeny=405 " should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "screeny=405/5" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "screeny=405*3" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "screeny=405.32" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "screeny=405.5" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "screeny=_404" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "screeny=L404" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "screeny=/404" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,42 +1,32 @@
|
|||
[open-features-non-integer-top.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[HTML: window.open `features`: non-integer values for feature `top`]
|
||||
expected: FAIL
|
||||
|
||||
[features "top=105/5" should set "top=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "top=105*3" should set "top=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "top=105LLl" should set "top=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "top=105e-1" should set "top=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "top=105.32" should set "top=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "top=105e1" should set "top=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "top=105 " should set "top=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "top=105^4" should set "top=105"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "top=105.5" should set "top=105"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "top=/104" should NOT set "top=104"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "top=_104" should NOT set "top=104"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "top=L104" should NOT set "top=104"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,48 +1,32 @@
|
|||
[open-features-non-integer-width.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[HTML: window.open `features`: non-integer values for feature `width`]
|
||||
expected: FAIL
|
||||
|
||||
[features "width=405^4" should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "width=405.5" should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "width=405e1" should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "width=405 " should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "width=405.32" should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "width=405LLl" should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "width=405*3" should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "width=405e-1" should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "width=405/5" should set "width=405"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[top=0,left=0: absence of feature "width" should be treated same as "width=0"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "width=_404" should NOT set "width=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[top=0,left=0,height=401,: absence of feature "width" should be treated same as "width=0"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "width=/404" should NOT set "width=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "width=L404" should NOT set "width=404"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
[non-active-document.html]
|
||||
[DOMParser]
|
||||
expected: FAIL
|
||||
|
||||
[createHTMLDocument]
|
||||
expected: FAIL
|
||||
|
||||
[<template>]
|
||||
expected: FAIL
|
||||
|
|
@ -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
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[load-event-after-location-set-during-write.window.html]
|
||||
[Setting location from document.write() call should not trigger load event until that load completes]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
[promise-rejection-events.html]
|
||||
expected: TIMEOUT
|
||||
[delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -9,6 +8,3 @@
|
|||
[no unhandledrejection/rejectionhandled: rejection handler attached synchronously to a promise created from createImageBitmap]
|
||||
expected: FAIL
|
||||
|
||||
[rejectionhandled is dispatched from a queued task, and not immediately]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
11
tests/wpt/metadata/resource-timing/buffered-flag.any.js.ini
Normal file
11
tests/wpt/metadata/resource-timing/buffered-flag.any.js.ini
Normal file
|
@ -0,0 +1,11 @@
|
|||
[buffered-flag.any.worker.html]
|
||||
expected: ERROR
|
||||
[PerformanceObserver with buffered flag sees previous resource entries.]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
||||
[buffered-flag.any.html]
|
||||
expected: ERROR
|
||||
[PerformanceObserver with buffered flag sees previous resource entries.]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -110,3 +110,9 @@
|
|||
[X SNR (-276.77847420751567 dB) is not greater than or equal to 65.737. Got -276.77847420751567.]
|
||||
expected: FAIL
|
||||
|
||||
[X SNR (-400.71948971001717 dB) is not greater than or equal to 65.737. Got -400.71948971001717.]
|
||||
expected: FAIL
|
||||
|
||||
[X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[30\]\t9.4836157560348511e-1\t9.5236867666244507e-1\t4.0071010589599609e-3\t4.2075103446311962e-3\t3.8985999999999999e-3\n\t[31\]\t9.2646563053131104e-1\t9.3139332532882690e-1\t4.9276947975158691e-3\t5.2906700783754857e-3\t3.8985999999999999e-3\n\t[32\]\t9.0087991952896118e-1\t9.0675884485244751e-1\t5.8789253234863281e-3\t6.4834496590358351e-3\t3.8985999999999999e-3\n\t[33\]\t8.7170630693435669e-1\t8.7856203317642212e-1\t6.8557262420654297e-3\t7.8033490899654511e-3\t3.8985999999999999e-3\n\t[34\]\t8.3906102180480957e-1\t8.4691369533538818e-1\t7.8526735305786133e-3\t9.2721059699818163e-3\t3.8985999999999999e-3\n\t...and 31037 more errors.\n\tMax AbsError of 1.1836414583850666e+22 at index of 39267.\n\t[39267\]\t1.1836414583850666e+22\t-9.8276454210281372e-1\t1.1836414583850666e+22\t1.2043998411383850e+22\t3.8985999999999999e-3\n\tMax RelError of 2.3038078820072928e+22 at index of 20238.\n\t[20238\]\t1.0960356369936048e+22\t-4.7574958205223083e-1\t1.0960356369936048e+22\t2.3038078820072928e+22\t3.8985999999999999e-3\n]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
[Worker-constructor.html]
|
||||
expected: ERROR
|
|
@ -0,0 +1,2 @@
|
|||
[transition_calc_implicit.html]
|
||||
expected: TIMEOUT
|
|
@ -89,7 +89,7 @@
|
|||
effect.localTime = this.test_local_time++;
|
||||
}
|
||||
state() {
|
||||
return new Error('foo');
|
||||
return new Symbol('foo');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
<!doctype html>
|
||||
<meta name="timeout" content="long">
|
||||
<title>Accept-CH-Lifetime test</title>
|
||||
<body>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/get-host-info.sub.js"></script>
|
||||
<script src="resources/accept-ch-lifetime-test.js"></script>
|
||||
|
||||
<script>
|
||||
setup({ explicit_done: true });
|
||||
|
||||
// Cross-origin header tests
|
||||
run_test({ name: "cross origin iframe not setting other origins",
|
||||
initial_url: echo,
|
||||
accept_url: host_info.HTTPS_REMOTE_ORIGIN + accept,
|
||||
expect_url: do_not_expect,
|
||||
type: "iframe" });
|
||||
|
||||
run_test({ name: "cross origin iframe not setting own origin",
|
||||
initial_url: host_info.HTTPS_REMOTE_ORIGIN + echo,
|
||||
accept_url: host_info.HTTPS_REMOTE_ORIGIN + accept,
|
||||
expect_url: host_info.HTTPS_REMOTE_ORIGIN + do_not_expect,
|
||||
type: "iframe" });
|
||||
|
||||
run_test({ name: "cross origin navigation",
|
||||
initial_url: echo,
|
||||
accept_url: host_info.HTTPS_REMOTE_ORIGIN + accept,
|
||||
expect_url: host_info.HTTPS_REMOTE_ORIGIN + expect,
|
||||
type: "navigation" });
|
||||
|
||||
run_test({ name: "cross origin subresource",
|
||||
initial_url: host_info.HTTPS_REMOTE_ORIGIN + echo,
|
||||
accept_url: host_info.HTTPS_REMOTE_ORIGIN + accept,
|
||||
expect_url: host_info.HTTPS_REMOTE_ORIGIN + do_not_expect,
|
||||
type: "subresource" });
|
||||
|
||||
// Same origin header tests
|
||||
run_test({ name: "same origin iframe",
|
||||
initial_url: echo,
|
||||
accept_url: accept,
|
||||
expect_url: expect,
|
||||
type: "iframe" });
|
||||
|
||||
run_test({ name: "same origin navigation",
|
||||
initial_url: echo,
|
||||
accept_url: accept,
|
||||
expect_url: expect,
|
||||
type: "navigation" });
|
||||
|
||||
run_test({ name: "same origin subresource",
|
||||
initial_url: echo,
|
||||
accept_url: accept,
|
||||
expect_url: do_not_expect,
|
||||
type: "subresource" });
|
||||
|
||||
// Cross-origin http-equiv tests
|
||||
run_test({ name: "http-equiv cross origin iframe not setting other origins",
|
||||
initial_url: echo,
|
||||
accept_url: host_info.HTTPS_REMOTE_ORIGIN + httpequiv_accept,
|
||||
expect_url: do_not_expect,
|
||||
type: "iframe" });
|
||||
|
||||
run_test({ name: "http-equiv cross origin iframe not setting own origin",
|
||||
initial_url: host_info.HTTPS_REMOTE_ORIGIN + echo,
|
||||
accept_url: host_info.HTTPS_REMOTE_ORIGIN + httpequiv_accept,
|
||||
expect_url: host_info.HTTPS_REMOTE_ORIGIN + do_not_expect,
|
||||
type: "iframe" });
|
||||
|
||||
run_test({ name: "http-equiv cross origin navigation",
|
||||
initial_url: echo,
|
||||
accept_url: host_info.HTTPS_REMOTE_ORIGIN + httpequiv_accept,
|
||||
expect_url: host_info.HTTPS_REMOTE_ORIGIN + expect,
|
||||
type: "navigation" });
|
||||
|
||||
run_test({ name: "http-equiv cross origin subresource",
|
||||
initial_url: host_info.HTTPS_REMOTE_ORIGIN + echo,
|
||||
accept_url: host_info.HTTPS_REMOTE_ORIGIN + httpequiv_accept,
|
||||
expect_url: host_info.HTTPS_REMOTE_ORIGIN + do_not_expect,
|
||||
type: "subresource" });
|
||||
|
||||
// same-origin http-equiv tests
|
||||
run_test({ name: "http-equiv same origin iframe",
|
||||
initial_url: echo,
|
||||
accept_url: httpequiv_accept,
|
||||
expect_url: expect,
|
||||
type: "iframe" });
|
||||
|
||||
run_test({ name: "http-equiv same origin navigation",
|
||||
initial_url: echo,
|
||||
accept_url: httpequiv_accept,
|
||||
expect_url: expect,
|
||||
type: "navigation" });
|
||||
|
||||
run_test({ name: "http-equiv same origin subresource",
|
||||
initial_url: echo,
|
||||
accept_url: httpequiv_accept,
|
||||
expect_url: do_not_expect,
|
||||
type: "subresource" });
|
||||
|
||||
done();
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
<html>
|
||||
<title>Accept-CH-Lifetime test</title>
|
||||
<body>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<!--
|
||||
Apart from this webpage, the test opens two more html web page. One test is run
|
||||
in this web page, and two in the other web pages.
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
// This test fetches resources/accept_ch_lifetime.html. The response headers to
|
||||
// that webpage contain Accept-CH and Accept-CH-Lifetime headers.
|
||||
// Fetching that webpage should cause the user-agent to persist origin
|
||||
// preferences for the client hints specified in Accept-CH header for a
|
||||
// duration specified in the Accept-CH-Lifetime header.
|
||||
|
||||
// Next, to verify if the origin preferences were persisted by the user
|
||||
// agent, this test fetches resources/expect_client_hints_headers.html
|
||||
// in a new window. Fetching of resources/expect_client_hints_headers.html
|
||||
// verifies that the user agent actually sends the client hints in the request
|
||||
// headers.
|
||||
|
||||
// Test is marked as tentative until https://github.com/whatwg/fetch/issues/726
|
||||
// is resolved.
|
||||
|
||||
// First, verify the initial state to make sure that the browser does not have
|
||||
// client hints preferences cached from a previous run of the test.
|
||||
promise_test(t => {
|
||||
return fetch("echo_client_hints_received.py").then(r => {
|
||||
assert_equals(r.status, 200)
|
||||
// Verify that the browser did not include client hints in the request
|
||||
// headers when fetching echo_client_hints_received.py.
|
||||
assert_false(r.headers.has("device-memory-received"), "device-memory-received");
|
||||
});
|
||||
}, "Precondition: Test that the browser does not have client hints preferences cached");
|
||||
|
||||
async_test(t => {
|
||||
window.addEventListener('message', t.step_func(function(e) {
|
||||
if(!e.source.location.pathname.includes("expect_client_hints_headers.html")) {
|
||||
return;
|
||||
}
|
||||
if(typeof e.data != "string")
|
||||
return;
|
||||
assert_equals(e.data, "PASS");
|
||||
t.done();
|
||||
}));
|
||||
}, "Loading of resources/expect_client_hints_headers.html did not finish.");
|
||||
|
||||
|
||||
function acceptChLifetimeLoaded() {
|
||||
// Open a new window. Verify that the user agent attaches the client hints.
|
||||
var verify_win = window.open("expect_client_hints_headers.html");
|
||||
assert_not_equals(verify_win, null, "Popup windows not allowed?");
|
||||
}
|
||||
|
||||
// Fetching this webpage should cause user-agent to persist client hint
|
||||
// preferences for the origin.
|
||||
var win = window.open("resources/accept_ch_lifetime.html");
|
||||
assert_not_equals(win, null, "Popup windows not allowed?");
|
||||
win.addEventListener('load', acceptChLifetimeLoaded, false);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,68 +0,0 @@
|
|||
<html>
|
||||
<title>Accept-CH-Lifetime test with cross-origin iframe</title>
|
||||
<body>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<!--
|
||||
Apart from this webpage, the test opens another html web page. One test is run
|
||||
in this web page, and another in the second web page.
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
// This test fetches resources/accept_ch_lifetime.html in a cross origin iframe.
|
||||
// The response headers to that webpage contain Accept-CH and Accept-CH-Lifetime
|
||||
// headers.
|
||||
|
||||
// Fetching that webpage should NOT cause the user-agent to persist origin
|
||||
// preferences for the client hints specified.
|
||||
|
||||
// Next, to verify if the origin preferences were NOT persisted by the user
|
||||
// agent, this test fetches resources/do_not_expect_client_hints_headers.html
|
||||
// in a new window. Fetching of
|
||||
// resources/do_not_expect_client_hints_headers.html
|
||||
// verifies that the user agent did not actually sent the client hints in the
|
||||
// request headers.
|
||||
|
||||
// Test is marked as tentative until https://github.com/whatwg/fetch/issues/726
|
||||
// is resolved.
|
||||
|
||||
// First, verify the initial state to make sure that the browser does not have
|
||||
// client hints preferences cached from a previous run of the test.
|
||||
promise_test(t => {
|
||||
return fetch("echo_client_hints_received.py").then(r => {
|
||||
assert_equals(r.status, 200)
|
||||
// Verify that the browser did not include client hints in the request
|
||||
// headers when fetching echo_client_hints_received.py.
|
||||
assert_false(r.headers.has("device-memory-received"), "device-memory-received");
|
||||
});
|
||||
}, "Precondition: Test that the browser does not have client hints preferences cached");
|
||||
|
||||
async_test(t => {
|
||||
window.addEventListener('message', t.step_func(function(e) {
|
||||
if(!e.source.location.pathname.includes("do_not_expect_client_hints_headers.html")) {
|
||||
return;
|
||||
}
|
||||
if(typeof e.data != "string")
|
||||
return;
|
||||
assert_equals(e.data, "PASS");
|
||||
t.done();
|
||||
}));
|
||||
}, "Loading of resources/do_not_expect_client_hints_headers.html did not finish.");
|
||||
|
||||
function acceptChLifetimeLoaded() {
|
||||
// Open a new window. Verify that the user agent does not attach the client
|
||||
// hints.
|
||||
var verify_win = window.open("resources/do_not_expect_client_hints_headers.html");
|
||||
assert_not_equals(verify_win, null, "Popup windows not allowed?");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<!-- Fetching this webpage should NOT cause user-agent to persist client hint
|
||||
preferences for the origin.-->
|
||||
<iframe onload="acceptChLifetimeLoaded()" src="https://{{hosts[][www]}}:{{ports[https][0]}}/client-hints/resources/accept_ch_lifetime.html"></iframe>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,69 +0,0 @@
|
|||
<html>
|
||||
<title>Accept-CH-Lifetime test with same-origin iframe</title>
|
||||
<meta name="timeout" content="long">
|
||||
<body>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<!--
|
||||
Apart from this webpage, the test opens another html web page. One test is run
|
||||
in this web page, and another in the second web page.
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
// This test fetches resources/accept_ch_lifetime.html in a same origin iframe.
|
||||
// The response headers to that webpage contain Accept-CH and Accept-CH-Lifetime
|
||||
// headers.
|
||||
|
||||
// Fetching that webpage should cause the user-agent to persist origin
|
||||
// preferences for the client hints specified in Accept-CH header for a
|
||||
// duration specified in the Accept-CH-Lifetime header.
|
||||
|
||||
// Next, to verify if the origin preferences were persisted by the user
|
||||
// agent, this test fetches resources/expect_client_hints_headers.html
|
||||
// in a new window. Fetching of resources/expect_client_hints_headers.html
|
||||
// verifies that the user agent actually sends the client hints in the request
|
||||
// headers.
|
||||
|
||||
// Test is marked as tentative until https://github.com/whatwg/fetch/issues/726
|
||||
// is resolved.
|
||||
|
||||
// First, verify the initial state to make sure that the browser does not have
|
||||
// client hints preferences cached from a previous run of the test.
|
||||
promise_test(t => {
|
||||
return fetch("echo_client_hints_received.py").then(r => {
|
||||
assert_equals(r.status, 200)
|
||||
// Verify that the browser did not include client hints in the request
|
||||
// headers when fetching echo_client_hints_received.py.
|
||||
assert_false(r.headers.has("device-memory-received"), "device-memory-received");
|
||||
});
|
||||
}, "Precondition: Test that the browser does not have client hints preferences cached");
|
||||
|
||||
var acceptChLifetimeLoaded;
|
||||
|
||||
async_test(t => {
|
||||
acceptChLifetimeLoaded = t.step_func(() => {
|
||||
// Open a new window. Verify that the user agent attaches the client hints.
|
||||
var verify_win = window.open("resources/expect_client_hints_headers.html");
|
||||
assert_not_equals(verify_win, null, "Popup windows not allowed?");
|
||||
});
|
||||
|
||||
window.addEventListener('message', t.step_func((e) => {
|
||||
if(!e.source.location.pathname.includes("expect_client_hints_headers.html")) {
|
||||
return;
|
||||
}
|
||||
if(typeof e.data != "string")
|
||||
return;
|
||||
assert_equals(e.data, "PASS");
|
||||
t.done();
|
||||
}));
|
||||
}, "Loading of resources/expect_client_hints_headers.html did not finish.");
|
||||
</script>
|
||||
|
||||
<!-- Fetching this webpage should cause user-agent to persist client hint
|
||||
preferences for the origin.-->
|
||||
<iframe onload="acceptChLifetimeLoaded()" src="resources/accept_ch_lifetime.html"></iframe>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,72 +0,0 @@
|
|||
<html>
|
||||
<title>Accept-CH-Lifetime test with subresource</title>
|
||||
<meta name="timeout" content="long">
|
||||
<body>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<!--
|
||||
Apart from this webpage, the test opens another html web page. One test is run
|
||||
in this web page, and another in the second web page.
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
// This test fetches resources/accept_ch_lifetime.html as a subresource. The
|
||||
// response headers to that webpage contain Accept-CH and Accept-CH-Lifetime
|
||||
// headers.
|
||||
|
||||
// Fetching that webpage as a subresource should NOT cause the user-agent to
|
||||
// persist origin preferences for the client hints specified in Accept-CH
|
||||
// header.
|
||||
|
||||
// Next, to verify if the origin preferences were not persisted by the user
|
||||
// agent, this test fetches resources/do_not_expect_client_hints_headers.html
|
||||
// in a new window. Fetching of
|
||||
// resources/do_not_expect_client_hints_headers.html verifies that the user
|
||||
// agent does not send the client hints in the request headers.
|
||||
|
||||
// Test is marked as tentative until https://github.com/whatwg/fetch/issues/726
|
||||
// is resolved.
|
||||
|
||||
// First, verify the initial state to make sure that the browser does not have
|
||||
// client hints preferences cached from a previous run of the test.
|
||||
promise_test(t => {
|
||||
return fetch("echo_client_hints_received.py").then(r => {
|
||||
assert_equals(r.status, 200)
|
||||
// Verify that the browser did not include client hints in the request
|
||||
// headers when fetching echo_client_hints_received.py.
|
||||
assert_false(r.headers.has("device-memory-received"), "device-memory-received");
|
||||
});
|
||||
}, "Precondition: Test that the browser does not have client hints preferences cached");
|
||||
|
||||
promise_test(t => {
|
||||
// Fetching this web page as a subresource should NOT cause user-agent to
|
||||
// persist client hint preferences for the origin.
|
||||
return fetch("resources/accept_ch_lifetime.html").then(r => {
|
||||
assert_equals(r.status, 200)
|
||||
// Verify that the browser did not include client hints in the request
|
||||
// headers.
|
||||
assert_false(r.headers.has("device-memory-received"), "device-memory-received");
|
||||
// Open a new window. Verify that the user agent does not attach the client
|
||||
// hints.
|
||||
var win = window.open("resources/do_not_expect_client_hints_headers.html");
|
||||
assert_not_equals(win, null, "Popup windows not allowed?");
|
||||
});
|
||||
}, "Test receiving Accept-CH-Lifetime header");
|
||||
|
||||
async_test(t => {
|
||||
window.addEventListener('message', t.step_func(function(e) {
|
||||
if(!e.source.location.pathname.includes("do_not_expect_client_hints_headers.html")) {
|
||||
return;
|
||||
}
|
||||
if(typeof e.data != "string")
|
||||
return;
|
||||
assert_equals(e.data, "PASS");
|
||||
t.done();
|
||||
}));
|
||||
}, "Loading of resources/do_not_expect_client_hints_headers.html did not finish.");
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,66 +0,0 @@
|
|||
<html>
|
||||
<title>Accept-CH-Lifetime test</title>
|
||||
<body>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<!--
|
||||
Apart from this webpage, the test opens two more html web page. One test is run
|
||||
in this web page, and two in the other web pages.
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
// This test fetches resources/http_equiv_accept_ch_lifetime.html. The response
|
||||
// to that webpage contains Accept-CH and Accept-CH-Lifetime http-equiv headers.
|
||||
// Fetching that webpage should cause the user-agent to persist origin
|
||||
// preferences for the client hints specified in Accept-CH header for a
|
||||
// duration specified in the Accept-CH-Lifetime header.
|
||||
|
||||
// Next, to verify if the origin preferences were persisted by the user
|
||||
// agent, this test fetches resources/expect_client_hints_headers.html
|
||||
// in a new window. Fetching of resources/expect_client_hints_headers.html
|
||||
// verifies that the user agent actually sends the client hints in the request
|
||||
// headers.
|
||||
|
||||
// Test is marked as tentative until https://github.com/whatwg/fetch/issues/726
|
||||
// is resolved.
|
||||
|
||||
// First, verify the initial state to make sure that the browser does not have
|
||||
// client hints preferences cached from a previous run of the test.
|
||||
promise_test(t => {
|
||||
return fetch("echo_client_hints_received.py").then(r => {
|
||||
assert_equals(r.status, 200)
|
||||
// Verify that the browser did not include client hints in the request
|
||||
// headers when fetching echo_client_hints_received.py.
|
||||
assert_false(r.headers.has("device-memory-received"), "device-memory-received");
|
||||
});
|
||||
}, "Precondition: Test that the browser does not have client hints preferences cached");
|
||||
|
||||
async_test(t => {
|
||||
window.addEventListener('message', t.step_func(function(e) {
|
||||
if(!e.source.location.pathname.includes("expect_client_hints_headers.html")) {
|
||||
return;
|
||||
}
|
||||
if(typeof e.data != "string")
|
||||
return;
|
||||
assert_equals(e.data, "PASS");
|
||||
t.done();
|
||||
}));
|
||||
}, "Loading of resources/expect_client_hints_headers.html did not finish.");
|
||||
|
||||
function acceptChLifetimeLoaded() {
|
||||
// Open a new window. Verify that the user agent attaches the client hints.
|
||||
var verify_win = window.open("expect_client_hints_headers.html");
|
||||
assert_not_equals(verify_win, null, "Popup windows not allowed?");
|
||||
}
|
||||
|
||||
// Fetching this webpage should cause user-agent to persist client hint
|
||||
// preferences for the origin.
|
||||
var win = window.open("resources/http_equiv_accept_ch_lifetime.html");
|
||||
assert_not_equals(win, null, "Popup windows not allowed?");
|
||||
win.addEventListener('load', acceptChLifetimeLoaded, false);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,66 +0,0 @@
|
|||
<html>
|
||||
<title>Accept-CH-Lifetime test with cross-origin iframe</title>
|
||||
<body>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<!--
|
||||
Apart from this webpage, the test opens another html web page. One test is run
|
||||
in this web page, and another in the second web page.
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
// This test fetches resources/http_equiv_accept_ch_lifetime.html in a cross
|
||||
// origin iframe. The response to that webpage contains Accept-CH and
|
||||
// Accept-CH-Lifetime http-equiv headers.
|
||||
|
||||
// Fetching that webpage should NOT cause the user-agent to persist origin
|
||||
// preferences for the client hints specified.
|
||||
|
||||
// Next, to verify if the origin preferences were NOT persisted by the user
|
||||
// agent, this test fetches resources/do_not_expect_client_hints_headers.html
|
||||
// in a new window. Fetching of
|
||||
// resources/do_not_expect_client_hints_headers.html
|
||||
// verifies that the user agent did not actually sent the client hints in the
|
||||
// request headers.
|
||||
|
||||
// Test is marked as tentative until https://github.com/whatwg/fetch/issues/726
|
||||
// is resolved.
|
||||
|
||||
// First, verify the initial state to make sure that the browser does not have
|
||||
// client hints preferences cached from a previous run of the test.
|
||||
promise_test(t => {
|
||||
return fetch("echo_client_hints_received.py").then(r => {
|
||||
assert_equals(r.status, 200)
|
||||
// Verify that the browser did not include client hints in the request
|
||||
// headers when fetching echo_client_hints_received.py.
|
||||
assert_false(r.headers.has("device-memory-received"), "device-memory-received");
|
||||
});
|
||||
}, "Precondition: Test that the browser does not have client hints preferences cached");
|
||||
|
||||
async_test(t => {
|
||||
window.addEventListener('message', t.step_func(function(e) {
|
||||
if(!e.source.location.pathname.includes("do_not_expect_client_hints_headers.html")) {
|
||||
return;
|
||||
}
|
||||
if(typeof e.data != "string")
|
||||
return;
|
||||
assert_equals(e.data, "PASS");
|
||||
t.done();
|
||||
}));
|
||||
}, "Loading of resources/do_not_expect_client_hints_headers.html did not finish.");
|
||||
|
||||
function acceptChLifetimeLoaded() {
|
||||
var verify_win = window.open("resources/do_not_expect_client_hints_headers.html");
|
||||
assert_not_equals(verify_win, null, "Popup windows not allowed?");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<!-- Fetching this webpage should NOT cause user-agent to persist client hint
|
||||
preferences for the origin.-->
|
||||
<iframe onload="acceptChLifetimeLoaded()" src="https://{{hosts[][www]}}:{{ports[https][0]}}/client-hints/resources/http_equiv_accept_ch_lifetime.html"></iframe>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,70 +0,0 @@
|
|||
<html>
|
||||
<title>Accept-CH-Lifetime test with same-origin iframe</title>
|
||||
<meta name="timeout" content="long">
|
||||
<body>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<!--
|
||||
Apart from this webpage, the test opens another html web page. One test is run
|
||||
in this web page, and another in the second web page.
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
// This test fetches resources/http_equiv_accept_ch_lifetime.html in a same
|
||||
// origin iframe. The response to that webpage contains Accept-CH and
|
||||
// Accept-CH-Lifetime http-equiv headers.
|
||||
|
||||
// Fetching that webpage should cause the user-agent to persist origin
|
||||
// preferences for the client hints specified in Accept-CH header for a
|
||||
// duration specified in the Accept-CH-Lifetime header.
|
||||
|
||||
// Next, to verify if the origin preferences were persisted by the user
|
||||
// agent, this test fetches resources/expect_client_hints_headers.html
|
||||
// in a new window. Fetching of resources/expect_client_hints_headers.html
|
||||
// verifies that the user agent actually sends the client hints in the request
|
||||
// headers.
|
||||
|
||||
// Test is marked as tentative until https://github.com/whatwg/fetch/issues/726
|
||||
// is resolved.
|
||||
|
||||
// First, verify the initial state to make sure that the browser does not have
|
||||
// client hints preferences cached from a previous run of the test.
|
||||
promise_test(t => {
|
||||
return fetch("echo_client_hints_received.py").then(r => {
|
||||
assert_equals(r.status, 200)
|
||||
// Verify that the browser did not include client hints in the request
|
||||
// headers when fetching echo_client_hints_received.py.
|
||||
assert_false(r.headers.has("device-memory-received"), "device-memory-received");
|
||||
});
|
||||
}, "Precondition: Test that the browser does not have client hints preferences cached");
|
||||
|
||||
var acceptChLifetimeLoaded;
|
||||
|
||||
async_test(t => {
|
||||
acceptChLifetimeLoaded = t.step_func(() => {
|
||||
// Open a new window. Verify that the user agent attaches the client hints.
|
||||
var verify_win = window.open("resources/expect_client_hints_headers.html");
|
||||
assert_not_equals(verify_win, null, "Popup windows not allowed?");
|
||||
});
|
||||
|
||||
window.addEventListener('message', t.step_func((e) => {
|
||||
if(!e.source.location.pathname.includes("expect_client_hints_headers.html")) {
|
||||
return;
|
||||
}
|
||||
if(typeof e.data != "string")
|
||||
return;
|
||||
assert_equals(e.data, "PASS");
|
||||
t.done();
|
||||
}));
|
||||
}, "Loading of resources/expect_client_hints_headers.html did not finish.");
|
||||
|
||||
</script>
|
||||
|
||||
<!-- Fetching this webpage should cause user-agent to persist client hint
|
||||
preferences for the origin.-->
|
||||
<iframe onload="acceptChLifetimeLoaded()" src="resources/http_equiv_accept_ch_lifetime.html"></iframe>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,75 +0,0 @@
|
|||
<html>
|
||||
<title>Accept-CH-Lifetime test with subresource</title>
|
||||
<meta name="timeout" content="long">
|
||||
<body>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<!--
|
||||
Apart from this webpage, the test opens another html web page. One test is run
|
||||
in this web page, and another in the second web page.
|
||||
-->
|
||||
|
||||
<script>
|
||||
|
||||
// This test fetches resources/http_equiv_accept_ch_lifetime.html as a
|
||||
// subresource. The response to that webpage contains Accept-CH and
|
||||
// Accept-CH-Lifetime http-equiv headers.
|
||||
|
||||
// Fetching that webpage as a subresource should NOT cause the user-agent to
|
||||
// persist origin preferences for the client hints specified in Accept-CH
|
||||
// header.
|
||||
|
||||
// Next, to verify if the origin preferences were not persisted by the user
|
||||
// agent, this test fetches resources/do_not_expect_client_hints_headers.html
|
||||
// in a new window. Fetching of
|
||||
// resources/do_not_expect_client_hints_headers.html verifies that the user
|
||||
// agent does not send the client hints in the request headers.
|
||||
|
||||
// Test is marked as tentative until https://github.com/whatwg/fetch/issues/726
|
||||
// is resolved.
|
||||
|
||||
// First, verify the initial state to make sure that the browser does not have
|
||||
// client hints preferences cached from a previous run of the test.
|
||||
promise_test(t => {
|
||||
return fetch("echo_client_hints_received.py").then(r => {
|
||||
assert_equals(r.status, 200)
|
||||
// Verify that the browser did not include client hints in the request
|
||||
// headers when fetching echo_client_hints_received.py.
|
||||
assert_false(r.headers.has("device-memory-received"), "device-memory-received");
|
||||
});
|
||||
}, "Precondition: Test that the browser does not have client hints preferences cached");
|
||||
|
||||
promise_test(t => {
|
||||
// Fetching this web page as a subresource should NOT cause user-agent to
|
||||
// persist client hint preferences for the origin.
|
||||
return fetch("resources/http_equiv_accept_ch_lifetime.html").then(r => {
|
||||
assert_equals(r.status, 200)
|
||||
// Verify that the browser did not include client hints in the request
|
||||
// headers.
|
||||
assert_false(r.headers.has("device-memory-received"), "device-memory-received");
|
||||
|
||||
// Open a new window. Verify that the user agent does not attach the client
|
||||
// hints.
|
||||
var win = window.open("resources/do_not_expect_client_hints_headers.html");
|
||||
assert_not_equals(win, null, "Popup windows not allowed?");
|
||||
|
||||
});
|
||||
}, "Test receiving Accept-CH-Lifetime header");
|
||||
|
||||
async_test(t => {
|
||||
window.addEventListener('message', t.step_func(function(e) {
|
||||
if(!e.source.location.pathname.includes("do_not_expect_client_hints_headers.html")) {
|
||||
return;
|
||||
}
|
||||
if(typeof e.data != "string")
|
||||
return;
|
||||
assert_equals(e.data, "PASS");
|
||||
t.done();
|
||||
}));
|
||||
}, "Loading of resources/do_not_expect_client_hints_headers.html did not finish.");
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,73 @@
|
|||
const echo = "/client-hints/echo_client_hints_received.py";
|
||||
const accept = "/client-hints/resources/accept_ch_lifetime.html";
|
||||
const httpequiv_accept = "/client-hints/resources/http_equiv_accept_ch_lifetime.html";
|
||||
const expect = "/client-hints/resources/expect_client_hints_headers.html"
|
||||
const do_not_expect = "/client-hints/resources/do_not_expect_client_hints_headers.html"
|
||||
|
||||
const host_info = get_host_info();
|
||||
const run_test = test => {
|
||||
// Test is marked as tentative until https://github.com/whatwg/fetch/issues/726
|
||||
// is resolved.
|
||||
|
||||
// First, verify the initial state to make sure that the browser does not have
|
||||
// client hints preferences cached from a previous run of the test.
|
||||
promise_test(t => {
|
||||
return fetch(test.initial_url).then(r => {
|
||||
assert_equals(r.status, 200)
|
||||
// Verify that the browser did not include client hints in the request
|
||||
// headers when fetching echo_client_hints_received.py.
|
||||
assert_false(r.headers.has("device-memory-received"),
|
||||
"device-memory-received");
|
||||
});
|
||||
}, test.name + " precondition: Test that the browser does not have client " +
|
||||
"hints preferences cached");
|
||||
|
||||
// Then, attempt to set Accept-CH-Lifetime for 1 second
|
||||
promise_test(t => {
|
||||
return new Promise(resolve => {
|
||||
if (test.type == "navigation") {
|
||||
const win = window.open(test.accept_url);
|
||||
assert_not_equals(win, null, "Popup windows not allowed?");
|
||||
addEventListener('message', t.step_func(() => {
|
||||
win.close();
|
||||
resolve();
|
||||
}), false);
|
||||
} else if (test.type == "iframe") {
|
||||
const iframe = document.createElement("iframe");
|
||||
iframe.addEventListener('load', t.step_func(() => {
|
||||
resolve();
|
||||
}), false);
|
||||
iframe.src = test.accept_url;
|
||||
document.body.appendChild(iframe);
|
||||
} else if (test.type == "subresource") {
|
||||
fetch(test.accept_url).then(r => {
|
||||
assert_equals(r.status, 200, "subresource response status")
|
||||
// Verify that the browser did not include client hints in the request
|
||||
// headers, just because we can..
|
||||
assert_false(r.headers.has("device-memory-received"),
|
||||
"device-memory-received",
|
||||
"subresource request had no client hints");
|
||||
resolve();
|
||||
});
|
||||
} else {
|
||||
assert_unreached("unknown test type");
|
||||
}
|
||||
});
|
||||
}, test.name + " set Accept-CH-Lifetime");
|
||||
|
||||
// Finally, verify that CH are actually sent (or not) on requests
|
||||
promise_test(t => {
|
||||
return new Promise(resolve => {
|
||||
let win;
|
||||
window.addEventListener('message', t.step_func(function(e) {
|
||||
win.close();
|
||||
assert_equals(e.data, "PASS", "message from opened page");
|
||||
fetch("/client-hints/resources/clear-site-data.html").then(resolve);
|
||||
}));
|
||||
// Open a new window. Verify that the user agent attaches client hints.
|
||||
win = window.open(test.expect_url);
|
||||
assert_not_equals(win, null, "Popup windows not allowed?");
|
||||
});
|
||||
}, test.name + " got client hints according to expectations.");
|
||||
};
|
||||
|
|
@ -6,6 +6,10 @@ and Accept-CH-Lifetime header. Fetching this webpage should cause
|
|||
user-agent to persist origin preferences for the client hints
|
||||
specified in the Accept-CH header for a duration specified in
|
||||
the Accept-CH-Lifetime header.-->
|
||||
<script>
|
||||
window.top.opener.postMessage('Loaded', '*');
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
Accept-CH: device-memory
|
||||
Accept-CH-Lifetime: 5
|
||||
Accept-CH-Lifetime: 1
|
||||
Access-Control-Allow-Origin: *
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Clear-Site-Data: "*"
|
|
@ -2,5 +2,8 @@
|
|||
<meta http-equiv="Accept-CH" content="device-memory">
|
||||
<meta http-equiv="Accept-CH-Lifetime" content="5">
|
||||
<body>
|
||||
<script>
|
||||
window.top.opener.postMessage('Loaded', '*');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Access-Control-Allow-Origin: *
|
||||
|
|
@ -12,7 +12,7 @@ function get_host_info() {
|
|||
var ORIGINAL_HOST = '{{host}}';
|
||||
var REMOTE_HOST = (ORIGINAL_HOST === 'localhost') ? '127.0.0.1' : ('www1.' + ORIGINAL_HOST);
|
||||
var OTHER_HOST = '{{domains[www2]}}';
|
||||
var NOTSAMESITE_HOST = (ORIGINAL_HOST === 'localhost') ? '127.0.0.1' : ('not-' + ORIGINAL_HOST);
|
||||
var NOTSAMESITE_HOST = (ORIGINAL_HOST === 'localhost') ? '127.0.0.1' : ('{{hosts[alt][]}}');
|
||||
|
||||
return {
|
||||
HTTP_PORT: HTTP_PORT,
|
||||
|
|
39
tests/wpt/web-platform-tests/cookies/navigated-away.html
Normal file
39
tests/wpt/web-platform-tests/cookies/navigated-away.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="if" src="about:blank"></iframe>
|
||||
<script>
|
||||
var t = async_test("document.cookie behavior on documents without browser context");
|
||||
t.add_cleanup(function() {
|
||||
document.cookie = "nav_away_test=yes;max-age=0";
|
||||
});
|
||||
|
||||
function step2() {
|
||||
t.step(function() {
|
||||
// Get from saved doc should fail.
|
||||
assert_equals(window.iframeDoc.cookie, "");
|
||||
|
||||
// Try set from saved doc, should do nothing.
|
||||
window.iframeDoc.cookie = "nav_away_test=second";
|
||||
assert_equals(window.iframeDoc.cookie, "");
|
||||
assert_not_equals(document.cookie.indexOf("nav_away_test=yes"), -1);
|
||||
});
|
||||
t.done();
|
||||
}
|
||||
|
||||
t.step(function() {
|
||||
document.cookie = "nav_away_test=yes";
|
||||
var iframe = document.getElementById("if");
|
||||
// Save original document.
|
||||
window.iframeDoc = iframe.contentDocument;
|
||||
assert_not_equals(window.iframeDoc.cookie.indexOf("nav_away_test=yes"), -1);
|
||||
|
||||
// Navigate away.
|
||||
iframe.onload = step2;
|
||||
iframe.contentWindow.location = "/common/blank.html";
|
||||
})
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS Floats — reference</title>
|
||||
<link rel=author title="Jonathan Kew" href="jkew@mozilla.com">
|
||||
<style>
|
||||
p { width: 10em; border: solid aqua; }
|
||||
span { float: left; width: 5em; height: 5em; border: solid blue; }
|
||||
</style>
|
||||
|
||||
<div>Test passes if all three examples render the same:</div>
|
||||
|
||||
<p><span></span><br>Supercalifragilisticexpialidocious</p>
|
||||
|
||||
<br style="clear:both">
|
||||
|
||||
<p><span></span><br>Supercalifragilisticexpialidocious</p>
|
||||
|
||||
<br style="clear:both">
|
||||
|
||||
<p><span></span><br>Supercalifragilisticexpialidocious</p>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS Floats — narrow containing block</title>
|
||||
<meta name=assert content="If a shortened line box is too small to contain any content, then the line box is shifted downward">
|
||||
<link rel=help href="https://www.w3.org/TR/CSS2/visuren.html#floats">
|
||||
<link rel=match href="float-no-content-beside-001-ref.html">
|
||||
<link rel=author title="Jonathan Kew" href="jkew@mozilla.com">
|
||||
<style>
|
||||
p { width: 10em; border: solid aqua; }
|
||||
span { float: left; width: 5em; height: 5em; border: solid blue; }
|
||||
</style>
|
||||
|
||||
<div>Test passes if all three examples render the same:</div>
|
||||
|
||||
<p><span></span>Supercalifragilisticexpialidocious</p>
|
||||
|
||||
<br style="clear:both">
|
||||
|
||||
<p><span></span> Supercalifragilisticexpialidocious</p>
|
||||
|
||||
<br style="clear:both">
|
||||
|
||||
<p><span></span><br>Supercalifragilisticexpialidocious</p>
|
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Box Alignment Level 3: getComputedStyle().placeContent</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-place-content">
|
||||
<meta name="assert" content="place-content computed value is as specified.">
|
||||
<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("place-content", "normal normal", "normal");
|
||||
|
||||
test_computed_value("place-content", "first baseline", "baseline start");
|
||||
test_computed_value("place-content", "baseline", "baseline start");
|
||||
test_computed_value("place-content", "first baseline start", "baseline start");
|
||||
test_computed_value("place-content", "last baseline", "last baseline start");
|
||||
test_computed_value("place-content", "first baseline stretch", "baseline stretch");
|
||||
test_computed_value("place-content", "last baseline flex-start");
|
||||
|
||||
test_computed_value("place-content", "baseline stretch");
|
||||
|
||||
test_computed_value("place-content", "space-between");
|
||||
test_computed_value("place-content", "space-around");
|
||||
test_computed_value("place-content", "space-evenly");
|
||||
test_computed_value("place-content", "stretch");
|
||||
|
||||
test_computed_value("place-content", "center");
|
||||
test_computed_value("place-content", "end");
|
||||
test_computed_value("place-content", "flex-start flex-start", "flex-start");
|
||||
test_computed_value("place-content", "unsafe end unsafe end", "unsafe end");
|
||||
test_computed_value("place-content", "safe flex-start");
|
||||
|
||||
test_computed_value("place-content", "normal stretch");
|
||||
test_computed_value("place-content", "baseline space-around");
|
||||
test_computed_value("place-content", "space-evenly unsafe end");
|
||||
test_computed_value("place-content", "center normal");
|
||||
|
||||
test_computed_value("place-content", "normal right");
|
||||
test_computed_value("place-content", "baseline unsafe left");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,52 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Box Alignment Level 3: getComputedStyle().placeItems</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-place-items">
|
||||
<meta name="assert" content="place-items computed value is as specified.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<style>
|
||||
#grandparent {
|
||||
justify-items: legacy center;
|
||||
}
|
||||
#parent {
|
||||
justify-items: legacy;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="grandparent">
|
||||
<div id="parent">
|
||||
<div id="target"></div>
|
||||
</div>
|
||||
<script>
|
||||
test_computed_value("place-items", "normal");
|
||||
test_computed_value("place-items", "stretch stretch", "stretch");
|
||||
|
||||
test_computed_value("place-items", "first baseline", "baseline");
|
||||
test_computed_value("place-items", "last baseline last baseline", "last baseline");
|
||||
|
||||
test_computed_value("place-items", "center");
|
||||
test_computed_value("place-items", "end end", "end");
|
||||
test_computed_value("place-items", "self-start");
|
||||
test_computed_value("place-items", "flex-end");
|
||||
test_computed_value("place-items", "unsafe center unsafe center", "unsafe center");
|
||||
test_computed_value("place-items", "safe self-end");
|
||||
|
||||
test_computed_value("place-items", "stretch baseline");
|
||||
test_computed_value("place-items", "last baseline center");
|
||||
test_computed_value("place-items", "safe self-end normal");
|
||||
|
||||
test_computed_value("place-items", "normal right");
|
||||
test_computed_value("place-items", "baseline unsafe left");
|
||||
|
||||
// When specified justify-items is legacy, computed value depends on inherited value.
|
||||
test_computed_value("place-items", "flex-end legacy", "flex-end legacy center");
|
||||
test_computed_value("place-items", "stretch legacy left");
|
||||
test_computed_value("place-items", "first baseline right legacy", "baseline legacy right");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Box Alignment Level 3: getComputedStyle().placeSelf</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-place-self">
|
||||
<meta name="assert" content="place-self computed value is as specified.">
|
||||
<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("place-self", "auto auto", "auto");
|
||||
test_computed_value("place-self", "normal");
|
||||
test_computed_value("place-self", "stretch");
|
||||
|
||||
test_computed_value("place-self", "first baseline", "baseline");
|
||||
test_computed_value("place-self", "last baseline last baseline", "last baseline");
|
||||
|
||||
test_computed_value("place-self", "center center", "center");
|
||||
test_computed_value("place-self", "start");
|
||||
test_computed_value("place-self", "self-start");
|
||||
test_computed_value("place-self", "flex-end");
|
||||
test_computed_value("place-self", "unsafe center");
|
||||
test_computed_value("place-self", "safe self-end safe self-end", "safe self-end");
|
||||
|
||||
test_computed_value("place-self", "auto last baseline");
|
||||
test_computed_value("place-self", "baseline flex-end");
|
||||
test_computed_value("place-self", "unsafe center stretch");
|
||||
|
||||
test_computed_value("place-self", "normal right");
|
||||
test_computed_value("place-self", "baseline unsafe left");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -36,6 +36,8 @@ function checkPlaceShorhand(shorthand, shorthandValue, alignValue, justifyValue)
|
|||
|
||||
var resolvedValue = getComputedStyle(div).getPropertyValue(shorthand);
|
||||
var expectedResolvedValue = (alignValue + " " + justifyValue).trim();
|
||||
if (alignValue === justifyValue)
|
||||
expectedResolvedValue = alignValue;
|
||||
|
||||
assert_equals(div.style[shorthand], specifiedValue, shorthandValue + " specified value");
|
||||
// FIXME: We need https://github.com/w3c/csswg-drafts/issues/1041 to clarify which
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<!doctype html>
|
||||
<title>CSS test reference</title>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<style>
|
||||
.test {
|
||||
display: flex;
|
||||
}
|
||||
.test::before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: green;
|
||||
}
|
||||
</style>
|
||||
<div class="test"></div>
|
|
@ -0,0 +1,37 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>Animation of pseudo-element is stopped properly in presence of dynamic DOM change that reconstructs the layout tree</title>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="author" title="Mozilla" href="https://mozilla.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-animations/">
|
||||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1564366">
|
||||
<link rel="match" href="animation-pseudo-dynamic-001-ref.html">
|
||||
<style>
|
||||
@keyframes anim {
|
||||
from { background-color: red }
|
||||
to { background-color: red }
|
||||
}
|
||||
.test {
|
||||
display: flex;
|
||||
}
|
||||
.test::before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: green;
|
||||
}
|
||||
.tweak::before {
|
||||
animation: anim 2s linear infinite;
|
||||
}
|
||||
</style>
|
||||
<div class="test tweak">foo</div>
|
||||
<script>
|
||||
onload = function() {
|
||||
const div = document.querySelector(".test");
|
||||
const pseudoStyle = getComputedStyle(div, "::before");
|
||||
div.getBoundingClientRect(); // update layout
|
||||
div.classList.remove("tweak");
|
||||
div.innerHTML = ""; // This is necessary to trigger the bug.
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,98 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Display: getComputedStyle().display</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#display-prop">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-display/#the-display-properties">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-containers">
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo">
|
||||
<meta name="assert" content="position and float can change display computed value.">
|
||||
<meta name="assert" content="display computed value is otherwise as specified.">
|
||||
<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>
|
||||
'use strict';
|
||||
|
||||
// https://drafts.csswg.org/css-grid-1/#grid-containers
|
||||
test_computed_value("display", "grid");
|
||||
test_computed_value("display", "inline-grid");
|
||||
|
||||
// https://drafts.csswg.org/css2/visuren.html#display-prop
|
||||
test_computed_value("display", "inline");
|
||||
test_computed_value("display", "block");
|
||||
test_computed_value("display", "list-item");
|
||||
test_computed_value("display", "inline-block");
|
||||
test_computed_value("display", "table");
|
||||
test_computed_value("display", "inline-table");
|
||||
test_computed_value("display", "table-row-group");
|
||||
test_computed_value("display", "table-header-group");
|
||||
test_computed_value("display", "table-footer-group");
|
||||
test_computed_value("display", "table-row");
|
||||
test_computed_value("display", "table-column-group");
|
||||
test_computed_value("display", "table-column");
|
||||
test_computed_value("display", "table-cell");
|
||||
test_computed_value("display", "table-caption");
|
||||
test_computed_value("display", "none");
|
||||
|
||||
// https://drafts.csswg.org/css-flexbox-1/#flex-containers
|
||||
test_computed_value("display", "flex");
|
||||
test_computed_value("display", "inline-flex");
|
||||
|
||||
test_computed_value("display", "contents");
|
||||
|
||||
// https://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo
|
||||
function test_display_affected(property, value) {
|
||||
const target = document.getElementById('target');
|
||||
test(() => {
|
||||
target.style[property] = value;
|
||||
target.style.display = 'inline-table';
|
||||
assert_equals(getComputedStyle(target).display, 'table', 'inline-table -> block');
|
||||
|
||||
const displayValues = [
|
||||
'inline',
|
||||
'table-row-group',
|
||||
'table-column',
|
||||
'table-column-group',
|
||||
'table-header-group',
|
||||
'table-footer-group',
|
||||
'table-row',
|
||||
'table-cell',
|
||||
'table-caption',
|
||||
'inline-block'
|
||||
];
|
||||
|
||||
for (let displayValue of displayValues) {
|
||||
target.style.display = displayValue;
|
||||
assert_equals(getComputedStyle(target).display, 'block', displayValue + ' -> block');
|
||||
}
|
||||
|
||||
target.style.display = 'inline-flex';
|
||||
assert_equals(getComputedStyle(target).display, 'flex', 'inline-flex -> flex');
|
||||
|
||||
target.style.display = 'inline-grid';
|
||||
assert_equals(getComputedStyle(target).display, 'grid', 'inline-grid -> grid');
|
||||
|
||||
// Other values are not affected.
|
||||
target.style.display = 'list-item';
|
||||
assert_equals(getComputedStyle(target).display, 'list-item', 'list-item -> list-item');
|
||||
|
||||
target.style.display = 'contents';
|
||||
assert_equals(getComputedStyle(target).display, 'contents', 'contents -> contents');
|
||||
|
||||
target.style[property] = '';
|
||||
target.style.display = '';
|
||||
}, property + ' ' + value + ' affects computed display');
|
||||
}
|
||||
|
||||
test_display_affected("position", "absolute");
|
||||
test_display_affected("position", "fixed");
|
||||
test_display_affected("float", "left");
|
||||
test_display_affected("float", "right");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Flexbox: min-height: auto with flex items containing percentage-sized children</title>
|
||||
<link rel="author" title="Google LLC" href="https://www.google.com/" />
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#min-size-auto" />
|
||||
<link rel="issue" href="https://bugs.chromium.org/p/chromium/issues/detail?id=981481" />
|
||||
<link rel="issue" href="https://bugs.chromium.org/p/chromium/issues/detail?id=984606" />
|
||||
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
|
||||
|
||||
<style>
|
||||
.flexbox {
|
||||
display: flex;
|
||||
width: 100px;
|
||||
flex-direction: column;
|
||||
}
|
||||
.item {
|
||||
flex-basis: 0;
|
||||
background: green;
|
||||
}
|
||||
.percentage {
|
||||
height: 100%;
|
||||
}
|
||||
.fixed {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||
|
||||
<div class="flexbox">
|
||||
<div class="item">
|
||||
<div class="percentage"></div>
|
||||
<div class="fixed"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Masking Module Level 1: getComputedStyle().clip</title>
|
||||
<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#clip-property">
|
||||
<meta name="assert" content="clip computed value is as specified, with lengths made absolute.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("clip", "auto");
|
||||
test_computed_value("clip", "rect(10px, 20px, -30px, 40px)");
|
||||
test_computed_value("clip", "rect(10px, 20px, calc(-1em + 10px), 1em)", "rect(10px, 20px, -30px, 40px)");
|
||||
test_computed_value("clip", "rect(10px, -20px, auto, auto)");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -3,7 +3,6 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Masking Module Level 1: parsing clip with invalid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#clip-property">
|
||||
<meta name="assert" content="clip supports only the grammar 'rect() | auto'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
|
@ -15,6 +14,7 @@
|
|||
test_invalid_value("clip", "none");
|
||||
test_invalid_value("clip", "rect(10px, 20px, 30px)");
|
||||
test_invalid_value("clip", "rect(10%, -20%, auto, auto)");
|
||||
test_invalid_value("clip", "rect(10px 20px, 30px 40px)");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Masking Module Level 1: getComputedStyle().clipRule</title>
|
||||
<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#the-clip-rule">
|
||||
<meta name="assert" content="clip-rule computed value is as specified.">
|
||||
<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("clip-rule", "nonzero");
|
||||
test_computed_value("clip-rule", "evenodd");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -13,8 +13,8 @@
|
|||
<body>
|
||||
<script>
|
||||
test_valid_value("clip", "auto");
|
||||
test_valid_value("clip", "rect(10px, 20px, -30px, 40px)", ["rect(10px, 20px, -30px, 40px)", "rect(10px 20px -30px 40px)"]);
|
||||
test_valid_value("clip", "rect(10px, -20px, auto, auto)", ["rect(10px, -20px, auto, auto)", "rect(10px -20px auto auto)"]);
|
||||
test_valid_value("clip", "rect(10px, 20px, -30px, 40px)");
|
||||
test_valid_value("clip", "rect(10px, -20px, auto, auto)");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Masking Module Level 1: getComputedStyle().maskType</title>
|
||||
<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#the-mask-type">
|
||||
<meta name="assert" content="mask-type computed value is as specified.">
|
||||
<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("mask-type", "luminance");
|
||||
test_computed_value("mask-type", "alpha");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Masking Module Level 1: parsing mask-type with invalid values</title>
|
||||
<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#the-mask-type">
|
||||
<meta name="assert" content="mask-type supports only the grammar 'luminance | alpha'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value("mask-type", "auto");
|
||||
test_invalid_value("mask-type", "luminance alpha");
|
||||
test_invalid_value("mask-type", "alpha, luminance");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Masking Module Level 1: parsing mask-type with valid values</title>
|
||||
<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#the-mask-type">
|
||||
<meta name="assert" content="mask-type supports the full grammar 'luminance | alpha'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value("mask-type", "luminance");
|
||||
test_valid_value("mask-type", "alpha");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-typed-om-1/#stylevalue-subclasses">
|
||||
<meta name="assert" content="CSSUnitValue of different angle units can be added correctly.">
|
||||
<style>
|
||||
.ref {
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
transform: rotate(90deg);
|
||||
background-color: green;
|
||||
}
|
||||
</style>
|
||||
<p>Test passes if there is a filled green rectangle with <strong>no red</strong>.</p>
|
||||
<div class="ref"></div>
|
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-typed-om-1/#stylevalue-subclasses">
|
||||
<link rel="match" href="rotate-by-added-angle-ref.html">
|
||||
<meta name="assert" content="CSSUnitValue of different angle units can be added correctly.">
|
||||
<style>
|
||||
.common {
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
}
|
||||
.ref {
|
||||
transform: rotate(90deg);
|
||||
background-color: red;
|
||||
}
|
||||
.test {
|
||||
background-color: green;
|
||||
z-index: 1;
|
||||
}
|
||||
</style>
|
||||
<p>Test passes if there is a filled green rectangle with <strong>no red</strong>.</p>
|
||||
<div class="common ref"></div>
|
||||
<div class="common test"></div>
|
||||
<script>
|
||||
const angle = new CSSMathSum(CSS.deg(45), CSS.turn(0.125)); // 90 degrees
|
||||
const transform = new CSSTransformValue([new CSSRotate(angle)]);
|
||||
const target = document.querySelector('.test');
|
||||
target.attributeStyleMap.set('transform', transform);
|
||||
</script>
|
|
@ -1,22 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>backdrop-filter: Correctly apply masks/clips to backdrop-filter content</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
|
||||
|
||||
|
||||
<p>Expected: A black circle.</p>
|
||||
|
||||
<div></div>
|
||||
|
||||
<style>
|
||||
div {
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
left: 50px;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background: black;
|
||||
border-radius: 100px;
|
||||
}
|
||||
</style>
|
|
@ -1,22 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>backdrop-filter: Correctly apply masks/clips to backdrop-filter content</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="backdrop-filter-plus-mask-ref.html">
|
||||
|
||||
<p>Expected: A black circle.</p>
|
||||
|
||||
<div></div>
|
||||
|
||||
<style>
|
||||
div {
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
left: 50px;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
backdrop-filter: invert(1);
|
||||
clip-path: circle(100px at center);
|
||||
}
|
||||
</style>
|
|
@ -39,6 +39,8 @@ function drawRectWithAddPathTransform(ctx, transform) {
|
|||
return window.canvas.toDataURL();
|
||||
}
|
||||
|
||||
var emptyCanvasURL = window.canvas.toDataURL();
|
||||
|
||||
[
|
||||
{a: 1, m11: 2},
|
||||
{b: 0, m12: -1},
|
||||
|
@ -95,10 +97,10 @@ test(() => {
|
|||
[{c: 0, m21: -0}, matrix2D({m21: -0})],
|
||||
[{c: -0, m21: 0}, matrix2D({m21: 0})],
|
||||
[{c: -0, m21: -0}, matrix2D({m21: -0})],
|
||||
[{d: Infinity, m22: Infinity}, matrix2D({})], // should be silently ignored
|
||||
[{e: -Infinity, m41: -Infinity}, matrix2D({})], // should be silently ignored
|
||||
[{f: NaN, m42: NaN}, matrix2D({})], // should be silently ignored
|
||||
[{f: NaN, m42: NaN, is2D: true}, matrix2D({})], // should be silently ignored
|
||||
[{d: Infinity, m22: Infinity}, null], // setTransform: silently ignore / addPath: silently halt
|
||||
[{e: -Infinity, m41: -Infinity}, null], // setTransform: silently ignore / addPath: silently halt
|
||||
[{f: NaN, m42: NaN}, null], // setTransform: silently ignore / addPath: silently halt
|
||||
[{f: NaN, m42: NaN, is2D: true}, null], // setTransform: silently ignore / addPath: silently halt
|
||||
[{f: 0, m42: null}, matrix2D({m42: 0})], // null is converted to 0
|
||||
[{f: -0, m42: null}, matrix2D({m42: 0})], // null is converted to 0
|
||||
[{a: 2}, matrix2D({m11: 2})],
|
||||
|
@ -171,12 +173,14 @@ test(() => {
|
|||
ctx.resetTransform();
|
||||
ctx.setTransform(dict);
|
||||
const matrix = ctx.getTransform();
|
||||
checkMatrix(matrix, expected);
|
||||
checkMatrix(matrix, expected || matrix2D({}));
|
||||
}, `setTransform(${format_dict(dict)})`);
|
||||
|
||||
test(() => {
|
||||
var expectedResultURL = drawRectWithSetTransform(ctx, expected);
|
||||
var actualResultURL = drawRectWithAddPathTransform(ctx, expected);
|
||||
var expectedResultURL = expected ?
|
||||
drawRectWithSetTransform(ctx, expected) :
|
||||
emptyCanvasURL;
|
||||
var actualResultURL = drawRectWithAddPathTransform(ctx, dict);
|
||||
assert_equals(actualResultURL, expectedResultURL);
|
||||
}, `addPath(${format_dict(dict)})`);
|
||||
});
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
p2: { x: 2, y: 0, z: 0, w: 1 },
|
||||
p3: { x: 2, y: 0, z: 0, w: 1 },
|
||||
p4: { x: 2, y: 0, z: 0, w: 1 },
|
||||
bounds: { x: 0, y: 0, width: 0, height: 0 } },
|
||||
bounds: { x: 2, y: 0, width: 0, height: 0 } },
|
||||
'p1Top4Attributes1');
|
||||
|
||||
function checkDOMQuad(createQuad, exp, name) {
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
<!DOCTYPE html>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Reftest Reference</title>
|
||||
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
|
||||
<style>
|
||||
div {
|
||||
margin: 1px;
|
||||
background: lime;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.square {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
.bigWide {
|
||||
width: 48px;
|
||||
height: 32px;
|
||||
}
|
||||
.bigTall {
|
||||
width: 32px;
|
||||
height: 48px;
|
||||
}
|
||||
.small {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
br { clear: both; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Note: the specified heights here are just 1/2 the widths. -->
|
||||
<div class="square"></div>
|
||||
<div class="square" style="height: 12px"></div>
|
||||
<br>
|
||||
<div class="bigWide"></div>
|
||||
<div class="bigWide" style="height: 24px"></div>
|
||||
<br>
|
||||
<div class="bigTall"></div>
|
||||
<div class="bigTall" style="height: 16px"></div>
|
||||
<br>
|
||||
<div class="small"></div>
|
||||
<div class="small" style="height: 4px"></div>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,71 @@
|
|||
<!DOCTYPE html>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Test: 'object-fit: contain' and 'cover' on object element whose aspect ratio dynamically changes</title>
|
||||
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
|
||||
<link rel="help" href="http://www.w3.org/TR/css3-images/#sizing">
|
||||
<link rel="help" href="http://www.w3.org/TR/css3-images/#the-object-fit">
|
||||
<link rel="match" href="object-fit-dyn-aspect-ratio-001-ref.html">
|
||||
<style>
|
||||
object {
|
||||
margin: 1px;
|
||||
float: left;
|
||||
/* I'm just using 'object-position' for cosmetic reasons, so that the
|
||||
painted areas are all snapped to top-left which makes reference case
|
||||
more trivial. */
|
||||
object-position: top left;
|
||||
}
|
||||
.cov { object-fit: cover; }
|
||||
.con { object-fit: contain; }
|
||||
|
||||
.square {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
.bigWide {
|
||||
width: 48px;
|
||||
height: 32px;
|
||||
}
|
||||
.bigTall {
|
||||
width: 32px;
|
||||
height: 48px;
|
||||
}
|
||||
.small {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
br { clear: both; }
|
||||
|
||||
</style>
|
||||
<script>
|
||||
function go() {
|
||||
for (let elem of document.getElementsByTagName("object")) {
|
||||
var doc = elem.contentDocument;
|
||||
/* These should all should select out a piece of the
|
||||
bottom-right quadrant (the lime chunk): */
|
||||
doc.documentElement.setAttribute("viewBox", "8 4 8 4");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="go()">
|
||||
<object data="support/colors-16x8-parDefault.svg" class="square cov"></object>
|
||||
<object data="support/colors-16x8-parDefault.svg" class="square con"></object>
|
||||
<br>
|
||||
<object data="support/colors-16x8-parDefault.svg" class="bigWide cov"></object>
|
||||
<object data="support/colors-16x8-parDefault.svg" class="bigWide con"></object>
|
||||
<br>
|
||||
<object data="support/colors-16x8-parDefault.svg" class="bigTall cov"></object>
|
||||
<object data="support/colors-16x8-parDefault.svg" class="bigTall con"></object>
|
||||
<br>
|
||||
<object data="support/colors-16x8-parDefault.svg" class="small cov"></object>
|
||||
<object data="support/colors-16x8-parDefault.svg" class="small con"></object>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,58 @@
|
|||
<!DOCTYPE html>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Reftest Reference</title>
|
||||
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
|
||||
<style>
|
||||
div {
|
||||
margin: 1px;
|
||||
background: lime;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.square {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
.bigWide {
|
||||
width: 48px;
|
||||
height: 32px;
|
||||
}
|
||||
.bigTall {
|
||||
width: 32px;
|
||||
height: 48px;
|
||||
}
|
||||
.small {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
br { clear: both; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Note: each inline-style specified width here is just using the final
|
||||
viewBox aspect-ratio (1/2) times the element's specified height. This
|
||||
is how wide the concrete object size[1] should end up, for the
|
||||
testcase's "object-fit:contain" elements.
|
||||
[1] https://drafts.csswg.org/css-images-3/#concrete-object-size -->
|
||||
<div class="square"></div>
|
||||
<div class="square" style="width: 12px"></div>
|
||||
<br>
|
||||
<div class="bigWide"></div>
|
||||
<div class="bigWide" style="width: 16px"></div>
|
||||
<br>
|
||||
<div class="bigTall"></div>
|
||||
<div class="bigTall" style="width: 24px"></div>
|
||||
<br>
|
||||
<div class="small"></div>
|
||||
<div class="small" style="width: 4px"></div>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,71 @@
|
|||
<!DOCTYPE html>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Test: 'object-fit: contain' and 'cover' on object element whose aspect ratio dynamically changes</title>
|
||||
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
|
||||
<link rel="help" href="http://www.w3.org/TR/css3-images/#sizing">
|
||||
<link rel="help" href="http://www.w3.org/TR/css3-images/#the-object-fit">
|
||||
<link rel="match" href="object-fit-dyn-aspect-ratio-002-ref.html">
|
||||
<style>
|
||||
object {
|
||||
margin: 1px;
|
||||
float: left;
|
||||
/* I'm just using 'object-position' for cosmetic reasons, so that the
|
||||
painted areas are all snapped to top-left which makes reference case
|
||||
more trivial. */
|
||||
object-position: top left;
|
||||
}
|
||||
.cov { object-fit: cover; }
|
||||
.con { object-fit: contain; }
|
||||
|
||||
.square {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
.bigWide {
|
||||
width: 48px;
|
||||
height: 32px;
|
||||
}
|
||||
.bigTall {
|
||||
width: 32px;
|
||||
height: 48px;
|
||||
}
|
||||
.small {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
br { clear: both; }
|
||||
|
||||
</style>
|
||||
<script>
|
||||
function go() {
|
||||
for (let elem of document.getElementsByTagName("object")) {
|
||||
var doc = elem.contentDocument;
|
||||
/* These should all should select out a piece of the
|
||||
bottom-right quadrant (the lime chunk): */
|
||||
doc.documentElement.setAttribute("viewBox", "4 8 4 8");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="go()">
|
||||
<object data="support/colors-8x16-parDefault.svg" class="square cov"></object>
|
||||
<object data="support/colors-8x16-parDefault.svg" class="square con"></object>
|
||||
<br>
|
||||
<object data="support/colors-8x16-parDefault.svg" class="bigWide cov"></object>
|
||||
<object data="support/colors-8x16-parDefault.svg" class="bigWide con"></object>
|
||||
<br>
|
||||
<object data="support/colors-8x16-parDefault.svg" class="bigTall cov"></object>
|
||||
<object data="support/colors-8x16-parDefault.svg" class="bigTall con"></object>
|
||||
<br>
|
||||
<object data="support/colors-8x16-parDefault.svg" class="small cov"></object>
|
||||
<object data="support/colors-8x16-parDefault.svg" class="small con"></object>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
|
@ -1,3 +1,7 @@
|
|||
# Tests for dynamic change to aspect ratio on element with 'object-fit' set
|
||||
== object-fit-dyn-aspect-ratio-001.html object-fit-dyn-aspect-ratio-001-ref.html
|
||||
== object-fit-dyn-aspect-ratio-002.html object-fit-dyn-aspect-ratio-002-ref.html
|
||||
|
||||
# Tests for 'object-fit' / 'object-position' with a PNG image
|
||||
== object-fit-fill-png-001c.html object-fit-fill-png-001-ref.html
|
||||
== object-fit-fill-png-001e.html object-fit-fill-png-001-ref.html
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=/fetch/sec-metadata/resources/helper.js></script>
|
||||
<script>
|
||||
// Site
|
||||
promise_test(t => {
|
||||
return fetch("https://{{hosts[][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/echo-as-json.py",
|
||||
{
|
||||
mode: "cors",
|
||||
headers: { 'x-test': 'testing' }
|
||||
})
|
||||
.then(r => r.json())
|
||||
.then(j => {
|
||||
assert_header_equals(j, {
|
||||
"dest": "empty",
|
||||
"site": "same-site",
|
||||
"user": "",
|
||||
"mode": "cors",
|
||||
});
|
||||
});
|
||||
}, "Same-site fetch with preflight");
|
||||
|
||||
promise_test(t => {
|
||||
return fetch("https://{{hosts[alt][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/echo-as-json.py",
|
||||
{
|
||||
mode: "cors",
|
||||
headers: { 'x-test': 'testing' }
|
||||
})
|
||||
.then(r => r.json())
|
||||
.then(j => {
|
||||
assert_header_equals(j, {
|
||||
"dest": "empty",
|
||||
"site": "cross-site",
|
||||
"user": "",
|
||||
"mode": "cors",
|
||||
});
|
||||
});
|
||||
}, "Cross-site fetch with preflight");
|
||||
</script>
|
|
@ -7,11 +7,21 @@ def main(request, response):
|
|||
if "origin" in request.headers:
|
||||
headers.append(("Access-Control-Allow-Origin", request.headers["origin"]))
|
||||
|
||||
body = ""
|
||||
|
||||
# If we're in a preflight, verify that `Sec-Fetch-Mode` is `cors`.
|
||||
if request.method == 'OPTIONS':
|
||||
if request.headers.get("sec-fetch-mode") != "cors":
|
||||
return (403, "Failed"), [], body
|
||||
|
||||
headers.append(("Access-Control-Allow-Methods", "*"))
|
||||
headers.append(("Access-Control-Allow-Headers", "*"))
|
||||
else:
|
||||
body = json.dumps({
|
||||
"dest": request.headers.get("sec-fetch-dest", ""),
|
||||
"mode": request.headers.get("sec-fetch-mode", ""),
|
||||
"site": request.headers.get("sec-fetch-site", ""),
|
||||
"user": request.headers.get("sec-fetch-user", ""),
|
||||
})
|
||||
|
||||
return headers, body
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml-stylesheet href="https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=xslt-same-origin" type="text/xsl" ?>
|
||||
<?xml-stylesheet href="https://{{hosts[][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=xslt-same-site" type="text/xsl" ?>
|
||||
<?xml-stylesheet href="https://{{hosts[alt][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=xslt-cross-site" type="text/xsl" ?>
|
||||
<?xml-stylesheet href="https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=xslt-same-origin{{GET[token]}}" type="text/xsl" ?>
|
||||
<?xml-stylesheet href="https://{{hosts[][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=xslt-same-site{{GET[token]}}" type="text/xsl" ?>
|
||||
<?xml-stylesheet href="https://{{hosts[alt][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=xslt-cross-site{{GET[token]}}" type="text/xsl" ?>
|
||||
|
||||
<!-- postMessage parent back when the resources are loaded -->
|
||||
<script xmlns="http://www.w3.org/1999/xhtml"><![CDATA[
|
||||
|
|
|
@ -4,30 +4,32 @@
|
|||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=/fetch/sec-metadata/resources/helper.js></script>
|
||||
<script src=/common/utils.js></script>
|
||||
<script>
|
||||
// Open a window with XML document which loads resources via <?xml-stylesheet/> tag
|
||||
let w = window.open("resources/xslt-test.sub.xml");
|
||||
let nonce = token();
|
||||
let w = window.open("resources/xslt-test.sub.xml?token=" + nonce);
|
||||
window.addEventListener('message', function(e) {
|
||||
if (e.source != w)
|
||||
return;
|
||||
|
||||
promise_test(t => {
|
||||
let expected = {"dest":"xslt", "site":"same-origin", "user":"", "mode": "same-origin"};
|
||||
return fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=xslt-same-origin")
|
||||
return fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=xslt-same-origin" + nonce)
|
||||
.then(response => response.text())
|
||||
.then(text => assert_header_equals(text, expected));
|
||||
}, "Same-Origin xslt");
|
||||
|
||||
promise_test(t => {
|
||||
let expected = {"dest":"xslt", "site":"same-site", "user":"", "mode": "no-cors"};
|
||||
return fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=xslt-same-site")
|
||||
return fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=xslt-same-site" + nonce)
|
||||
.then(response => response.text())
|
||||
.then(text => assert_header_equals(text, expected));
|
||||
}, "Same-site xslt");
|
||||
|
||||
promise_test(t => {
|
||||
let expected = {"dest":"xslt", "site":"cross-site", "user":"", "mode": "no-cors"};
|
||||
return fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=xslt-cross-site")
|
||||
return fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=xslt-cross-site" + nonce)
|
||||
.then(response => response.text())
|
||||
.then(text => assert_header_equals(text, expected));
|
||||
}, "Cross-site xslt");
|
||||
|
|
|
@ -175,11 +175,10 @@ function reportload() {
|
|||
}, 'pushState must not be able to use a DOM node as data');
|
||||
test(function () {
|
||||
try { a.b = c; } catch(errdata) {
|
||||
assert_throws( 'DATA_CLONE_ERR', function () {
|
||||
history.pushState({dummy:errdata},'');
|
||||
} );
|
||||
assert_equals(ReferenceError.prototype, Object.getPrototypeOf(history.state.dummy));
|
||||
}
|
||||
}, 'pushState must not be able to use an error object as data');
|
||||
}, 'pushState must be able to use an error object as data');
|
||||
test(function () {
|
||||
assert_throws( 'DATA_CLONE_ERR', function () {
|
||||
iframe.contentWindow.history.pushState(document,'');
|
||||
|
|
|
@ -156,11 +156,10 @@ function reportload() {
|
|||
}, 'replaceState must not be able to use a DOM node as data');
|
||||
test(function () {
|
||||
try { a.b = c; } catch(errdata) {
|
||||
assert_throws( 'DATA_CLONE_ERR', function () {
|
||||
history.replaceState({dummy:errdata},'');
|
||||
} );
|
||||
assert_equals(ReferenceError.prototype, Object.getPrototypeOf(history.state.dummy));
|
||||
}
|
||||
}, 'replaceState must not be able to use an error object as data');
|
||||
}, 'replaceState must be able to use an error object as data');
|
||||
test(function () {
|
||||
assert_throws( 'DATA_CLONE_ERR', function () {
|
||||
iframe.contentWindow.history.replaceState(document,'');
|
||||
|
|
|
@ -509,7 +509,7 @@
|
|||
});
|
||||
t.step(function() {
|
||||
const error = frames[0].URIError("some message");
|
||||
assert_equals(Object.getPrototypeOf(error), frames[0].prototype, "Checking prototype before cloning");
|
||||
assert_equals(Object.getPrototypeOf(error), frames[0].URIError.prototype, "Checking prototype before cloning");
|
||||
assert_equals(error.constructor, frames[0].URIError, "Checking constructor before cloning");
|
||||
assert_equals(error.name, "URIError", "Checking name before cloning");
|
||||
error.foo = "bar";
|
||||
|
|
|
@ -9,7 +9,13 @@
|
|||
async_test(function(t) {
|
||||
var video = document.querySelector("video");
|
||||
var track = document.querySelector("track");
|
||||
if (track.readyState != HTMLTrackElement.LOADED) {
|
||||
assert_not_equals(track.readyState, HTMLTrackElement.ERROR,
|
||||
"track failed to load resource.");
|
||||
track.onload = t.step_func(trackLoaded);
|
||||
} else {
|
||||
trackLoaded();
|
||||
}
|
||||
|
||||
var cueCount = 0;
|
||||
var textTrack;
|
||||
|
|
|
@ -128,7 +128,8 @@ function t(desc, func, expect) {
|
|||
if (expect == 'timeout') {
|
||||
setTimeout(this.step_func_done(), 1000);
|
||||
} else {
|
||||
img['on' + expect] = this.step_func_done(function() {});
|
||||
img['on' + expect] = this.step_func_done();
|
||||
setTimeout(this.unreached_func('update the image data didn\'t run'), 1000);
|
||||
}
|
||||
func.call(this, img);
|
||||
}, desc);
|
||||
|
|
|
@ -8,11 +8,9 @@ typedef (Int8Array or Int16Array or Int32Array or
|
|||
Float32Array or Float64Array or DataView) ArrayBufferView;
|
||||
|
||||
typedef (ArrayBufferView or ArrayBuffer) BufferSource;
|
||||
[
|
||||
Exposed=(Window,Worker),
|
||||
[Exposed=(Window,Worker),
|
||||
Constructor(optional DOMString message = "", optional DOMString name = "Error"),
|
||||
Serializable
|
||||
]
|
||||
Serializable]
|
||||
interface DOMException { // but see below note about ECMAScript binding
|
||||
readonly attribute DOMString name;
|
||||
readonly attribute DOMString message;
|
||||
|
|
|
@ -82,15 +82,11 @@ interface SpeechRecognitionResultList {
|
|||
interface SpeechRecognitionEvent : Event {
|
||||
readonly attribute unsigned long resultIndex;
|
||||
readonly attribute SpeechRecognitionResultList results;
|
||||
readonly attribute any interpretation;
|
||||
readonly attribute Document? emma;
|
||||
};
|
||||
|
||||
dictionary SpeechRecognitionEventInit : EventInit {
|
||||
unsigned long resultIndex = 0;
|
||||
required SpeechRecognitionResultList results;
|
||||
any interpretation = null;
|
||||
Document? emma = null;
|
||||
};
|
||||
|
||||
// The object representing a speech grammar
|
||||
|
|
|
@ -16,9 +16,9 @@ dictionary PerformanceMeasureOptions {
|
|||
};
|
||||
|
||||
partial interface Performance {
|
||||
PerformanceMark mark(DOMString markName, optional PerformanceMarkOptions markOptions);
|
||||
PerformanceMark mark(DOMString markName, optional PerformanceMarkOptions markOptions = {});
|
||||
void clearMarks(optional DOMString markName);
|
||||
PerformanceMeasure measure(DOMString measureName, optional (DOMString or PerformanceMeasureOptions) startOrMeasureOptions, optional DOMString endMark);
|
||||
PerformanceMeasure measure(DOMString measureName, optional (DOMString or PerformanceMeasureOptions) startOrMeasureOptions = {}, optional DOMString endMark);
|
||||
void clearMeasures(optional DOMString measureName);
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE HTML>
|
||||
<meta charset=utf-8>
|
||||
<title>Largest Contentful Paint: contracted image bounded by display size.</title>
|
||||
<style type="text/css">
|
||||
#image_id {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
async_test(function (t) {
|
||||
if (!window.LargestContentfulPaint) {
|
||||
assert_unreached("LargestContentfulPaint is not implemented");
|
||||
}
|
||||
let beforeRender = performance.now();
|
||||
const observer = new PerformanceObserver(
|
||||
t.step_func_done(function(entryList) {
|
||||
assert_equals(entryList.getEntries().length, 1);
|
||||
const entry = entryList.getEntries()[0];
|
||||
assert_equals(entry.entryType, 'largest-contentful-paint');
|
||||
assert_greater_than_equal(entry.renderTime, beforeRender,
|
||||
'The rendering timestamp should occur after script starts running.');
|
||||
assert_greater_than_equal(performance.now(), entry.renderTime,
|
||||
'The rendering timestamp should occur before the entry is dispatched to the observer.');
|
||||
assert_equals(entry.startTime, 0);
|
||||
assert_equals(entry.duration, 0);
|
||||
// black-rectangle.png is 100 x 50. It occupies 50 x 50 so size will be bounded by the displayed size.
|
||||
assert_equals(entry.size, 2500);
|
||||
assert_equals(entry.id, 'image_id');
|
||||
const pathname = window.location.origin + '/images/black-rectangle.png';
|
||||
assert_equals(entry.url, pathname);
|
||||
assert_equals(entry.element, document.getElementById('image_id'));
|
||||
})
|
||||
);
|
||||
observer.observe({type: 'largest-contentful-paint', buffered: true});
|
||||
}, 'Largest Contentful Paint: |size| attribute is bounded by display size.');
|
||||
</script>
|
||||
<img src='/images/black-rectangle.png' id='image_id'/>
|
||||
</body>
|
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE HTML>
|
||||
<meta charset=utf-8>
|
||||
<title>Largest Contentful Paint: expanded image bounded by intrinsic size.</title>
|
||||
<style type="text/css">
|
||||
#image_id {
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
async_test(function (t) {
|
||||
if (!window.LargestContentfulPaint) {
|
||||
assert_unreached("LargestContentfulPaint is not implemented");
|
||||
}
|
||||
let beforeRender = performance.now();
|
||||
const observer = new PerformanceObserver(
|
||||
t.step_func_done(function(entryList) {
|
||||
assert_equals(entryList.getEntries().length, 1);
|
||||
const entry = entryList.getEntries()[0];
|
||||
assert_equals(entry.entryType, 'largest-contentful-paint');
|
||||
assert_greater_than_equal(entry.renderTime, beforeRender,
|
||||
'The rendering timestamp should occur after script starts running.');
|
||||
assert_greater_than_equal(performance.now(), entry.renderTime,
|
||||
'The rendering timestamp should occur before the entry is dispatched to the observer.');
|
||||
assert_equals(entry.startTime, 0);
|
||||
assert_equals(entry.duration, 0);
|
||||
// black-rectangle.png is 100 x 50. It occupies 300 x 300 so size will be bounded by the intrinsic size.
|
||||
assert_equals(entry.size, 5000);
|
||||
assert_equals(entry.id, 'image_id');
|
||||
const pathname = window.location.origin + '/images/black-rectangle.png';
|
||||
assert_equals(entry.url, pathname);
|
||||
assert_equals(entry.element, document.getElementById('image_id'));
|
||||
})
|
||||
);
|
||||
observer.observe({type: 'largest-contentful-paint', buffered: true});
|
||||
}, 'Largest Contentful Paint: |size| attribute is bounded by intrinsic size.');
|
||||
</script>
|
||||
<img src='/images/black-rectangle.png' id='image_id'/>
|
||||
</body>
|
|
@ -1,40 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>fractions linethickness</title>
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: TestFont;
|
||||
src: url("/fonts/math/fraction-rulethickness10000.woff");
|
||||
}
|
||||
math {
|
||||
/* FractionRuleThickness = 10000 * 1 / 1000 = 10px; */
|
||||
font-family: "TestFont";
|
||||
font-size: 1px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>This test passes if you see fraction with a cyan denominator and
|
||||
a blue numerator as tall as its black bar.</p>
|
||||
<math>
|
||||
<mfrac linethickness="0px">
|
||||
<mspace width="20px" height="0px" style="background: blue"></mspace>
|
||||
<mspace width="20px" height="10px" style="background: cyan"></mspace>
|
||||
</mfrac>
|
||||
</math>
|
||||
<math>
|
||||
<mfrac linethickness="50px">
|
||||
<mspace width="20px" height="50px" style="background: blue"></mspace>
|
||||
<mspace width="20px" height="10px" style="background: cyan"></mspace>
|
||||
</mfrac>
|
||||
</math>
|
||||
<math style="font-size: 180px">
|
||||
<mfrac linethickness="0.3888888888888889em">
|
||||
<mspace width="20px" height="70px" style="background: blue"></mspace>
|
||||
<mspace width="20px" height="10px" style="background: cyan"></mspace>
|
||||
</mfrac>
|
||||
</math>
|
||||
</body>
|
||||
</html>
|
|
@ -4,38 +4,82 @@
|
|||
<meta charset="utf-8">
|
||||
<title>fractions linethickness</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#fractions-mfrac">
|
||||
<meta name="assert" content="Verifies fraction with negative, percent and named space linethickness values.">
|
||||
<link rel="match" href="frac-linethickness-002-ref.html">
|
||||
<meta name="assert" content="Verifies fraction with positive, negative, percent and named space linethickness values.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: TestFont;
|
||||
src: url("/fonts/math/fraction-rulethickness10000.woff");
|
||||
}
|
||||
math {
|
||||
/* FractionRuleThickness = 10000 * 1 / 1000 = 10px; */
|
||||
/* FractionRuleThickness = 10000 * 10 / 1000 = 100px; */
|
||||
font-family: "TestFont";
|
||||
font-size: 1px;
|
||||
font-size: 10px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function LineThickness(aId) {
|
||||
var mfrac = document.getElementById(aId);
|
||||
var numBox = mfrac.firstElementChild.getBoundingClientRect();
|
||||
var denumBox = mfrac.lastElementChild.getBoundingClientRect();
|
||||
return denumBox.top - numBox.bottom;
|
||||
}
|
||||
|
||||
setup({ explicit_done: true });
|
||||
window.addEventListener("load", function() {
|
||||
// Delay the check to workaround WebKit's bug https://webkit.org/b/174030.
|
||||
requestAnimationFrame(() => { document.fonts.ready.then(runTests); });
|
||||
});
|
||||
|
||||
function runTests() {
|
||||
var defaultRuleThickness = 100;
|
||||
var epsilon = 2;
|
||||
|
||||
test(function() {
|
||||
assert_approx_equals(LineThickness("positive"), 5.67 * 10, epsilon);
|
||||
}, "Positive");
|
||||
|
||||
test(function() {
|
||||
/* Negative values are treated as 0 */
|
||||
assert_approx_equals(LineThickness("negative"), 0, epsilon);
|
||||
}, "Negative");
|
||||
|
||||
test(function() {
|
||||
assert_approx_equals(LineThickness("percent"), defaultRuleThickness * 234 / 100, epsilon);
|
||||
}, "Percentage");
|
||||
|
||||
test(function() {
|
||||
/* Namedspace values are invalid in MathML Core. */
|
||||
assert_approx_equals(LineThickness("namedspace"), defaultRuleThickness, epsilon);
|
||||
}, "Named space");
|
||||
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p>This test passes if you see fraction with a cyan denominator and
|
||||
a blue numerator as tall as its black bar.</p>
|
||||
<math>
|
||||
<mfrac linethickness="-1.23em">
|
||||
<mspace width="20px" height="0px" style="background: blue"></mspace>
|
||||
<mfrac id="positive" linethickness="5.67em">
|
||||
<mspace width="20px" height="10px" style="background: blue"></mspace>
|
||||
<mspace width="20px" height="10px" style="background: cyan"></mspace>
|
||||
</mfrac>
|
||||
</math>
|
||||
<math>
|
||||
<mfrac linethickness="500%">
|
||||
<mspace width="20px" height="50px" style="background: blue"></mspace>
|
||||
<mfrac id="negative" linethickness="-1.23em">
|
||||
<mspace width="20px" height="10px" style="background: blue"></mspace>
|
||||
<mspace width="20px" height="10px" style="background: cyan"></mspace>
|
||||
</mfrac>
|
||||
</math>
|
||||
<math style="font-size: 180px">
|
||||
<mfrac linethickness="veryverythickmathspace">
|
||||
<mspace width="20px" height="70px" style="background: blue"></mspace>
|
||||
<math>
|
||||
<mfrac id="percent" linethickness="234%">
|
||||
<mspace width="20px" height="10px" style="background: blue"></mspace>
|
||||
<mspace width="20px" height="10px" style="background: cyan"></mspace>
|
||||
</mfrac>
|
||||
</math>
|
||||
<math>
|
||||
<mfrac id="namedspace" linethickness="veryverythickmathspace">
|
||||
<mspace width="20px" height="10px" style="background: blue"></mspace>
|
||||
<mspace width="20px" height="10px" style="background: cyan"></mspace>
|
||||
</mfrac>
|
||||
</math>
|
||||
|
|
|
@ -39,13 +39,11 @@
|
|||
assert_equals(getBox("unitEm").width, 120, "em");
|
||||
assert_equals(getBox("unitEx").width, 500, "ex");
|
||||
assert_equals(getBox("unitIn").width, 288, "in");
|
||||
assert_equals(getBox("unitNamed").width, 700, "namedspace");
|
||||
assert_equals(getBox("unitMm").width, 576, "mm");
|
||||
assert_equals(getBox("unitPc").width, 96, "pc");
|
||||
assert_equals(getBox("unitPercentage").width, 60, "%");
|
||||
assert_equals(getBox("unitPt").width, 96, "pt");
|
||||
assert_equals(getBox("unitPx").width, 123, "px");
|
||||
assert_equals(getBox("unitNone").width, 150, "Unitless");
|
||||
}, "Units");
|
||||
|
||||
test(function() {
|
||||
|
@ -53,20 +51,17 @@
|
|||
assert_equals(getBox("spaceEm").width, 120, "em");
|
||||
assert_equals(getBox("spaceEx").width, 500, "ex");
|
||||
assert_equals(getBox("spaceIn").width, 288, "in");
|
||||
assert_equals(getBox("spaceNamed").width, 700, "namedspace");
|
||||
assert_equals(getBox("spaceMm").width, 576, "mm");
|
||||
assert_equals(getBox("spacePc").width, 96, "pc");
|
||||
assert_equals(getBox("spacePercentage").width, 60, "%");
|
||||
assert_equals(getBox("spacePt").width, 96, "pt");
|
||||
assert_equals(getBox("spacePx").width, 123, "px");
|
||||
assert_equals(getBox("spaceNone").width, 150, "Unitless");
|
||||
}, "Trimming of space");
|
||||
|
||||
test(function() {
|
||||
assert_approx_equals(getBox("n0").width, 0, epsilon, "n0");
|
||||
assert_approx_equals(getBox("n1").width, 90, epsilon, "n1");
|
||||
assert_approx_equals(getBox("n2").width, 8, epsilon, "n2");
|
||||
assert_approx_equals(getBox("n3").width, 70, epsilon, "n3");
|
||||
assert_approx_equals(getBox("n4").width, 650, epsilon, "n4");
|
||||
assert_approx_equals(getBox("n5").width, 4320, epsilon, "n5");
|
||||
assert_approx_equals(getBox("n6").width, 1, epsilon, "n6");
|
||||
|
@ -81,7 +76,6 @@
|
|||
assert_approx_equals(getBox("N0").top - topRef, -0, epsilon, "N0");
|
||||
assert_approx_equals(topRef - getBox("N1").top, -90, epsilon, "N1");
|
||||
assert_approx_equals(topRef - getBox("N2").top, -8, epsilon, "N2");
|
||||
assert_approx_equals(topRef - getBox("N3").top, -70, epsilon, "N3");
|
||||
assert_approx_equals(topRef - getBox("N4").top, -650, epsilon, "N4");
|
||||
assert_approx_equals(topRef - getBox("N5").top, -4320, epsilon, "N5");
|
||||
assert_approx_equals(topRef - getBox("N6").top, -1, epsilon, "N6");
|
||||
|
@ -91,6 +85,38 @@
|
|||
assert_approx_equals(topRef - getBox("N10").top, -123, epsilon, "N10");
|
||||
}, "Non-positive numbers");
|
||||
|
||||
test(function() {
|
||||
// Namedspace values are invalid in MathML Core.
|
||||
["veryverythinmathspace",
|
||||
"verythinmathspace",
|
||||
"thinmathspace",
|
||||
"mediummathspace",
|
||||
"thickmathspace",
|
||||
"verythickmathspace",
|
||||
"veryverythickmathspace",
|
||||
"negativeveryverythinmathspace",
|
||||
"negativeverythinmathspace",
|
||||
"negativethinmathspace",
|
||||
"negativemediummathspace",
|
||||
"negativethickmathspace",
|
||||
"negativeverythickmathspace",
|
||||
"negativeveryverythickmathspace"
|
||||
].forEach(function(space) {
|
||||
var mrow = document.getElementById(space);
|
||||
var boxBefore = mrow.firstElementChild.getBoundingClientRect();
|
||||
var boxAfter = mrow.lastElementChild.getBoundingClientRect();
|
||||
assert_equals(boxAfter.left - boxBefore.right, 0, space);
|
||||
});
|
||||
}, "Legacy namedspaces");
|
||||
|
||||
test(function() {
|
||||
// These values are invalid in MathML Core.
|
||||
assert_equals(getBox("unitNone").width, 30, "Unitless");
|
||||
assert_approx_equals(getBox("n3").width, 0, epsilon, "n3");
|
||||
var topRef = getBox("ref").top;
|
||||
assert_approx_equals(topRef - getBox("N3").top, 0, epsilon, "N3");
|
||||
}, "Legacy numbers");
|
||||
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
|
@ -103,7 +129,6 @@
|
|||
<mspace id="unitEm" width="12em"/>
|
||||
<mspace id="unitEx" width="100ex"/>
|
||||
<mspace id="unitIn" width="3in"/>
|
||||
<mspace style="font-size: 1800px" id="unitNamed" width="veryverythickmathspace"/>
|
||||
<mspace id="unitMm" width="152.4mm"/>
|
||||
<mspace id="unitPc" width="6pc"/>
|
||||
<mstyle mathsize="200%"><mspace id="unitPercentage" width="3em"/></mstyle>
|
||||
|
@ -118,13 +143,11 @@
|
|||
<mspace id="spaceEm" width=" 	

 	

12em 	

 	

"/>
|
||||
<mspace id="spaceEx" width=" 	

 	

100ex 	

 	

"/>
|
||||
<mspace id="spaceIn" width=" 	

 	

3in 	

 	

"/>
|
||||
<mspace style="font-size: 1800px" id="spaceNamed" width=" 	

 	

veryverythickmathspace 	

 	

"/>
|
||||
<mspace id="spaceMm" width=" 	

 	

152.4mm 	

 	

"/>
|
||||
<mspace id="spacePc" width=" 	

 	

6pc 	

 	

"/>
|
||||
<mstyle mathsize="200%"><mspace id="spacePercentage" width=" 	

 	

3em 	

 	

"/></mstyle>
|
||||
<mspace id="spacePt" width=" 	

 	

72pt 	

 	

"/>
|
||||
<mspace id="spacePx" width=" 	

 	

123px 	

 	

"/>
|
||||
<mstyle mathsize="5"><mspace id="spaceNone" width=" 	

 	

3em 	

 	

"/></mstyle>
|
||||
</math>
|
||||
</p>
|
||||
<p>
|
||||
|
@ -158,5 +181,81 @@
|
|||
<mpadded voffset="-012.345em"><mspace id="N10"/></mpadded>
|
||||
</math>
|
||||
</p>
|
||||
<p>
|
||||
<math>
|
||||
<mrow id="veryverythinmathspace">
|
||||
<mspace width="1em"/>
|
||||
<mspace width="veryverythinmathspace"/>
|
||||
<mspace/>
|
||||
</mrow>
|
||||
<mrow id="verythinmathspace">
|
||||
<mspace width="1em"/>
|
||||
<mspace width="verythinmathspace"/>
|
||||
<mspace/>
|
||||
</mrow>
|
||||
<mrow id="thinmathspace">
|
||||
<mspace width="1em"/>
|
||||
<mspace width="thinmathspace"/>
|
||||
<mspace/>
|
||||
</mrow>
|
||||
<mrow id="mediummathspace">
|
||||
<mspace width="1em"/>
|
||||
<mspace width="mediummathspace"/>
|
||||
<mspace/>
|
||||
</mrow>
|
||||
<mrow id="thickmathspace">
|
||||
<mspace width="1em"/>
|
||||
<mspace width="thickmathspace"/>
|
||||
<mspace/>
|
||||
</mrow>
|
||||
<mrow id="verythickmathspace">
|
||||
<mspace width="1em"/>
|
||||
<mspace width="verythickmathspace"/>
|
||||
<mspace/>
|
||||
</mrow>
|
||||
<mrow id="veryverythickmathspace">
|
||||
<mspace width="1em"/>
|
||||
<mspace width="veryverythickmathspace"/>
|
||||
<mspace/>
|
||||
</mrow>
|
||||
</math>
|
||||
<math>
|
||||
<mrow id="negativeveryverythinmathspace">
|
||||
<mspace width="1em"/>
|
||||
<mspace width="veryverythinmathspace"/>
|
||||
<mspace/>
|
||||
</mrow>
|
||||
<mrow id="negativeverythinmathspace">
|
||||
<mspace width="1em"/>
|
||||
<mspace width="verythinmathspace"/>
|
||||
<mspace/>
|
||||
</mrow>
|
||||
<mrow id="negativethinmathspace">
|
||||
<mspace width="1em"/>
|
||||
<mspace width="thinmathspace"/>
|
||||
<mspace/>
|
||||
</mrow>
|
||||
<mrow id="negativemediummathspace">
|
||||
<mspace width="1em"/>
|
||||
<mspace width="mediummathspace"/>
|
||||
<mspace/>
|
||||
</mrow>
|
||||
<mrow id="negativethickmathspace">
|
||||
<mspace width="1em"/>
|
||||
<mspace width="thickmathspace"/>
|
||||
<mspace/>
|
||||
</mrow>
|
||||
<mrow id="negativeverythickmathspace">
|
||||
<mspace width="1em"/>
|
||||
<mspace width="verythickmathspace"/>
|
||||
<mspace/>
|
||||
</mrow>
|
||||
<mrow id="negativeveryverythickmathspace">
|
||||
<mspace width="1em"/>
|
||||
<mspace width="veryverythickmathspace"/>
|
||||
<mspace/>
|
||||
</mrow>
|
||||
</math>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
async_test(t => {
|
||||
// First observer creates second in callback to ensure the entry has been dispatched by the time
|
||||
// the second observer begins observing.
|
||||
let entries_seen = 0;
|
||||
new PerformanceObserver(firstList => {
|
||||
entries_seen += firstList.getEntries().length;
|
||||
// Abort if we have not yet received both paint entries.
|
||||
if (entries_seen < 2)
|
||||
return;
|
||||
|
||||
// Second observer requires 'buffered: true' to see the entries.
|
||||
let firstPaintSeen = false;
|
||||
let firstContentfulPaintSeen = false;
|
||||
new PerformanceObserver(list => {
|
||||
list.getEntries().forEach(t.step_func(entry => {
|
||||
assert_equals(entry.entryType, 'paint');
|
||||
if (entry.name === 'first-paint')
|
||||
firstPaintSeen = true;
|
||||
else if (entry.name === 'first-contentful-paint')
|
||||
firstContentfulPaintSeen = true;
|
||||
else
|
||||
assert_unreached('The observer should only see first paint or first contentful paint!');
|
||||
|
||||
if (firstPaintSeen && firstContentfulPaintSeen)
|
||||
t.done();
|
||||
}));
|
||||
}).observe({'type': 'paint', buffered: true});
|
||||
}).observe({'entryTypes': ['paint']});
|
||||
|
||||
// Trigger the first paint entries
|
||||
const img = document.createElement("IMG");
|
||||
img.src = "resources/circles.png";
|
||||
document.body.appendChild(img);
|
||||
}, "PerformanceObserver with buffered flag sees previous paint entries.");
|
|
@ -7,6 +7,9 @@
|
|||
<link rel="stylesheet" type="text/css" href="../pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-actions.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="../pointerevent_support.js"></script>
|
||||
<style>
|
||||
#target0 {
|
||||
|
@ -83,6 +86,7 @@
|
|||
function run() {
|
||||
var target0 = document.getElementById("target0");
|
||||
var btnComplete = document.getElementById("btnComplete");
|
||||
var actions_promise;
|
||||
target0.scrollTop = 200;
|
||||
|
||||
var scrollListenerExecuted = false;
|
||||
|
@ -100,9 +104,22 @@
|
|||
assert_equals(target0.scrollLeft, 0, "scroll x offset should be 0 in the end of the test");
|
||||
assert_greater_than(target0.scrollTop, 200, "scroll y offset should be greater than 200 in the end of the test");
|
||||
});
|
||||
|
||||
// Make sure the test finishes after all the input actions are completed.
|
||||
actions_promise.then( () => {
|
||||
test_touchaction.done();
|
||||
});
|
||||
updateDescriptionComplete();
|
||||
});
|
||||
|
||||
// Inject touch inputs.
|
||||
actions_promise = touchScrollInTarget(target0, 'up').then(function() {
|
||||
return touchScrollInTarget(target0, 'right');
|
||||
}).then(function() {
|
||||
return touchScrollInTarget(target0, 'down');
|
||||
}).then(function() {
|
||||
return clickInTarget("touch", btnComplete);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<h1>touch-action: pan-down</h1>
|
|
@ -7,6 +7,9 @@
|
|||
<link rel="stylesheet" type="text/css" href="../pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-actions.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="../pointerevent_support.js"></script>
|
||||
<style>
|
||||
#target0 {
|
||||
|
@ -83,6 +86,7 @@
|
|||
function run() {
|
||||
var target0 = document.getElementById("target0");
|
||||
var btnComplete = document.getElementById("btnComplete");
|
||||
var actions_promise;
|
||||
target0.scrollLeft = 200;
|
||||
|
||||
var scrollListenerExecuted = false;
|
||||
|
@ -100,9 +104,22 @@
|
|||
assert_less_than(target0.scrollLeft, 200, "scroll x offset should be less than 200 in the end of the test");
|
||||
assert_equals(target0.scrollTop, 0, "scroll y offset should be 0 in the end of the test");
|
||||
});
|
||||
|
||||
// Make sure the test finishes after all the input actions are completed.
|
||||
actions_promise.then( () => {
|
||||
test_touchaction.done();
|
||||
});
|
||||
updateDescriptionComplete();
|
||||
});
|
||||
|
||||
// Inject touch inputs.
|
||||
actions_promise = touchScrollInTarget(target0, 'down').then(function() {
|
||||
return touchScrollInTarget(target0, 'right');
|
||||
}).then(function() {
|
||||
return touchScrollInTarget(target0, 'left');
|
||||
}).then(function() {
|
||||
return clickInTarget("touch", btnComplete);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<h1>touch-action: pan-left</h1>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue