Update web-platform-tests to revision a3dd2ad02c65588ad280ceac378d82e9250d1045

This commit is contained in:
WPT Sync Bot 2019-10-23 10:27:05 +00:00
parent e26530341b
commit 15e68ad3d3
171 changed files with 2819 additions and 1841 deletions

View file

@ -34,6 +34,3 @@
[Revoke blob URL after creating Request, will fetch] [Revoke blob URL after creating Request, will fetch]
expected: FAIL expected: FAIL
[Revoke blob URL after calling fetch, fetch should succeed]
expected: FAIL

File diff suppressed because it is too large Load diff

View file

@ -1,2 +0,0 @@
[mix-blend-mode-animation.html]
expected: FAIL

View file

@ -1,4 +1,5 @@
[perspective-interpolation.html] [perspective-interpolation.html]
expected: CRASH
[ perspective interpolation] [ perspective interpolation]
expected: FAIL expected: FAIL

View file

@ -1,2 +0,0 @@
[outline-006.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[attr-in-max.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[calc-in-max.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[max-20-arguments.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[max-unitless-zero-invalid.html]
expected: FAIL

View file

@ -8,3 +8,6 @@
[throws if handleEvent is thruthy and not callable] [throws if handleEvent is thruthy and not callable]
expected: FAIL expected: FAIL
[doesn't look up handleEvent method on callable event listeners]
expected: FAIL

View file

@ -53,3 +53,15 @@
[Scroll positions when performing smooth scrolling from (0, 0) to (500, 250) using scrollBy() ] [Scroll positions when performing smooth scrolling from (0, 0) to (500, 250) using scrollBy() ]
expected: FAIL expected: FAIL
[Scroll positions when performing smooth scrolling from 500 to 250 by setting scrollTop ]
expected: FAIL
[Scroll positions when performing smooth scrolling from 1000 to 500 by setting scrollLeft ]
expected: FAIL
[Scroll positions when performing smooth scrolling from 0 to 500 by setting scrollLeft ]
expected: FAIL
[Scroll positions when performing smooth scrolling from 0 to 250 by setting scrollTop ]
expected: FAIL

View file

@ -1,2 +0,0 @@
[backdrop-filters-hue-rotate.html]
expected: FAIL

View file

@ -2,7 +2,6 @@
type: testharness type: testharness
[single-byte-decoder.html?document] [single-byte-decoder.html?document]
expected: TIMEOUT
[ISO-8859-4: iso_8859-4:1988 (document.characterSet and document.inputEncoding)] [ISO-8859-4: iso_8859-4:1988 (document.characterSet and document.inputEncoding)]
expected: FAIL expected: FAIL

View file

@ -312,21 +312,15 @@
[<iframe>: separate response Content-Type: */* text/html] [<iframe>: separate response Content-Type: */* text/html]
expected: FAIL expected: FAIL
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*;charset=gbk] [<iframe>: separate response Content-Type: text/html */*;charset=gbk]
expected: FAIL expected: FAIL
[<iframe>: combined response Content-Type: */* text/html]
expected: FAIL
[<iframe>: combined response Content-Type: text/html */*] [<iframe>: combined response Content-Type: text/html */*]
expected: FAIL expected: FAIL
[<iframe>: separate response Content-Type: text/plain */*] [<iframe>: separate response Content-Type: text/html;x=" text/plain]
expected: FAIL expected: FAIL
[<iframe>: combined response Content-Type: text/html;" \\" text/plain] [<iframe>: separate response Content-Type: text/html;" \\" text/plain]
expected: FAIL expected: FAIL

View file

@ -56,9 +56,9 @@
[separate text/javascript x/x] [separate text/javascript x/x]
expected: FAIL expected: FAIL
[separate text/javascript;charset=windows-1252 error text/javascript] [separate text/javascript error]
expected: FAIL expected: FAIL
[separate text/javascript;charset=windows-1252 text/javascript] [separate text/javascript ]
expected: FAIL expected: FAIL

View file

@ -11,6 +11,3 @@
[X-Content-Type-Options%3A%20nosniff%0C] [X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL expected: FAIL
[X-Content-Type-Options%3A%20%2Cnosniff]
expected: FAIL

View file

@ -13,3 +13,9 @@
[Embedded credentials matching the top-level are treated as network errors for cross-origin URLs.] [Embedded credentials matching the top-level are treated as network errors for cross-origin URLs.]
expected: TIMEOUT expected: TIMEOUT
[Embedded credentials matching the top-level are not treated as network errors for same-origin URLs.]
expected: TIMEOUT
[Embedded credentials matching the top-level are not treated as network errors for relative URLs.]
expected: TIMEOUT

View file

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

View file

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

View file

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

View file

@ -1,5 +1,24 @@
[open-features-negative-innerwidth-innerheight.html] [open-features-negative-innerwidth-innerheight.html]
type: testharness type: testharness
expected: TIMEOUT
[HTML: window.open `features`: negative values for legacy `innerwidth`, `innerheight`] [HTML: window.open `features`: negative values for legacy `innerwidth`, `innerheight`]
expected: FAIL 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

View file

@ -1,5 +1,24 @@
[open-features-negative-screenx-screeny.html] [open-features-negative-screenx-screeny.html]
type: testharness type: testharness
expected: TIMEOUT
[HTML: window.open `features`: negative values for legacy `screenx`, `screeny`] [HTML: window.open `features`: negative values for legacy `screenx`, `screeny`]
expected: FAIL 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

View file

@ -1,5 +1,24 @@
[open-features-negative-top-left.html] [open-features-negative-top-left.html]
type: testharness type: testharness
expected: TIMEOUT
[HTML: window.open `features`: negative values for `top`, `left`] [HTML: window.open `features`: negative values for `top`, `left`]
expected: FAIL 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

View file

@ -1,5 +1,24 @@
[open-features-negative-width-height.html] [open-features-negative-width-height.html]
type: testharness type: testharness
expected: TIMEOUT
[HTML: window.open `features`: negative values for `width`, `height`] [HTML: window.open `features`: negative values for `width`, `height`]
expected: FAIL 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

View file

@ -1,32 +1,48 @@
[open-features-non-integer-height.html] [open-features-non-integer-height.html]
type: testharness type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for feature `height`] [HTML: window.open `features`: non-integer values for feature `height`]
expected: FAIL expected: FAIL
[features "height=405*3" should set "height=405"] [features "height=405*3" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "height=405.32" should set "height=405"] [features "height=405.32" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "height=405e1" should set "height=405"] [features "height=405e1" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "height=405/5" should set "height=405"] [features "height=405/5" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "height=405^4" should set "height=405"] [features "height=405^4" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "height=405.5" should set "height=405"] [features "height=405.5" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "height=405e-1" should set "height=405"] [features "height=405e-1" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "height=405 " should set "height=405"] [features "height=405 " should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "height=405LLl" should set "height=405"] [features "height=405LLl" should set "height=405"]
expected: FAIL 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

View file

@ -1,32 +1,42 @@
[open-features-non-integer-innerheight.html] [open-features-non-integer-innerheight.html]
type: testharness type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for legacy feature `innerheight`] [HTML: window.open `features`: non-integer values for legacy feature `innerheight`]
expected: FAIL expected: FAIL
[features "innerheight=405e-1" should set "height=405"] [features "innerheight=405e-1" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "innerheight=405LLl" should set "height=405"] [features "innerheight=405LLl" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "innerheight=405^4" should set "height=405"] [features "innerheight=405^4" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "innerheight=405e1" should set "height=405"] [features "innerheight=405e1" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "innerheight=405 " should set "height=405"] [features "innerheight=405 " should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "innerheight=405/5" should set "height=405"] [features "innerheight=405/5" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "innerheight=405.32" should set "height=405"] [features "innerheight=405.32" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "innerheight=405.5" should set "height=405"] [features "innerheight=405.5" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "innerheight=405*3" should set "height=405"] [features "innerheight=405*3" should set "height=405"]
expected: FAIL 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

View file

@ -1,32 +1,42 @@
[open-features-non-integer-innerwidth.html] [open-features-non-integer-innerwidth.html]
type: testharness type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for legacy feature `innerwidth`] [HTML: window.open `features`: non-integer values for legacy feature `innerwidth`]
expected: FAIL expected: FAIL
[features "innerwidth=405e-1" should set "width=405"] [features "innerwidth=405e-1" should set "width=405"]
expected: FAIL expected: TIMEOUT
[features "innerwidth=405*3" should set "width=405"] [features "innerwidth=405*3" should set "width=405"]
expected: FAIL expected: TIMEOUT
[features "innerwidth=405.5" should set "width=405"] [features "innerwidth=405.5" should set "width=405"]
expected: FAIL expected: TIMEOUT
[features "innerwidth=405e1" should set "width=405"] [features "innerwidth=405e1" should set "width=405"]
expected: FAIL expected: TIMEOUT
[features "innerwidth=405.32" should set "width=405"] [features "innerwidth=405.32" should set "width=405"]
expected: FAIL expected: TIMEOUT
[features "innerwidth=405 " should set "width=405"] [features "innerwidth=405 " should set "width=405"]
expected: FAIL expected: TIMEOUT
[features "innerwidth=405LLl" should set "width=405"] [features "innerwidth=405LLl" should set "width=405"]
expected: FAIL expected: TIMEOUT
[features "innerwidth=405/5" should set "width=405"] [features "innerwidth=405/5" should set "width=405"]
expected: FAIL expected: TIMEOUT
[features "innerwidth=405^4" should set "width=405"] [features "innerwidth=405^4" should set "width=405"]
expected: FAIL 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

View file

@ -1,32 +1,42 @@
[open-features-non-integer-left.html] [open-features-non-integer-left.html]
type: testharness type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for feature `left`] [HTML: window.open `features`: non-integer values for feature `left`]
expected: FAIL expected: FAIL
[features "left=105e1" should set "left=105"] [features "left=105e1" should set "left=105"]
expected: FAIL expected: TIMEOUT
[features "left=105 " should set "left=105"] [features "left=105 " should set "left=105"]
expected: FAIL expected: TIMEOUT
[features "left=105/5" should set "left=105"] [features "left=105/5" should set "left=105"]
expected: FAIL expected: TIMEOUT
[features "left=105e-1" should set "left=105"] [features "left=105e-1" should set "left=105"]
expected: FAIL expected: TIMEOUT
[features "left=105^4" should set "left=105"] [features "left=105^4" should set "left=105"]
expected: FAIL expected: TIMEOUT
[features "left=105LLl" should set "left=105"] [features "left=105LLl" should set "left=105"]
expected: FAIL expected: TIMEOUT
[features "left=105.32" should set "left=105"] [features "left=105.32" should set "left=105"]
expected: FAIL expected: TIMEOUT
[features "left=105*3" should set "left=105"] [features "left=105*3" should set "left=105"]
expected: FAIL expected: TIMEOUT
[features "left=105.5" should set "left=105"] [features "left=105.5" should set "left=105"]
expected: FAIL 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

View file

@ -1,32 +1,42 @@
[open-features-non-integer-screenx.html] [open-features-non-integer-screenx.html]
type: testharness type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for legacy feature `screenx`] [HTML: window.open `features`: non-integer values for legacy feature `screenx`]
expected: FAIL expected: FAIL
[features "screenx=105.5" should set "left=105"] [features "screenx=105.5" should set "left=105"]
expected: FAIL expected: TIMEOUT
[features "screenx=105e1" should set "left=105"] [features "screenx=105e1" should set "left=105"]
expected: FAIL expected: TIMEOUT
[features "screenx=105 " should set "left=105"] [features "screenx=105 " should set "left=105"]
expected: FAIL expected: TIMEOUT
[features "screenx=105*3" should set "left=105"] [features "screenx=105*3" should set "left=105"]
expected: FAIL expected: TIMEOUT
[features "screenx=105e-1" should set "left=105"] [features "screenx=105e-1" should set "left=105"]
expected: FAIL expected: TIMEOUT
[features "screenx=105^4" should set "left=105"] [features "screenx=105^4" should set "left=105"]
expected: FAIL expected: TIMEOUT
[features "screenx=105LLl" should set "left=105"] [features "screenx=105LLl" should set "left=105"]
expected: FAIL expected: TIMEOUT
[features "screenx=105/5" should set "left=105"] [features "screenx=105/5" should set "left=105"]
expected: FAIL expected: TIMEOUT
[features "screenx=105.32" should set "left=105"] [features "screenx=105.32" should set "left=105"]
expected: FAIL 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

View file

@ -1,32 +1,42 @@
[open-features-non-integer-screeny.html] [open-features-non-integer-screeny.html]
type: testharness type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for legacy feature `screeny`] [HTML: window.open `features`: non-integer values for legacy feature `screeny`]
expected: FAIL expected: FAIL
[features "screeny=405^4" should set "height=405"] [features "screeny=405^4" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "screeny=405e-1" should set "height=405"] [features "screeny=405e-1" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "screeny=405LLl" should set "height=405"] [features "screeny=405LLl" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "screeny=405e1" should set "height=405"] [features "screeny=405e1" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "screeny=405 " should set "height=405"] [features "screeny=405 " should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "screeny=405/5" should set "height=405"] [features "screeny=405/5" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "screeny=405*3" should set "height=405"] [features "screeny=405*3" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "screeny=405.32" should set "height=405"] [features "screeny=405.32" should set "height=405"]
expected: FAIL expected: TIMEOUT
[features "screeny=405.5" should set "height=405"] [features "screeny=405.5" should set "height=405"]
expected: FAIL 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

View file

@ -1,32 +1,42 @@
[open-features-non-integer-top.html] [open-features-non-integer-top.html]
type: testharness type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for feature `top`] [HTML: window.open `features`: non-integer values for feature `top`]
expected: FAIL expected: FAIL
[features "top=105/5" should set "top=105"] [features "top=105/5" should set "top=105"]
expected: FAIL expected: TIMEOUT
[features "top=105*3" should set "top=105"] [features "top=105*3" should set "top=105"]
expected: FAIL expected: TIMEOUT
[features "top=105LLl" should set "top=105"] [features "top=105LLl" should set "top=105"]
expected: FAIL expected: TIMEOUT
[features "top=105e-1" should set "top=105"] [features "top=105e-1" should set "top=105"]
expected: FAIL expected: TIMEOUT
[features "top=105.32" should set "top=105"] [features "top=105.32" should set "top=105"]
expected: FAIL expected: TIMEOUT
[features "top=105e1" should set "top=105"] [features "top=105e1" should set "top=105"]
expected: FAIL expected: TIMEOUT
[features "top=105 " should set "top=105"] [features "top=105 " should set "top=105"]
expected: FAIL expected: TIMEOUT
[features "top=105^4" should set "top=105"] [features "top=105^4" should set "top=105"]
expected: FAIL expected: TIMEOUT
[features "top=105.5" should set "top=105"] [features "top=105.5" should set "top=105"]
expected: FAIL 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

View file

@ -1,32 +1,48 @@
[open-features-non-integer-width.html] [open-features-non-integer-width.html]
type: testharness type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for feature `width`] [HTML: window.open `features`: non-integer values for feature `width`]
expected: FAIL expected: FAIL
[features "width=405^4" should set "width=405"] [features "width=405^4" should set "width=405"]
expected: FAIL expected: TIMEOUT
[features "width=405.5" should set "width=405"] [features "width=405.5" should set "width=405"]
expected: FAIL expected: TIMEOUT
[features "width=405e1" should set "width=405"] [features "width=405e1" should set "width=405"]
expected: FAIL expected: TIMEOUT
[features "width=405 " should set "width=405"] [features "width=405 " should set "width=405"]
expected: FAIL expected: TIMEOUT
[features "width=405.32" should set "width=405"] [features "width=405.32" should set "width=405"]
expected: FAIL expected: TIMEOUT
[features "width=405LLl" should set "width=405"] [features "width=405LLl" should set "width=405"]
expected: FAIL expected: TIMEOUT
[features "width=405*3" should set "width=405"] [features "width=405*3" should set "width=405"]
expected: FAIL expected: TIMEOUT
[features "width=405e-1" should set "width=405"] [features "width=405e-1" should set "width=405"]
expected: FAIL expected: TIMEOUT
[features "width=405/5" should set "width=405"] [features "width=405/5" should set "width=405"]
expected: FAIL 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

View file

@ -1,5 +1,7 @@
[update-the-rendering.html] [update-the-rendering.html]
expected: TIMEOUT
["Flush autofocus candidates" should be happen after the first animation frame callbacks, and before a resize event in the next iteration of window event loop.] ["Flush autofocus candidates" should be happen after the first animation frame callbacks, and before a resize event in the next iteration of window event loop.]
expected: TIMEOUT expected: TIMEOUT
["Flush autofocus candidates" should be happen before a scroll event and animation frame callbacks]
expected: FAIL

View file

@ -1,5 +1,6 @@
[iframe_sandbox_popups_nonescaping-1.html] [iframe_sandbox_popups_nonescaping-1.html]
type: testharness type: testharness
expected: TIMEOUT
[Check that popups from a sandboxed iframe do not escape the sandbox] [Check that popups from a sandboxed iframe do not escape the sandbox]
expected: FAIL expected: NOTRUN

View file

@ -1,5 +1,5 @@
[form-double-submit-3.html] [form-double-submit-3.html]
expected: ERROR expected: ERROR
[<button> should have the same double-submit protection as <input type=submit>] [<button> should have the same double-submit protection as <input type=submit>]
expected: TIMEOUT expected: FAIL

View file

@ -1,5 +1,5 @@
[form-double-submit.html] [form-double-submit.html]
expected: ERROR expected: ERROR
[default submit action should supersede onclick submit()] [default submit action should supersede onclick submit()]
expected: FAIL expected: TIMEOUT

View file

@ -1041,3 +1041,12 @@
[<area>: Setting <data:text/plain,Stuff>.hostname = 'example.net' Cannot-be-a-base means no host] [<area>: Setting <data:text/plain,Stuff>.hostname = 'example.net' Cannot-be-a-base means no host]
expected: FAIL expected: FAIL
[<area>: Setting <ssh://me@example.net>.protocol = 'https']
expected: FAIL
[<a>: Setting <ssh://me@example.net>.protocol = 'https']
expected: FAIL
[URL: Setting <ssh://me@example.net>.protocol = 'https']
expected: FAIL

View file

@ -1,4 +0,0 @@
[idlharness.https.window.html]
[idl_test validation]
expected: FAIL

View file

@ -1,5 +1,4 @@
[005.html] [005.html]
expected: ERROR
[dedicated worker in shared worker in dedicated worker] [dedicated worker in shared worker in dedicated worker]
expected: FAIL expected: FAIL

View file

@ -1,3 +0,0 @@
[canvas_linear_gradient_a.html]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[filter_sepia_a.html]
type: reftest
expected: FAIL

View file

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

View file

@ -60,7 +60,7 @@ jobs:
displayName: './wpt test-jobs' displayName: './wpt test-jobs'
condition: eq(variables['Build.Reason'], 'PullRequest') condition: eq(variables['Build.Reason'], 'PullRequest')
pool: pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-18.04'
steps: steps:
- template: tools/ci/azure/checkout.yml - template: tools/ci/azure/checkout.yml
- script: | - script: |

View file

@ -0,0 +1,96 @@
// META: script=support-promises.js
// META: title=Indexed DB transaction state during Structured Serializing
// META: timeout=long
'use strict';
promise_test(async testCase => {
const db = await createDatabase(testCase, database => {
database.createObjectStore('store');
});
const transaction = db.transaction(['store'], 'readwrite');
const objectStore = transaction.objectStore('store');
let getterCalled = false;
const activeValue = {};
Object.defineProperty(activeValue, 'propertyName', {
enumerable: true,
get: testCase.step_func(() => {
getterCalled = true;
assert_throws('TransactionInactiveError', () => {
objectStore.get('key');
}, 'transaction should not be active during structured clone');
return 'value that should not be used';
}),
});
objectStore.add(activeValue, 'key');
await promiseForTransaction(testCase, transaction);
db.close();
assert_true(getterCalled,
"activeValue's getter should be called during test");
}, 'Transaction inactive during structured clone in IDBObjectStore.add()');
promise_test(async testCase => {
const db = await createDatabase(testCase, database => {
database.createObjectStore('store');
});
const transaction = db.transaction(['store'], 'readwrite');
const objectStore = transaction.objectStore('store');
let getterCalled = false;
const activeValue = {};
Object.defineProperty(activeValue, 'propertyName', {
enumerable: true,
get: testCase.step_func(() => {
getterCalled = true;
assert_throws('TransactionInactiveError', () => {
objectStore.get('key');
}, 'transaction should not be active during structured clone');
return 'value that should not be used';
}),
});
objectStore.put(activeValue, 'key');
await promiseForTransaction(testCase, transaction);
db.close();
assert_true(getterCalled,
"activeValue's getter should be called during test");
}, 'Transaction inactive during structured clone in IDBObjectStore.put()');
promise_test(async testCase => {
const db = await createDatabase(testCase, database => {
const objectStore = database.createObjectStore('store');
objectStore.put({}, 'key');
});
const transaction = db.transaction(['store'], 'readwrite');
const objectStore = transaction.objectStore('store');
let getterCalled = false;
const activeValue = {};
Object.defineProperty(activeValue, 'propertyName', {
enumerable: true,
get: testCase.step_func(() => {
getterCalled = true;
assert_throws('TransactionInactiveError', () => {
objectStore.get('key');
}, 'transaction should not be active during structured clone');
return 'value that should not be used';
}),
});
const request = objectStore.openCursor();
request.onsuccess = testCase.step_func(() => {
const cursor = request.result;
cursor.update(activeValue);
});
await promiseForTransaction(testCase, transaction);
db.close();
assert_true(getterCalled,
"activeValue's getter should be called during test");
}, 'Transaction inactive during structured clone in IDBCursor.update()');

View file

@ -49,6 +49,16 @@ function setupAndRegisterTests() {
promise_test(async t => { promise_test(async t => {
const animation = createScrollLinkedWorkletAnimation(t); const animation = createScrollLinkedWorkletAnimation(t);
const scroller = animation.timeline.scrollSource; const scroller = animation.timeline.scrollSource;
const target = animation.effect.target;
// There is no direct way to control when local times of composited
// animations are synced to the main thread. This test uses another
// composited worklet animation with an always active timeline as an
// indicator of when the sync is ready. The sync is done when animation
// effect's output has changed as a result of advancing the timeline.
const animationRef = createScrollLinkedWorkletAnimation(t);
const scrollerRef = animationRef.timeline.scrollSource;
const targetRef = animationRef.effect.target;
const maxScroll = scroller.scrollHeight - scroller.clientHeight; const maxScroll = scroller.scrollHeight - scroller.clientHeight;
const timeRange = animation.timeline.timeRange; const timeRange = animation.timeline.timeRange;
@ -60,6 +70,7 @@ function setupAndRegisterTests() {
scroller.scrollTop; scroller.scrollTop;
animation.play(); animation.play();
animationRef.play();
assert_equals(animation.currentTime, null, assert_equals(animation.currentTime, null,
'Initial current time must be unresolved in idle state.'); 'Initial current time must be unresolved in idle state.');
assert_equals(animation.startTime, null, assert_equals(animation.startTime, null,
@ -72,6 +83,17 @@ function setupAndRegisterTests() {
assert_equals(animation.startTime, null, assert_equals(animation.startTime, null,
'Initial start time must be unresolved in playing state.'); 'Initial start time must be unresolved in playing state.');
scrollerRef.scrollTop = 0.2 * maxScroll;
// Wait until local times are synced back to the main thread.
await waitForAnimationFrameWithCondition(_ => {
return animationRef.effect.getComputedTiming().localTime == 200;
});
assert_equals(animation.effect.getComputedTiming().localTime, null,
'The underlying effect local time must be undefined while the ' +
'timeline is inactive.');
// Make the timeline active. // Make the timeline active.
scroller.style.display = "" scroller.style.display = ""
scroller.scrollTop; scroller.scrollTop;
@ -81,6 +103,15 @@ function setupAndRegisterTests() {
assert_times_equal(animation.startTime, 0, assert_times_equal(animation.startTime, 0,
'Start time must be initialized.'); 'Start time must be initialized.');
scrollerRef.scrollTop = 0.4 * maxScroll;
// Wait until local times are synced back to the main thread.
await waitForAnimationFrameWithCondition(_ => {
return animationRef.effect.getComputedTiming().localTime == 400;
});
assert_times_equal(animation.effect.getComputedTiming().localTime, 200,
'When the timeline becomes newly active, the underlying effect\'s ' +
'timing should be properly updated.');
// Make the timeline inactive again. // Make the timeline inactive again.
scroller.style.display = "none" scroller.style.display = "none"
scroller.scrollTop; scroller.scrollTop;
@ -90,6 +121,16 @@ function setupAndRegisterTests() {
assert_equals(animation.startTime, null, assert_equals(animation.startTime, null,
'Initial start time must be unresolved.'); 'Initial start time must be unresolved.');
scrollerRef.scrollTop = 0.6 * maxScroll;
scrollerRef.scrollTop;
// Wait until local times are synced back to the main thread.
await waitForAnimationFrameWithCondition(_ => {
return animationRef.effect.getComputedTiming().localTime == 600;
});
assert_times_equal(animation.effect.getComputedTiming().localTime, 200,
'When the timeline becomes newly inactive, the underlying effect\'s ' +
'timing should stay unchanged.');
}, 'When timeline time becomes inactive previous current time must be ' + }, 'When timeline time becomes inactive previous current time must be ' +
'the current time and start time unresolved'); 'the current time and start time unresolved');
done(); done();

View file

@ -18,7 +18,8 @@ ol li { list-style-type: ethiopic-numeric; }
<p class="instructions">Test passes if the two columns are the same, ignoring the suffix.</p> <p class="instructions">Test passes if the two columns are the same, ignoring the suffix.</p>
<div class='test'><ol> <div class='test'>
<ol>
<li title='1'>፩.</li> <li title='1'>፩.</li>
<li title='2'>፪.</li> <li title='2'>፪.</li>
<li title='3'>፫.</li> <li title='3'>፫.</li>

View file

@ -18,12 +18,12 @@ ol li { list-style-type: ethiopic-numeric; }
<p class="instructions">Test passes if the two columns are the same, ignoring the suffix.</p> <p class="instructions">Test passes if the two columns are the same, ignoring the suffix.</p>
<div class='test'><ol start='10'> <div class='test'>
<ol start='10'>
<li title='10'>፲.</li> <li title='10'>፲.</li>
<li title='11'>፲፩.</li> <li title='11'>፲፩.</li>
<li title='12'>፲፪.</li> <li title='12'>፲፪.</li>
</ol> </ol>
<ol start='43'> <ol start='43'>
<li title='43'>፵፫.</li> <li title='43'>፵፫.</li>
</ol> </ol>
@ -31,14 +31,12 @@ ol li { list-style-type: ethiopic-numeric; }
<li title='77'>፸፯.</li> <li title='77'>፸፯.</li>
</ol> </ol>
<ol start='80'> <ol start='80'>
<li title='80'>፹.</li> <li title='80'>፹.</li>
</ol> </ol>
<ol start='99'> <ol start='99'>
<li title='99'>፺፱.</li> <li title='99'>፺፱.</li>
<li title='100'>፻.</li> <li title='100'>፻.</li>
<li title='101'>፻፩.</li> <li title='101'>፻፩.</li>
</ol> </ol>
<ol start='222'> <ol start='222'>
<li title='222'>፪፻፳፪.</li> <li title='222'>፪፻፳፪.</li>
@ -46,14 +44,12 @@ ol li { list-style-type: ethiopic-numeric; }
<ol start='540'> <ol start='540'>
<li title='540'>፭፻፵.</li> <li title='540'>፭፻፵.</li>
</ol> </ol>
<ol start='999'> <ol start='999'>
<li title='999'>፱፻፺፱.</li> <li title='999'>፱፻፺፱.</li>
<li title='1000'>፲፻.</li> <li title='1000'>፲፻.</li>
</ol> </ol>
<ol start='1005'> <ol start='1005'>
<li title='1005'>፲፻፭.</li> <li title='1005'>፲፻፭.</li>
</ol> </ol>
<ol start='1060'> <ol start='1060'>
<li title='1060'>፲፻፷.</li> <li title='1060'>፲፻፷.</li>
@ -61,7 +57,6 @@ ol li { list-style-type: ethiopic-numeric; }
<ol start='1065'> <ol start='1065'>
<li title='1065'>፲፻፷፭.</li> <li title='1065'>፲፻፷፭.</li>
</ol> </ol>
<ol start='1800'> <ol start='1800'>
<li title='1800'>፲፰፻.</li> <li title='1800'>፲፰፻.</li>
</ol> </ol>
@ -69,7 +64,6 @@ ol li { list-style-type: ethiopic-numeric; }
<li title='1860'>፲፰፻፷.</li> <li title='1860'>፲፰፻፷.</li>
</ol> </ol>
<ol start='1865'> <ol start='1865'>
<li title='1865'>፲፰፻፷፭.</li> <li title='1865'>፲፰፻፷፭.</li>
</ol> </ol>
<ol start='5865'> <ol start='5865'>
@ -77,7 +71,6 @@ ol li { list-style-type: ethiopic-numeric; }
</ol> </ol>
<ol start='7005'> <ol start='7005'>
<li title='7005'>፸፻፭.</li> <li title='7005'>፸፻፭.</li>
</ol> </ol>
<ol start='7800'> <ol start='7800'>
<li title='7800'>፸፰፻.</li> <li title='7800'>፸፰፻.</li>
@ -85,7 +78,6 @@ ol li { list-style-type: ethiopic-numeric; }
<ol start='7864'> <ol start='7864'>
<li title='7864'>፸፰፻፷፬.</li> <li title='7864'>፸፰፻፷፬.</li>
</ol> </ol>
<ol start='9999'> <ol start='9999'>
<li title='9999'>፺፱፻፺፱.</li> <li title='9999'>፺፱፻፺፱.</li>
<li title='10000'>፼.</li> <li title='10000'>፼.</li>

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<title>Auto cross margins and align-items: stretch</title>
<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#algo-stretch">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<meta name="flags" content="" />
<meta name="assert" content="Auto cross margins prevent an item from stretching." />
<link rel="bookmark" href="https://crbug.com/1015475" />
<style>
x-flexbox {
display: flex;
/* This makes auto margins prevent stretching without affecting position. Without
it the auto margins make the item move to the center of the window. */
width: 100px;
}
.item-with-auto-margin {
background: green;
margin: auto;
}
.pct-height-child {
height: 100%;
width: 100px;
background: red;
}
.second-child {
height: 100px;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<x-flexbox>
<div class=item-with-auto-margin>
<div class="pct-height-child"></div>
<div class="second-child"></div>
</div>
</x-flexbox>

View file

@ -0,0 +1,19 @@
<!doctype html>
<title>CSS Test: Invalidating style inside display:none with ::before should not crash.</title>
<link rel="help" href="https://crbug.com/1013570">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#outer { display: none }
#outer::before { content: " "; }
</style>
<div id="outer">
<div id="inner"></div>
</div>
<script>
test(() => {
assert_equals(getComputedStyle(inner).color, "rgb(0, 0, 0)");
inner.style.color = "green";
assert_equals(getComputedStyle(inner).color, "rgb(0, 128, 0)");
}, "Invalidating style inside display:none with ::before should not crash.");
</script>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Values and Units Test: attr() in max()</title>
<meta name="assert" content="The attr() function notation is allowed inside a max() notation.">
<link rel="author" title="Fuqiao Xue" href="mailto:xfq@w3.org">
<link rel="help" href="https://drafts.csswg.org/css-values/#attr-notation">
<link rel="help" href="https://drafts.csswg.org/css-values/#calc-notation">
<link rel="match" href="reference/200-200-green.html">
<style>
html, body { margin: 0px; padding: 0px; }
html { background: white; overflow: hidden; }
#outer { position: relative; background: green; }
#outer { width: max(attr(data-test length)); height: 200px; }
</style>
</head>
<body>
<div id="outer" data-test="200px"></div>
</body>
</html>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Values and Units Test: calc() in max()</title>
<meta name="assert" content="The calc() function notation is allowed inside a max() notation.">
<link rel="author" title="Fuqiao Xue" href="mailto:xfq@w3.org">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-syntax">
<link rel="match" href="reference/all-green.html">
<style>
html, body { margin: 0px; padding: 0px; }
html { background: red; overflow: hidden; }
#outer { position: absolute; top: 0px; left: 0px; background: green; width: 100%; }
#outer { height: max(calc(100%)); }
</style>
</head>
<body>
<div id="outer"></div>
</body>
</html>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Values and Units Test: max() with 20 arguments</title>
<meta name="assert" content="UAs must support math function expressions of at least 20 terms.">
<link rel="author" title="Fuqiao Xue" href="mailto:xfq@w3.org">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-syntax">
<link rel="match" href="reference/all-green.html">
<style>
html, body { margin: 0px; padding: 0px; }
html { background: red; overflow: hidden; }
#outer { position: absolute; top: 0px; left: 0px; background: green; width: 100%; }
#outer { height: max(5%, 10%, 15%, 20%, 25%, 30%, 35%, 40%, 45%, 50%, 55%, 60%, 65%, 70%, 75%, 80%, 85%, 90%, 95%, 100%); }
</style>
</head>
<body>
<div id="outer"></div>
</body>
</html>

View file

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Values and Units Test: min() with unitless 0</title>
<meta name="assert" content="Unitless 0 isn't supported in math functions.">
<link rel="author" title="Fuqiao Xue" href="mailto:xfq@w3.org">
<link rel="help" href="https://drafts.csswg.org/css-values/#calc-type-checking">
<link rel="match" href="reference/all-green.html">
<style>
html, body { margin: 0px; padding: 0px; }
html { background: red; overflow: hidden; }
#outer { position: absolute; top: 0px; left: 0px; background: green; width: 100%; }
#outer {
/* Assert that min() is supported */
height: min(100%);
/* The min() expression (thus the declaration) should be invalid */
height: min(0, 100%);
}
</style>
</head>
<body>
<div id="outer"></div>
</body>
</html>

View file

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:html="http://www.w3.org/1999/xhtml" width="2000px" height="100px" style="direction: rtl;">
<g id="testmeta">
<title>CSS-Writing Modes Test: Principal Writing Mode</title>
<html:link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com"/>
<html:link rel="author" title="Mozilla" href="https://mozilla.org/"/>
<html:link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#principal-flow"/>
<html:link rel="mismatch" href="../reference/blank.html"/>
<decs class="assert">This test verifies setting "direction:rtl" on the svg root
with a large width can generate a horizontal scroll bar.</decs>
</g>
</svg>

After

Width:  |  Height:  |  Size: 696 B

View file

@ -135,6 +135,32 @@
}, `Element with smooth scroll-behavior ; ${scrollFunction}() with smooth behavior`); }, `Element with smooth scroll-behavior ; ${scrollFunction}() with smooth behavior`);
}); });
[{scrollAttribute: "scrollLeft", scrollValue: elementToRevealLeft}, {scrollAttribute: "scrollTop", scrollValue: elementToRevealTop}].forEach((attributeTest) => {
promise_test(() => {
resetScroll(scrollingElement);
setScrollBehavior(styledElement, "autoBehavior");
assert_equals(scrollingElement.scrollLeft, 0);
assert_equals(scrollingElement.scrollTop, 0);
var expectedValue = Number(attributeTest.scrollValue);
scrollingElement[attributeTest.scrollAttribute] = expectedValue;
assert_equals( scrollingElement[attributeTest.scrollAttribute], expectedValue, "Should set scroll attribute immediately");
return new Promise((resolve) => { resolve(); });
}, `Set ${attributeTest.scrollAttribute} to element with auto scroll-behavior`);
promise_test(() => {
resetScroll(scrollingElement);
setScrollBehavior(styledElement, "smoothBehavior");
assert_equals(scrollingElement.scrollLeft, 0);
assert_equals(scrollingElement.scrollTop, 0);
var expectedValue = Number(attributeTest.scrollValue);
scrollingElement[attributeTest.scrollAttribute] = expectedValue;
assert_less_than(scrollingElement[attributeTest.scrollAttribute], expectedValue, "Shouldn't set scroll attribute immediately");
return waitForScrollEnd(scrollingElement).then(() => {
assert_equals(scrollingElement[attributeTest.scrollAttribute], expectedValue, "Final value of scroll attribute");
});
}, `Set ${attributeTest.scrollAttribute} to element with smooth scroll-behavior`);
});
promise_test(() => { promise_test(() => {
resetScroll(scrollingElement); resetScroll(scrollingElement);
setScrollBehavior(styledElement, "smoothBehavior"); setScrollBehavior(styledElement, "smoothBehavior");

View file

@ -140,6 +140,32 @@
}, `Main frame with smooth scroll-behavior ; ${scrollFunction}() with smooth behavior`); }, `Main frame with smooth scroll-behavior ; ${scrollFunction}() with smooth behavior`);
}); });
[{scrollAttribute: "scrollLeft", scrollValue: elementToRevealLeft}, {scrollAttribute: "scrollTop", scrollValue: elementToRevealTop}].forEach((attributeTest) => {
promise_test(() => {
resetScroll(scrollingElement);
setScrollBehavior(styledElement, "autoBehavior");
assert_equals(scrollingElement.scrollLeft, 0);
assert_equals(scrollingElement.scrollTop, 0);
var expectedValue = Number(attributeTest.scrollValue);
scrollingElement[attributeTest.scrollAttribute] = expectedValue;
assert_equals( scrollingElement[attributeTest.scrollAttribute], expectedValue, "Should set scroll attribute immediately");
return new Promise((resolve) => { resolve(); });
}, `Set ${attributeTest.scrollAttribute} to frame with auto scroll-behavior`);
promise_test(() => {
resetScroll(scrollingElement);
setScrollBehavior(styledElement, "smoothBehavior");
assert_equals(scrollingElement.scrollLeft, 0);
assert_equals(scrollingElement.scrollTop, 0);
var expectedValue = Number(attributeTest.scrollValue);
scrollingElement[attributeTest.scrollAttribute] = expectedValue;
assert_less_than(scrollingElement[attributeTest.scrollAttribute], expectedValue, "Shouldn't set scroll attribute immediately");
return waitForScrollEnd(scrollingElement).then(() => {
assert_equals(scrollingElement[attributeTest.scrollAttribute], expectedValue, "Final value of scroll attribute");
});
}, `Set ${attributeTest.scrollAttribute} to frame with smooth scroll-behavior`);
});
promise_test(() => { promise_test(() => {
resetScroll(scrollingElement); resetScroll(scrollingElement);
setScrollBehavior(styledElement, "smoothBehavior"); setScrollBehavior(styledElement, "smoothBehavior");

View file

@ -62,6 +62,34 @@
}); });
}); });
[{scrollAttribute: "scrollLeft", scrollValue: 500}, {scrollAttribute: "scrollTop", scrollValue: 250}].forEach(function(scrollTest) {
var initialPosition = Number(scrollTest.scrollValue) * 2;
[0, initialPosition].forEach((initial) => {
promise_test(() => {
return new Promise(function(resolve, reject) {
scrollNode(overflowNode, "scroll", "instant", initial, initial);
var oldValue = overflowNode[scrollTest.scrollAttribute];
assert_equals(oldValue, initial, `${scrollTest.scrollAttribute} should be at initial position`);
var expectedValue = Number(scrollTest.scrollValue);
overflowNode[scrollTest.scrollAttribute] = expectedValue;
observeScrolling(overflowNode, function(done) {
try {
var newValue = overflowNode[scrollTest.scrollAttribute];
assert_less_than_equal(Math.abs(expectedValue - newValue), Math.abs(expectedValue - oldValue), "Scroll position should move towards the final position");
if (done)
assert_equals(newValue, expectedValue, `${scrollTest.scrollAttribute} should reach final position`);
oldValue = newValue;
} catch(e) {
reject(e);
}
if (done)
resolve();
});
});
}, `Scroll positions when performing smooth scrolling from ${initial} to ${scrollTest.scrollValue} by setting ${scrollTest.scrollAttribute} `);
});
});
promise_test(() => { promise_test(() => {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
resetScroll(overflowNode); resetScroll(overflowNode);

View file

@ -141,6 +141,32 @@
}, `Subframe with smooth scroll-behavior ; ${scrollFunction}() with smooth behavior`); }, `Subframe with smooth scroll-behavior ; ${scrollFunction}() with smooth behavior`);
}); });
[{scrollAttribute: "scrollLeft", scrollValue: elementToRevealLeft}, {scrollAttribute: "scrollTop", scrollValue: elementToRevealTop}].forEach((attributeTest) => {
promise_test(() => {
resetScroll(scrollingElement);
setScrollBehavior(styledElement, "autoBehavior");
assert_equals(scrollingElement.scrollLeft, 0);
assert_equals(scrollingElement.scrollTop, 0);
var expectedValue = Number(attributeTest.scrollValue);
scrollingElement[attributeTest.scrollAttribute] = expectedValue;
assert_equals(scrollingElement[attributeTest.scrollAttribute], expectedValue, `Should set ${attributeTest.scrollAttribute} immediately`);
return new Promise((resolve) => { resolve(); });
}, `Subframe setting ${attributeTest.scrollAttribute} with auto scroll-behavior`);
promise_test(() => {
resetScroll(scrollingElement);
setScrollBehavior(styledElement, "smoothBehavior");
assert_equals(scrollingElement.scrollLeft, 0);
assert_equals(scrollingElement.scrollTop, 0);
var expectedValue = Number(attributeTest.scrollValue);
scrollingElement[attributeTest.scrollAttribute] = expectedValue;
assert_less_than(scrollingElement[attributeTest.scrollAttribute], expectedValue, `Should not set ${attributeTest.scrollAttribute} immediately`);
return waitForScrollEnd(scrollingElement).then(() => {
assert_equals(scrollingElement[attributeTest.scrollAttribute], expectedValue, `Final value of ${attributeTest.scrollAttribute}`);
});
}, `Subframe setting ${attributeTest.scrollAttribute} with smooth scroll-behavior`);
});
promise_test(() => { promise_test(() => {
resetScroll(scrollingElement); resetScroll(scrollingElement);
setScrollBehavior(styledElement, "smoothBehavior"); setScrollBehavior(styledElement, "smoothBehavior");

View file

@ -31,9 +31,7 @@ body {
let observedDiv1 = false; let observedDiv1 = false;
let observedDiv2Img = false; let observedDiv2Img = false;
let observedDiv2Txt = false; let observedDiv2Txt = false;
const index = window.location.href.lastIndexOf('/'); const pathname = window.location.origin + '/element-timing/resources/square100.png';
const pathname = window.location.href.substring(0, index) +
'/resources/square100.png';
const observer = new PerformanceObserver( const observer = new PerformanceObserver(
t.step_func(function(entryList) { t.step_func(function(entryList) {
entryList.getEntries().forEach(entry => { entryList.getEntries().forEach(entry => {

View file

@ -25,9 +25,7 @@ body {
t.step_func_done(function(entryList) { t.step_func_done(function(entryList) {
assert_equals(entryList.getEntries().length, 1); assert_equals(entryList.getEntries().length, 1);
const entry = entryList.getEntries()[0]; const entry = entryList.getEntries()[0];
const index = window.location.href.lastIndexOf('/'); const pathname = window.location.origin + '/element-timing/resources/square100.png';
const pathname = window.location.href.substring(0, index) +
'/resources/square100.png';
checkElement(entry, pathname, 'my_div', 'target', beforeRender, checkElement(entry, pathname, 'my_div', 'target', beforeRender,
document.getElementById('target')); document.getElementById('target'));
// The background image extends to occupy to full size of the div. // The background image extends to occupy to full size of the div.

View file

@ -25,19 +25,17 @@
// this PerformanceObserver should be notified about the previously // this PerformanceObserver should be notified about the previously
// buffered element entry // buffered element entry
new PerformanceObserver(function (entryList, observer) { new PerformanceObserver(t.step_func((entryList, observer) => {
assert_equals(entryList.getEntries().length, 1); assert_equals(entryList.getEntries().length, 1);
entryList.getEntries().forEach(function(entry) { entryList.getEntries().forEach(entry => {
assert_equals(entry.entryType, "element"); assert_equals(entry.entryType, "element");
const index = window.location.href.lastIndexOf('/'); const pathname = window.location.origin + '/element-timing/resources/square20.jpg';
const pathname = window.location.href.substring(0, index) +
'/resources/square20.jpg';
checkElement(entry, pathname, 'my_image', 'my_id', beforeRender, img); checkElement(entry, pathname, 'my_image', 'my_id', beforeRender, img);
checkNaturalSize(entry, 20, 20); checkNaturalSize(entry, 20, 20);
observer.disconnect(); observer.disconnect();
t.done(); t.done();
}); });
}).observe({ })).observe({
type: "element", type: "element",
buffered: true buffered: true
}); });

View file

@ -16,9 +16,7 @@
t.step_func_done(function(entryList) { t.step_func_done(function(entryList) {
assert_equals(entryList.getEntries().length, 1); assert_equals(entryList.getEntries().length, 1);
const entry = entryList.getEntries()[0]; const entry = entryList.getEntries()[0];
const index = window.location.href.lastIndexOf('/'); const pathname = window.location.origin + '/element-timing/resources/square100.png';
const pathname = window.location.href.substring(0, index) +
'/resources/square100.png';
// This method will check that entry.element is |img|. // This method will check that entry.element is |img|.
checkElement(entry, pathname, 'my_image', 'my_id', beforeRender, img); checkElement(entry, pathname, 'my_image', 'my_id', beforeRender, img);

View file

@ -32,12 +32,9 @@ body {
const beforeRenderTimes = []; const beforeRenderTimes = [];
let entry_count = 0; let entry_count = 0;
const entry_count_per_element = [0, 0]; const entry_count_per_element = [0, 0];
const index = window.location.href.lastIndexOf('/'); const pathname0 = window.location.origin + '/element-timing/resources/circle.svg';
const pathname0 = window.location.href.substring(0, index) + const pathname1 = window.location.origin + '/element-timing/resources/square100.png';
'/resources/circle.svg'; const observer = new PerformanceObserver(t.step_func(list => {
const pathname1 = window.location.href.substring(0, index) +
'/resources/square100.png';
const observer = new PerformanceObserver(list => {
list.getEntries().forEach(entry => { list.getEntries().forEach(entry => {
if (entry_count % 2 == 0) { if (entry_count % 2 == 0) {
checkElement(entry, pathname0, 'image0', 'image0', beforeRenderTimes[entry_count], checkElement(entry, pathname0, 'image0', 'image0', beforeRenderTimes[entry_count],
@ -61,7 +58,7 @@ body {
t.done(); t.done();
} }
}) })
}); }));
observer.observe({entryTypes: ['element']}); observer.observe({entryTypes: ['element']});
let slideIndex = 0; let slideIndex = 0;
showCarousel(); showCarousel();

View file

@ -14,9 +14,7 @@ async_test(function (t) {
t.step_func_done(function(entryList) { t.step_func_done(function(entryList) {
assert_equals(entryList.getEntries().length, 1); assert_equals(entryList.getEntries().length, 1);
const entry = entryList.getEntries()[0]; const entry = entryList.getEntries()[0];
const index = window.location.href.lastIndexOf('/'); const pathname = window.location.origin + '/element-timing/resources/circle.svg';
const pathname = window.location.href.substring(0, index) +
'/resources/circle.svg';
checkElement(entry, pathname, 'my_svg', 'SVG', beforeRender, checkElement(entry, pathname, 'my_svg', 'SVG', beforeRender,
document.getElementById('SVG')); document.getElementById('SVG'));
// Image size is 200x200 but SVG size is 100x100 so it is clipped. // Image size is 200x200 but SVG size is 100x100 so it is clipped.

View file

@ -21,9 +21,7 @@ body {
t.step_func_done(function(entryList) { t.step_func_done(function(entryList) {
assert_equals(entryList.getEntries().length, 1); assert_equals(entryList.getEntries().length, 1);
const entry = entryList.getEntries()[0]; const entry = entryList.getEntries()[0];
const index = window.location.href.lastIndexOf('/'); const pathname = window.location.origin + '/element-timing/resources/square20.png';
const pathname = window.location.href.substring(0, index) +
'/resources/square20.png';
checkElement(entry, pathname, 'not_fully_visible', '', beforeRender, img); checkElement(entry, pathname, 'not_fully_visible', '', beforeRender, img);
// Image will not be fully visible. It should start from the top left part // Image will not be fully visible. It should start from the top left part
// of the document, excluding the margin, and then overflow. // of the document, excluding the margin, and then overflow.

View file

@ -28,9 +28,7 @@ body {
t.step_func_done(function(entryList) { t.step_func_done(function(entryList) {
assert_equals(entryList.getEntries().length, 1); assert_equals(entryList.getEntries().length, 1);
const entry = entryList.getEntries()[0]; const entry = entryList.getEntries()[0];
const index = window.location.href.lastIndexOf('/'); const pathname = window.location.origin + '/images/black-rectangle.png';
const pathname = window.location.href.substring(0, index - 14) +
'images/black-rectangle.png';
checkElement(entry, pathname, 'rectangle', 'rect_id', beforeRender, checkElement(entry, pathname, 'rectangle', 'rect_id', beforeRender,
document.getElementById('rect_id')); document.getElementById('rect_id'));
checkRect(entry, [0, 200, 25, 125]); checkRect(entry, [0, 200, 25, 125]);

View file

@ -28,9 +28,7 @@ body {
t.step_func_done(function(entryList) { t.step_func_done(function(entryList) {
assert_equals(entryList.getEntries().length, 1); assert_equals(entryList.getEntries().length, 1);
const entry = entryList.getEntries()[0]; const entry = entryList.getEntries()[0];
const index = window.location.href.lastIndexOf('/'); const pathname = window.location.origin + '/images/black-rectangle.png';
const pathname = window.location.href.substring(0, index - 14) +
'images/black-rectangle.png';
checkElement(entry, pathname, 'rectangle', 'rect_id', beforeRender, checkElement(entry, pathname, 'rectangle', 'rect_id', beforeRender,
document.getElementById('rect_id')); document.getElementById('rect_id'));
checkNaturalSize(entry, 100, 50); checkNaturalSize(entry, 100, 50);

View file

@ -19,9 +19,6 @@ body {
let renderTime2; let renderTime2;
let img; let img;
let img2; let img2;
const index = window.location.href.lastIndexOf('/');
const pathname = window.location.href.substring(0, index) +
'/resources/square100.png';
async_test(function (t) { async_test(function (t) {
if (!window.PerformanceElementTiming) { if (!window.PerformanceElementTiming) {
assert_unreached("PerformanceElementTiming is not implemented"); assert_unreached("PerformanceElementTiming is not implemented");
@ -30,6 +27,7 @@ body {
t.step_func(function(entryList) { t.step_func(function(entryList) {
assert_equals(entryList.getEntries().length, 1); assert_equals(entryList.getEntries().length, 1);
const entry = entryList.getEntries()[0]; const entry = entryList.getEntries()[0];
const pathname = window.location.origin + '/element-timing/resources/square100.png';
// Easier to check the |element| attribute here since element ID is the same for both images. // Easier to check the |element| attribute here since element ID is the same for both images.
checkElement(entry, pathname, entry.identifier, 'image_id', beforeRender, null); checkElement(entry, pathname, entry.identifier, 'image_id', beforeRender, null);
checkNaturalSize(entry, 100, 100); checkNaturalSize(entry, 100, 100);

View file

@ -24,8 +24,7 @@ body {
let numObservedElements = 0; let numObservedElements = 0;
let observedCircle = false; let observedCircle = false;
let observedSquare = false; let observedSquare = false;
const index = window.location.href.lastIndexOf('/'); const pathPrefix = window.location.origin + '/element-timing/resources/';
const pathname = window.location.href.substring(0, index) + '/resources/';
let div = document.getElementById('target'); let div = document.getElementById('target');
const observer = new PerformanceObserver( const observer = new PerformanceObserver(
t.step_func(entryList => { t.step_func(entryList => {
@ -33,13 +32,13 @@ body {
numObservedElements++; numObservedElements++;
if (entry.url.endsWith('square100.png')) { if (entry.url.endsWith('square100.png')) {
observedSquare = true; observedSquare = true;
checkElement(entry, pathname + 'square100.png', 'multi', 'target', beforeRender, div); checkElement(entry, pathPrefix + 'square100.png', 'multi', 'target', beforeRender, div);
checkRect(entry, [0, 200, 0, 200]); checkRect(entry, [0, 200, 0, 200]);
checkNaturalSize(entry, 100, 100); checkNaturalSize(entry, 100, 100);
} }
else if (entry.url.endsWith('circle.svg')) { else if (entry.url.endsWith('circle.svg')) {
observedCircle = true; observedCircle = true;
checkElement(entry, pathname + 'circle.svg', 'multi', 'target', beforeRender, div); checkElement(entry, pathPrefix + 'circle.svg', 'multi', 'target', beforeRender, div);
checkRect(entry, [0, 200, 0, 200]); checkRect(entry, [0, 200, 0, 200]);
checkNaturalSize(entry, 200, 200); checkNaturalSize(entry, 200, 200);
} }

View file

@ -25,9 +25,7 @@ body {
t.step_func_done(function(entryList) { t.step_func_done(function(entryList) {
assert_equals(entryList.getEntries().length, 1); assert_equals(entryList.getEntries().length, 1);
const entry = entryList.getEntries()[0]; const entry = entryList.getEntries()[0];
const index = window.location.href.lastIndexOf('/'); const pathname = window.location.origin + '/images/black-rectangle.png';
const pathname = window.location.href.substring(0, index - 14) +
'images/black-rectangle.png';
checkElement(entry, pathname, 'my_div', 'target', beforeRender, checkElement(entry, pathname, 'my_div', 'target', beforeRender,
document.getElementById('target')); document.getElementById('target'));
checkRect(entry, [0, 100, 0, 50]); checkRect(entry, [0, 100, 0, 50]);

View file

@ -21,9 +21,7 @@ body {
t.step_func_done(function(entryList) { t.step_func_done(function(entryList) {
assert_equals(entryList.getEntries().length, 1); assert_equals(entryList.getEntries().length, 1);
const entry = entryList.getEntries()[0]; const entry = entryList.getEntries()[0];
const index = window.location.href.lastIndexOf('/'); const pathname = window.location.origin + '/element-timing/resources/square100.png';
const pathname = window.location.href.substring(0, index) +
'/resources/square100.png';
checkElement(entry, pathname, 'my_image', 'my_id', beforeRender, img); checkElement(entry, pathname, 'my_image', 'my_id', beforeRender, img);
// Assume viewport has size at least 100, so the element is fully visible. // Assume viewport has size at least 100, so the element is fully visible.
checkRect(entry, [0, 100, 0, 100]); checkRect(entry, [0, 100, 0, 100]);

View file

@ -0,0 +1,40 @@
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>Element Timing: observe with empty elementtiming attribute</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/element-timing-helpers.js"></script>
<script>
let beforeRender;
async_test(function (t) {
if (!window.PerformanceElementTiming) {
assert_unreached("PerformanceElementTiming is not implemented");
}
let observedImage = false;
let observedText = false;
const observer = new PerformanceObserver(
t.step_func(function(entryList) {
entryList.getEntries().forEach(entry => {
if (entry.name === 'image-paint') {
assert_false(observedImage, 'Image should only be observed once.');
const pathname = window.location.origin + '/element-timing/resources/square20.png';
checkElement(entry, pathname, '', 'square', beforeRender,
document.getElementById('square'));
checkNaturalSize(entry, 20, 20);
observedImage = true;
} else {
assert_false(observedText, 'Text should only be observed once.');
checkTextElement(entry, '', 'text', beforeRender, document.getElementById('text'));
observedText = true;
}
});
if (observedImage && observedText)
t.done();
})
);
observer.observe({type: 'element', buffered: true});
beforeRender = performance.now();
}, "Able to observe image and text with empty elementtiming attribute.");
</script>
<img id='square' src='resources/square20.png' elementtiming/>
<p id='text' elementtiming>Text!</p>

View file

@ -25,7 +25,6 @@ body {
if (!window.PerformanceElementTiming) { if (!window.PerformanceElementTiming) {
assert_unreached("PerformanceElementTiming is not implemented"); assert_unreached("PerformanceElementTiming is not implemented");
} }
const index = window.location.href.lastIndexOf('/');
const observer = new PerformanceObserver( const observer = new PerformanceObserver(
t.step_func(function(entryList) { t.step_func(function(entryList) {
entryList.getEntries().forEach( entry => { entryList.getEntries().forEach( entry => {
@ -35,8 +34,7 @@ body {
t.done(); t.done();
} }
image1Observed = 1; image1Observed = 1;
const pathname1 = window.location.href.substring(0, index) + const pathname1 = window.location.origin + '/element-timing/resources/square100.png';
'/resources/square100.png';
// The images do not contain ID, so expect an empty ID. // The images do not contain ID, so expect an empty ID.
checkElement(entry, pathname1, 'image1', 'img1', beforeRender, checkElement(entry, pathname1, 'image1', 'img1', beforeRender,
document.getElementById('img1')); document.getElementById('img1'));
@ -61,8 +59,7 @@ body {
t.done(); t.done();
} }
image2Observed = 1; image2Observed = 1;
const pathname2 = window.location.href.substring(0, index) + const pathname2 = window.location.origin + '/element-timing/resources/square20.png';
'/resources/square20.png';
checkElement(entry, pathname2, 'image2', 'img2', beforeRender, checkElement(entry, pathname2, 'image2', 'img2', beforeRender,
document.getElementById('img2')); document.getElementById('img2'));
// This image should be below image 1, and should respect the margin. // This image should be below image 1, and should respect the margin.
@ -75,8 +72,7 @@ body {
t.done(); t.done();
} }
image3Observed = 1; image3Observed = 1;
const pathname3 = window.location.href.substring(0, index) + const pathname3 = window.location.origin + '/element-timing/resources/circle.svg';
'/resources/circle.svg';
checkElement(entry, pathname3, 'image3', 'img3', beforeRender, checkElement(entry, pathname3, 'image3', 'img3', beforeRender,
document.getElementById('img3')); document.getElementById('img3'));
// This image is just to the right of image2. // This image is just to the right of image2.

View file

@ -14,9 +14,7 @@ async_test(function (t) {
t.step_func_done(function(entryList) { t.step_func_done(function(entryList) {
assert_equals(entryList.getEntries().length, 1); assert_equals(entryList.getEntries().length, 1);
const entry = entryList.getEntries()[0]; const entry = entryList.getEntries()[0];
const index = window.location.href.lastIndexOf('/'); const pathname = window.location.origin + '/element-timing/resources/circle.svg';
const pathname = window.location.href.substring(0, index) +
'/resources/circle.svg';
checkElement(entry, pathname, 'my_svg', 'svg_id', beforeRender, checkElement(entry, pathname, 'my_svg', 'svg_id', beforeRender,
document.getElementById('svg_id')); document.getElementById('svg_id'));
// Assume viewport has size at least 200, so the element is fully visible. // Assume viewport has size at least 200, so the element is fully visible.

View file

@ -14,9 +14,7 @@ async_test(function (t) {
t.step_func_done(function(entryList) { t.step_func_done(function(entryList) {
assert_equals(entryList.getEntries().length, 1); assert_equals(entryList.getEntries().length, 1);
const entry = entryList.getEntries()[0]; const entry = entryList.getEntries()[0];
const index = window.location.href.lastIndexOf('/'); const pathname = window.location.origin + '/element-timing/resources/circle.svg';
const pathname = window.location.href.substring(0, index) +
'/resources/circle.svg';
checkElement(entry, pathname, 'my_poster', 'the_poster', beforeRender, checkElement(entry, pathname, 'my_poster', 'the_poster', beforeRender,
document.getElementById('the_poster')); document.getElementById('the_poster'));
// Assume viewport has size at least 200, so the element is fully visible. // Assume viewport has size at least 200, so the element is fully visible.

View file

@ -23,9 +23,7 @@
t.step_func_done(function(entryList) { t.step_func_done(function(entryList) {
assert_equals(entryList.getEntries().length, 1); assert_equals(entryList.getEntries().length, 1);
const entry = entryList.getEntries()[0]; const entry = entryList.getEntries()[0];
const index = window.location.href.lastIndexOf('/'); const pathname = window.location.origin + '/element-timing/' + img_src;
const pathname = window.location.href.substring(0, index) + '/' +
img_src;
// Since the image is only fully loaded after the sleep, the render timestamp // Since the image is only fully loaded after the sleep, the render timestamp
// must be greater than |beforeRender| + |sleep|. // must be greater than |beforeRender| + |sleep|.
checkElement(entry, pathname, 'my_image', '', beforeRender + sleep, img); checkElement(entry, pathname, 'my_image', '', beforeRender + sleep, img);

View file

@ -21,10 +21,7 @@ body {
t.step_func_done(function(entryList) { t.step_func_done(function(entryList) {
assert_equals(entryList.getEntries().length, 1); assert_equals(entryList.getEntries().length, 1);
const entry = entryList.getEntries()[0]; const entry = entryList.getEntries()[0];
const index = window.location.href.lastIndexOf('/'); const pathname = window.location.origin + '/images/black-rectangle.png';
// Subtracting 14 to remove 'element-timing'.
const pathname = window.location.href.substring(0, index - 14) +
'images/black-rectangle.png';
checkElement(entry, pathname, 'my_image', 'rectangle', beforeRender, img); checkElement(entry, pathname, 'my_image', 'rectangle', beforeRender, img);
// Assume viewport has size at least 100, so the element is fully visible. // Assume viewport has size at least 100, so the element is fully visible.
checkRect(entry, [20, 120, 20, 70]); checkRect(entry, [20, 120, 20, 70]);

View file

@ -36,7 +36,6 @@ function timeOut(test, ms) {
// doesn't work well. // doesn't work well.
async function waitUntilStableAutofocusState(w) { async function waitUntilStableAutofocusState(w) {
let targetWindow = w || window; let targetWindow = w || window;
// Awaiting two animation frames is an easy way to determine autofocus state. // Awaiting one animation frame is an easy way to determine autofocus state.
await waitForAnimationFrame(targetWindow);
await waitForAnimationFrame(targetWindow); await waitForAnimationFrame(targetWindow);
} }

View file

@ -10,32 +10,30 @@
async_test(t => { async_test(t => {
t.events = []; t.events = [];
let iframe = document.createElement('iframe'); let w = window.open('/common/blank.html', 'name',
iframe.addEventListener('load', t.step_func(() => { 'width=100,height=100,menubar=no,toolbar=no,location=no');
let w = iframe.contentWindow; t.add_cleanup(() => { w.close(); });
w.requestAnimationFrame(t.step_func(() => { w.addEventListener('load', t.step_func(() => {
t.events.push('animationFrame'); w.focus();
w.requestAnimationFrame(t.step_func(() => {
t.events.push('animationFrame-should-not-be-recorded');
}));
}));
let element = w.document.createElement('input'); let element = w.document.createElement('input');
element.autofocus = true; element.autofocus = true;
element.style.marginTop = '200px'; // Setting focus causes scrolling.
element.addEventListener('focus', t.step_func(() => { element.addEventListener('focus', t.step_func(() => {
t.events.push('autofocus'); t.events.push('autofocus');
iframe.style.width = '71px';
})); }));
w.addEventListener('resize', t.step_func_done(() => { w.addEventListener('scroll', t.step_func(() => {
t.events.push('resize'); t.events.push('scroll');
assert_array_equals(t.events, ['animationFrame', 'autofocus', 'resize']); }));
w.requestAnimationFrame(t.step_func_done(() => {
t.events.push('animationFrame');
assert_array_equals(t.events, ['autofocus', 'scroll', 'animationFrame'], t.events);
})); }));
w.document.body.appendChild(element); w.document.body.appendChild(element);
})); }));
document.body.appendChild(iframe); }, '"Flush autofocus candidates" should be happen before a scroll event and ' +
}, '"Flush autofocus candidates" should be happen after the first animation ' + 'animation frame callbacks');
'frame callbacks, and before a resize event in the next iteration of ' +
'window event loop.');
</script> </script>
</body> </body>

View file

@ -14,6 +14,11 @@
var el = document.createElement("input"); var el = document.createElement("input");
el.type = type; el.type = type;
if (el.type != type) {
// Type is not supported - don't bother with the following checks.
return;
}
test(() => { test(() => {
assert_equals(el.selectionStart, null); assert_equals(el.selectionStart, null);
}, `selectionStart on an input[type=${type}] returns null`); }, `selectionStart on an input[type=${type}] returns null`);
@ -70,7 +75,7 @@
}, `selectionEnd on an input[type=${type}] returns a value`); }, `selectionEnd on an input[type=${type}] returns a value`);
test(() => { test(() => {
assert_equals(el.selectionDirection, "none"); assert_in_array(el.selectionDirection, ["forward", "none"]);
}, `selectionDirection on an input[type=${type}] returns a value`); }, `selectionDirection on an input[type=${type}] returns a value`);
test(() => { test(() => {

View file

@ -11,6 +11,14 @@ partial interface ServiceWorkerRegistration {
interface PaymentManager { interface PaymentManager {
[SameObject] readonly attribute PaymentInstruments instruments; [SameObject] readonly attribute PaymentInstruments instruments;
attribute DOMString userHint; attribute DOMString userHint;
Promise<void> enableDelegations(FrozenArray<PaymentDelegation> delegations);
};
enum PaymentDelegation {
"shippingAddress",
"payerName",
"payerPhone",
"payerEmail"
}; };
[SecureContext, Exposed=(Window,Worker)] [SecureContext, Exposed=(Window,Worker)]
@ -59,11 +67,13 @@ partial interface ServiceWorkerGlobalScope {
attribute EventHandler onpaymentrequest; attribute EventHandler onpaymentrequest;
}; };
dictionary PaymentMethodChangeResponse { dictionary PaymentRequestDetailsUpdate {
DOMString error; DOMString error;
PaymentCurrencyAmount total; PaymentCurrencyAmount total;
FrozenArray<PaymentDetailsModifier> modifiers; FrozenArray<PaymentDetailsModifier> modifiers;
FrozenArray<PaymentShippingOption> shippingOptions;
object paymentMethodErrors; object paymentMethodErrors;
AddressErrors shippingAddressErrors;
}; };
[Exposed=ServiceWorker] [Exposed=ServiceWorker]
@ -77,8 +87,12 @@ interface PaymentRequestEvent : ExtendableEvent {
readonly attribute FrozenArray<PaymentDetailsModifier> modifiers; readonly attribute FrozenArray<PaymentDetailsModifier> modifiers;
readonly attribute DOMString instrumentKey; readonly attribute DOMString instrumentKey;
readonly attribute boolean requestBillingAddress; readonly attribute boolean requestBillingAddress;
readonly attribute object? paymentOptions;
readonly attribute FrozenArray<PaymentShippingOption>? shippingOptions;
Promise<WindowClient?> openWindow(USVString url); Promise<WindowClient?> openWindow(USVString url);
Promise<PaymentMethodChangeResponse?> changePaymentMethod(DOMString methodName, optional object? methodDetails = null); Promise<PaymentRequestDetailsUpdate?> changePaymentMethod(DOMString methodName, optional object? methodDetails = null);
Promise<PaymentRequestDetailsUpdate?> changeShippingAddress(AddressInit shippingAddress);
Promise<PaymentRequestDetailsUpdate?> changeShippingOption(DOMString shippingOption);
void respondWith(Promise<PaymentHandlerResponse> handlerResponsePromise); void respondWith(Promise<PaymentHandlerResponse> handlerResponsePromise);
}; };
@ -90,9 +104,16 @@ dictionary PaymentRequestEventInit : ExtendableEventInit {
PaymentCurrencyAmount total; PaymentCurrencyAmount total;
sequence<PaymentDetailsModifier> modifiers; sequence<PaymentDetailsModifier> modifiers;
DOMString instrumentKey; DOMString instrumentKey;
PaymentOptions paymentOptions;
sequence<PaymentShippingOption> shippingOptions;
}; };
dictionary PaymentHandlerResponse { dictionary PaymentHandlerResponse {
DOMString methodName; DOMString methodName;
object details; object details;
DOMString? payerName;
DOMString? payerEmail;
DOMString? payerPhone;
AddressInit shippingAddress;
DOMString? shippingOption;
}; };

View file

@ -4,17 +4,29 @@
// Source: Wake Lock API (https://w3c.github.io/wake-lock/) // Source: Wake Lock API (https://w3c.github.io/wake-lock/)
dictionary WakeLockPermissionDescriptor : PermissionDescriptor { dictionary WakeLockPermissionDescriptor : PermissionDescriptor {
WakeLockType type; required WakeLockType type;
}; };
enum WakeLockType { "screen", "system" }; enum WakeLockType { "screen", "system" };
[SecureContext, Exposed=(DedicatedWorker, Window)] [SecureContext]
interface WakeLock { partial interface Navigator {
[Exposed=Window] static Promise<PermissionState> requestPermission(WakeLockType type); [SameObject] readonly attribute WakeLock wakeLock;
static Promise<void> request(WakeLockType type, optional WakeLockRequestOptions options = {});
}; };
dictionary WakeLockRequestOptions { [SecureContext]
AbortSignal signal; partial interface WorkerNavigator {
[SameObject] readonly attribute WakeLock wakeLock;
};
[SecureContext, Exposed=(DedicatedWorker,Window)]
interface WakeLock {
Promise<WakeLockSentinel> request(WakeLockType type);
};
[SecureContext, Exposed=(DedicatedWorker,Window)]
interface WakeLockSentinel : EventTarget {
readonly attribute WakeLockType type;
Promise<void> release();
attribute EventHandler onrelease;
}; };

View file

@ -1,7 +1,7 @@
// GENERATED CONTENT - DO NOT EDIT // GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into reffy-reports // Content was automatically extracted by Reffy into reffy-reports
// (https://github.com/tidoust/reffy-reports) // (https://github.com/tidoust/reffy-reports)
// Source: Web NFC API (https://w3c.github.io/web-nfc/) // Source: Web NFC (https://w3c.github.io/web-nfc/)
[Exposed=Window] [Exposed=Window]
interface NDEFMessage { interface NDEFMessage {

View file

@ -3,12 +3,6 @@
// (https://github.com/tidoust/reffy-reports) // (https://github.com/tidoust/reffy-reports)
// Source: WebXR Augmented Reality Module - Level 1 (https://immersive-web.github.io/webxr-ar-module/) // Source: WebXR Augmented Reality Module - Level 1 (https://immersive-web.github.io/webxr-ar-module/)
enum XRSessionMode {
"inline",
"immersive-vr",
"immersive-ar"
};
enum XREnvironmentBlendMode { enum XREnvironmentBlendMode {
"opaque", "opaque",
"alpha-blend", "alpha-blend",

View file

@ -18,7 +18,8 @@ partial interface Navigator {
enum XRSessionMode { enum XRSessionMode {
"inline", "inline",
"immersive-vr" "immersive-vr",
"immersive-ar"
}; };
dictionary XRSessionInit { dictionary XRSessionInit {

View file

@ -7,13 +7,7 @@
## Whitespace rules that we can't enforce yet ## ## Whitespace rules that we can't enforce yet ##
INDENT TABS: .gitmodules
INDENT TABS: conformance-checkers/* INDENT TABS: conformance-checkers/*
INDENT TABS: content-security-policy/*
INDENT TABS: pointerlock/*
INDENT TABS: shadow-dom/*
INDENT TABS: webaudio/*
INDENT TABS: webvtt/*
INDENT TABS: encoding/legacy*/* INDENT TABS: encoding/legacy*/*
TRAILING WHITESPACE: 2dcontext/tools/current-work-canvas.xhtml TRAILING WHITESPACE: 2dcontext/tools/current-work-canvas.xhtml
@ -76,8 +70,8 @@ SET TIMEOUT: docs/*
WEB-PLATFORM.TEST:README.md WEB-PLATFORM.TEST:README.md
WEB-PLATFORM.TEST:*/README.md WEB-PLATFORM.TEST:*/README.md
WEB-PLATFORM.TEST:docs/* WEB-PLATFORM.TEST:docs/*
INDENT TABS:docs/* CR AT EOL, INDENT TABS:docs/make.bat
CR AT EOL:docs/* INDENT TABS:docs/Makefile
## Helper scripts ## ## Helper scripts ##
@ -106,6 +100,8 @@ CR AT EOL: webvtt/parsing/file-parsing/tests/support/newlines.vtt
# Intentional use of tabs # Intentional use of tabs
INDENT TABS: html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html INDENT TABS: html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html
INDENT TABS: webvtt/parsing/file-parsing/tests/support/header-tab.vtt
INDENT TABS: webvtt/parsing/file-parsing/tests/support/whitespace-chars.vtt
# Intentional use of print statements # Intentional use of print statements
PRINT STATEMENT: dom/nodes/Document-createElement-namespace-tests/generate.py PRINT STATEMENT: dom/nodes/Document-createElement-namespace-tests/generate.py
@ -402,31 +398,22 @@ NON-EXISTENT-REF: css/CSS2/normal-flow/blocks-017.xht
## Whitespace rules that we can't enforce yet ## Whitespace rules that we can't enforce yet
INDENT TABS: css/compositing/* INDENT TABS: css/compositing/*
INDENT TABS: css/CSS2/* INDENT TABS: css/CSS2/*
INDENT TABS: css/css-align/*
INDENT TABS: css/css-backgrounds/* INDENT TABS: css/css-backgrounds/*
INDENT TABS: css/css-color/* INDENT TABS: css/css-color/*
INDENT TABS: css/css-conditional/* INDENT TABS: css/css-conditional/*
INDENT TABS: css/css-counter-styles/*
INDENT TABS: css/css-flexbox/* INDENT TABS: css/css-flexbox/*
INDENT TABS: css/css-fonts/* INDENT TABS: css/css-fonts/*
INDENT TABS: css/css-grid/* INDENT TABS: css/css-images/support/1x1-green.svg
INDENT TABS: css/css-images/*
INDENT TABS: css/css-lists/*
INDENT TABS: css/css-masking/* INDENT TABS: css/css-masking/*
INDENT TABS: css/css-multicol/* INDENT TABS: css/css-multicol/*
INDENT TABS: css/css-page/* INDENT TABS: css/css-page/*
INDENT TABS: css/css-pseudo/*
INDENT TABS: css/css-regions/* INDENT TABS: css/css-regions/*
INDENT TABS: css/css-round-display/* INDENT TABS: css/css-round-display/*
INDENT TABS: css/css-shapes/*
INDENT TABS: css/css-speech/*
INDENT TABS: css/css-text/* INDENT TABS: css/css-text/*
INDENT TABS: css/css-text-decor/* INDENT TABS: css/css-text-decor/*
INDENT TABS: css/css-transforms/* INDENT TABS: css/css-transforms/*
INDENT TABS: css/css-transitions/*
INDENT TABS: css/css-ui/* INDENT TABS: css/css-ui/*
INDENT TABS: css/css-values/* INDENT TABS: css/css-values/*
INDENT TABS: css/css-variables/*
INDENT TABS: css/css-writing-modes/* INDENT TABS: css/css-writing-modes/*
INDENT TABS: css/filter-effects/* INDENT TABS: css/filter-effects/*
INDENT TABS: css/mediaqueries/* INDENT TABS: css/mediaqueries/*

View file

@ -1,14 +1,14 @@
'use strict'; 'use strict';
function toMojoNFCPushTarget(target) { function toMojoNDEFPushTarget(target) {
switch (target) { switch (target) {
case 'peer': case 'peer':
return device.mojom.NFCPushTarget.PEER; return device.mojom.NDEFPushTarget.PEER;
case 'tag': case 'tag':
return device.mojom.NFCPushTarget.TAG; return device.mojom.NDEFPushTarget.TAG;
} }
return device.mojom.NFCPushTarget.ANY; return device.mojom.NDEFPushTarget.ANY;
} }
// Converts between NDEFMessageInit https://w3c.github.io/web-nfc/#dom-ndefmessage // Converts between NDEFMessageInit https://w3c.github.io/web-nfc/#dom-ndefmessage
@ -65,9 +65,9 @@ function compareNDEFRecords(providedRecord, receivedRecord) {
new Uint8Array(receivedRecord.data)); new Uint8Array(receivedRecord.data));
} }
// Compares NFCPushOptions structures that were provided to API and // Compares NDEFPushOptions structures that were provided to API and
// received by the mock mojo service. // received by the mock mojo service.
function assertNFCPushOptionsEqual(provided, received) { function assertNDEFPushOptionsEqual(provided, received) {
if (provided.ignoreRead !== undefined) if (provided.ignoreRead !== undefined)
assert_equals(provided.ignoreRead, !!received.ignoreRead); assert_equals(provided.ignoreRead, !!received.ignoreRead);
else else
@ -79,14 +79,14 @@ function assertNFCPushOptionsEqual(provided, received) {
assert_equals(received.timeout, Infinity); assert_equals(received.timeout, Infinity);
if (provided.target !== undefined) if (provided.target !== undefined)
assert_equals(toMojoNFCPushTarget(provided.target), received.target); assert_equals(toMojoNDEFPushTarget(provided.target), received.target);
else else
assert_equals(received.target, device.mojom.NFCPushTarget.ANY); assert_equals(received.target, device.mojom.NDEFPushTarget.ANY);
} }
// Compares NFCReaderOptions structures that were provided to API and // Compares NDEFReaderOptions structures that were provided to API and
// received by the mock mojo service. // received by the mock mojo service.
function assertNFCReaderOptionsEqual(provided, received) { function assertNDEFReaderOptionsEqual(provided, received) {
if (provided.url !== undefined) if (provided.url !== undefined)
assert_equals(provided.url, received.url); assert_equals(provided.url, received.url);
else else
@ -103,7 +103,7 @@ function assertNFCReaderOptionsEqual(provided, received) {
} }
} }
// Checks whether NFCReaderOptions are matched with given message. // Checks whether NDEFReaderOptions are matched with given message.
function matchesWatchOptions(message, options) { function matchesWatchOptions(message, options) {
// Filter by Web NFC id. // Filter by Web NFC id.
if (!matchesWebNfcId(message.url, options.url)) return false; if (!matchesWebNfcId(message.url, options.url)) return false;
@ -150,9 +150,9 @@ function matchesWebNfcId(id, pattern) {
return true; return true;
} }
function createNFCError(type) { function createNDEFError(type) {
return { error: type ? return { error: type ?
new device.mojom.NFCError({ errorType: type }) : null }; new device.mojom.NDEFError({ errorType: type }) : null };
} }
var WebNFCTest = (() => { var WebNFCTest = (() => {
@ -201,21 +201,21 @@ var WebNFCTest = (() => {
// Resolve with TimeoutError, else pend push operation. // Resolve with TimeoutError, else pend push operation.
if (this.push_should_timeout_) { if (this.push_should_timeout_) {
resolve( resolve(
createNFCError(device.mojom.NFCErrorType.TIMER_EXPIRED)); createNDEFError(device.mojom.NDEFErrorType.TIMER_EXPIRED));
} }
} else { } else {
resolve(createNFCError(null)); resolve(createNDEFError(null));
} }
}); });
} }
async cancelPush(target) { async cancelPush(target) {
if (this.push_options_ && ((target === device.mojom.NFCPushTarget.ANY) || if (this.push_options_ && ((target === device.mojom.NDEFPushTarget.ANY) ||
(this.push_options_.target === target))) { (this.push_options_.target === target))) {
this.cancelPendingPushOperation(); this.cancelPendingPushOperation();
} }
return createNFCError(null); return createNDEFError(null);
} }
setClient(client) { setClient(client) {
@ -241,33 +241,33 @@ var WebNFCTest = (() => {
} }
} }
return createNFCError(null); return createNDEFError(null);
} }
async cancelWatch(id) { async cancelWatch(id) {
let index = this.watchers_.findIndex(value => value.id === id); let index = this.watchers_.findIndex(value => value.id === id);
if (index === -1) { if (index === -1) {
return createNFCError(device.mojom.NFCErrorType.NOT_FOUND); return createNDEFError(device.mojom.NDEFErrorType.NOT_FOUND);
} }
this.watchers_.splice(index, 1); this.watchers_.splice(index, 1);
return createNFCError(null); return createNDEFError(null);
} }
async cancelAllWatches() { async cancelAllWatches() {
if (this.watchers_.length === 0) { if (this.watchers_.length === 0) {
return createNFCError(device.mojom.NFCErrorType.NOT_FOUND); return createNDEFError(device.mojom.NDEFErrorType.NOT_FOUND);
} }
this.watchers_.splice(0, this.watchers_.length); this.watchers_.splice(0, this.watchers_.length);
return createNFCError(null); return createNDEFError(null);
} }
getHWError() { getHWError() {
if (this.hw_status_ === NFCHWStatus.DISABLED) if (this.hw_status_ === NFCHWStatus.DISABLED)
return createNFCError(device.mojom.NFCErrorType.NOT_READABLE); return createNDEFError(device.mojom.NDEFErrorType.NOT_READABLE);
if (this.hw_status_ === NFCHWStatus.NOT_SUPPORTED) if (this.hw_status_ === NFCHWStatus.NOT_SUPPORTED)
return createNFCError(device.mojom.NFCErrorType.NOT_SUPPORTED); return createNDEFError(device.mojom.NDEFErrorType.NOT_SUPPORTED);
return null; return null;
} }
@ -306,7 +306,7 @@ var WebNFCTest = (() => {
cancelPendingPushOperation() { cancelPendingPushOperation() {
if (this.pending_promise_func_) { if (this.pending_promise_func_) {
this.pending_promise_func_( this.pending_promise_func_(
createNFCError(device.mojom.NFCErrorType.OPERATION_CANCELLED)); createNDEFError(device.mojom.NDEFErrorType.OPERATION_CANCELLED));
} }
this.pushed_message_ = null; this.pushed_message_ = null;
@ -321,7 +321,7 @@ var WebNFCTest = (() => {
this.reading_messages_.push(message); this.reading_messages_.push(message);
// Ignore reading if NFC operation is suspended. // Ignore reading if NFC operation is suspended.
if(this.operations_suspended_) return; if(this.operations_suspended_) return;
// Ignore reading if NFCPushOptions.ignoreRead is true. // Ignore reading if NDEFPushOptions.ignoreRead is true.
if(this.push_options_ && this.push_options_.ignoreRead) if(this.push_options_ && this.push_options_.ignoreRead)
return; return;
// Triggers onWatch if the new message matches existing watchers. // Triggers onWatch if the new message matches existing watchers.
@ -359,7 +359,7 @@ var WebNFCTest = (() => {
} }
// Resumes pending push operation. // Resumes pending push operation.
if (this.pending_promise_func_) { if (this.pending_promise_func_) {
this.pending_promise_func_(createNFCError(null)); this.pending_promise_func_(createNDEFError(null));
} }
} }
} }

View file

@ -1,10 +1,19 @@
// Adapter for testharness.js-style tests with Service Workers // Adapter for testharness.js-style tests with Service Workers
function service_worker_unregister_and_register(test, url, scope) { /**
* @param options an object that represents RegistrationOptions except for scope.
* @param options.type a WorkerType.
* @param options.updateViaCache a ServiceWorkerUpdateViaCache.
* @see https://w3c.github.io/ServiceWorker/#dictdef-registrationoptions
*/
function service_worker_unregister_and_register(test, url, scope, options) {
if (!scope || scope.length == 0) if (!scope || scope.length == 0)
return Promise.reject(new Error('tests must define a scope')); return Promise.reject(new Error('tests must define a scope'));
var options = { scope: scope }; if (options && options.scope)
return Promise.reject(new Error('scope must not be passed in options'));
options = Object.assign({ scope: scope }, options);
return service_worker_unregister(test, scope) return service_worker_unregister(test, scope)
.then(function() { .then(function() {
return navigator.serviceWorker.register(url, options); return navigator.serviceWorker.register(url, options);

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AllowRemoteAutomation</key>
<true/>
</dict>
</plist>

View file

@ -10,7 +10,7 @@ jobs:
displayName: 'wpt.fyi hook: ${{ parameters.artifactName }}' displayName: 'wpt.fyi hook: ${{ parameters.artifactName }}'
dependsOn: ${{ parameters.dependsOn }} dependsOn: ${{ parameters.dependsOn }}
pool: pool:
vmImage: 'ubuntu-16.04' vmImage: 'ubuntu-18.04'
steps: steps:
- checkout: none - checkout: none
- script: curl -f -s -S -d "artifact=${{ parameters.artifactName }}" -X POST https://wpt.fyi/api/checks/azure/$(Build.BuildId) - script: curl -f -s -S -d "artifact=${{ parameters.artifactName }}" -X POST https://wpt.fyi/api/checks/azure/$(Build.BuildId)

View file

@ -5,14 +5,16 @@ parameters:
steps: steps:
- ${{ if eq(parameters.channel, 'preview') }}: - ${{ if eq(parameters.channel, 'preview') }}:
- script: | - script: |
# Pinned to Safari Technology Preview version 94. HOMEBREW_NO_AUTO_UPDATE=1 brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask-versions/master/Casks/safari-technology-preview.rb
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask-versions/02e2aff2d578cc7d8545cf035bffa45293bb1de1/Casks/safari-technology-preview.rb
sudo "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --enable sudo "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --enable
defaults write com.apple.SafariTechnologyPreview WebKitJavaScriptCanOpenWindowsAutomatically 1 defaults write com.apple.SafariTechnologyPreview WebKitJavaScriptCanOpenWindowsAutomatically 1
defaults write com.apple.SafariTechnologyPreview ExperimentalServerTimingEnabled 1 defaults write com.apple.SafariTechnologyPreview ExperimentalServerTimingEnabled 1
displayName: 'Install Safari Technology Preview' displayName: 'Install Safari Technology Preview'
- ${{ if eq(parameters.channel, 'stable') }}: - ${{ if eq(parameters.channel, 'stable') }}:
- script: | - script: |
sudo safaridriver --enable # Workaround for `sudo safardriver --enable` not working:
# https://github.com/web-platform-tests/wpt/issues/19845
mkdir -p ~/Library/WebDriver/
cp tools/ci/azure/com.apple.Safari.plist ~/Library/WebDriver/
defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically 1 defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically 1
displayName: 'Configure Safari' displayName: 'Configure Safari'

View file

@ -3,6 +3,7 @@ import logging
import os import os
import subprocess import subprocess
import sys import sys
import tempfile
import requests import requests
@ -164,9 +165,7 @@ def should_dry_run():
def main(): def main():
dry_run = should_dry_run() dry_run = should_dry_run()
manifest_path = os.path.expanduser(os.path.join("~", "meta", "MANIFEST.json")) manifest_path = os.path.join(tempfile.mkdtemp(), "MANIFEST.json")
os.makedirs(os.path.dirname(manifest_path))
create_manifest(manifest_path) create_manifest(manifest_path)

View file

@ -1,8 +1,8 @@
#!/usr/bin/env python #!/usr/bin/env python
"""Wrapper script for running jobs in TaskCluster """Wrapper script for running jobs in Taskcluster
This is intended for running test jobs in TaskCluster. The script This is intended for running test jobs in Taskcluster. The script
takes a two positional arguments which are the name of the test job takes a two positional arguments which are the name of the test job
and the script to actually run. and the script to actually run.

View file

@ -34,7 +34,7 @@ def gzip_file(filename, delete_original=True):
def main(product, commit_range, wpt_args): def main(product, commit_range, wpt_args):
"""Invoke the `wpt run` command according to the needs of the TaskCluster """Invoke the `wpt run` command according to the needs of the Taskcluster
continuous integration service.""" continuous integration service."""
logger = logging.getLogger("tc-run") logger = logging.getLogger("tc-run")

View file

@ -19,7 +19,7 @@ def get_parser():
help="Log type to fetch") help="Log type to fetch")
parser.add_argument("--repo-name", action="store", default="web-platform-tests/wpt", parser.add_argument("--repo-name", action="store", default="web-platform-tests/wpt",
help="GitHub repo name in the format owner/repo. " help="GitHub repo name in the format owner/repo. "
"This must be the repo from which the TaskCluster run was scheduled " "This must be the repo from which the Taskcluster run was scheduled "
"(for PRs this is the repo into which the PR would merge)") "(for PRs this is the repo into which the PR would merge)")
parser.add_argument("--token-file", action="store", parser.add_argument("--token-file", action="store",
help="File containing GitHub token") help="File containing GitHub token")
@ -70,7 +70,7 @@ def run(*args, **kwargs):
taskgroups.add(taskgroup_id) taskgroups.add(taskgroup_id)
if not taskgroups: if not taskgroups:
logger.error("No complete TaskCluster runs found for ref %s" % kwargs["ref"]) logger.error("No complete Taskcluster runs found for ref %s" % kwargs["ref"])
return 1 return 1
for taskgroup in taskgroups: for taskgroup in taskgroups:

View file

@ -623,6 +623,7 @@ class ChromeAndroidBase(Browser):
def __init__(self, logger): def __init__(self, logger):
super(ChromeAndroidBase, self).__init__(logger) super(ChromeAndroidBase, self).__init__(logger)
self.device_serial = None
def install(self, dest=None, channel=None): def install(self, dest=None, channel=None):
raise NotImplementedError raise NotImplementedError
@ -646,7 +647,10 @@ class ChromeAndroidBase(Browser):
self.logger.warning("No package name provided.") self.logger.warning("No package name provided.")
return None return None
command = ['adb', 'shell', 'dumpsys', 'package', binary] command = ['adb']
if self.device_serial:
command.extend(['-s', self.device_serial])
command.extend(['shell', 'dumpsys', 'package', binary])
try: try:
output = call(*command) output = call(*command)
except (subprocess.CalledProcessError, OSError): except (subprocess.CalledProcessError, OSError):
@ -687,7 +691,10 @@ class AndroidWebview(ChromeAndroidBase):
# For WebView, it is not trivial to change the WebView provider, so # For WebView, it is not trivial to change the WebView provider, so
# we will just grab whatever is available. # we will just grab whatever is available.
# https://chromium.googlesource.com/chromium/src/+/HEAD/android_webview/docs/channels.md # https://chromium.googlesource.com/chromium/src/+/HEAD/android_webview/docs/channels.md
command = ['adb', 'shell', 'dumpsys', 'webviewupdate'] command = ['adb']
if self.device_serial:
command.extend(['-s', self.device_serial])
command.extend(['shell', 'dumpsys', 'webviewupdate'])
try: try:
output = call(*command) output = call(*command)
except (subprocess.CalledProcessError, OSError): except (subprocess.CalledProcessError, OSError):

View file

@ -354,6 +354,8 @@ class ChromeAndroid(BrowserSetup):
browser_cls = browser.ChromeAndroid browser_cls = browser.ChromeAndroid
def setup_kwargs(self, kwargs): def setup_kwargs(self, kwargs):
if kwargs.get("device_serial"):
self.browser.device_serial = kwargs["device_serial"]
browser_channel = kwargs["browser_channel"] browser_channel = kwargs["browser_channel"]
if kwargs["package_name"] is None: if kwargs["package_name"] is None:
kwargs["package_name"] = self.browser.find_binary( kwargs["package_name"] = self.browser.find_binary(
@ -398,6 +400,8 @@ class AndroidWebview(BrowserSetup):
browser_cls = browser.AndroidWebview browser_cls = browser.AndroidWebview
def setup_kwargs(self, kwargs): def setup_kwargs(self, kwargs):
if kwargs.get("device_serial"):
self.browser.device_serial = kwargs["device_serial"]
if kwargs["webdriver_binary"] is None: if kwargs["webdriver_binary"] is None:
webdriver_binary = self.browser.find_webdriver() webdriver_binary = self.browser.find_webdriver()

View file

@ -31,6 +31,7 @@ def check_args(**kwargs):
def browser_kwargs(test_type, run_info_data, config, **kwargs): def browser_kwargs(test_type, run_info_data, config, **kwargs):
return {"package_name": kwargs["package_name"], return {"package_name": kwargs["package_name"],
"device_serial": kwargs["device_serial"],
"webdriver_binary": kwargs["webdriver_binary"], "webdriver_binary": kwargs["webdriver_binary"],
"webdriver_args": kwargs.get("webdriver_args")} "webdriver_args": kwargs.get("webdriver_args")}
@ -53,6 +54,9 @@ def executor_kwargs(test_type, server_config, cache_manager, run_info_data,
assert kwargs["package_name"], "missing --package-name" assert kwargs["package_name"], "missing --package-name"
executor_kwargs["capabilities"]["goog:chromeOptions"]["androidPackage"] = \ executor_kwargs["capabilities"]["goog:chromeOptions"]["androidPackage"] = \
kwargs["package_name"] kwargs["package_name"]
if kwargs.get("device_serial"):
executor_kwargs["capabilities"]["goog:chromeOptions"]["androidDeviceSerial"] = \
kwargs["device_serial"]
return executor_kwargs return executor_kwargs
@ -72,17 +76,22 @@ class ChromeAndroidBrowser(Browser):
""" """
def __init__(self, logger, package_name, webdriver_binary="chromedriver", def __init__(self, logger, package_name, webdriver_binary="chromedriver",
webdriver_args=None): device_serial=None, webdriver_args=None):
Browser.__init__(self, logger) Browser.__init__(self, logger)
self.package_name = package_name self.package_name = package_name
self.device_serial = device_serial
self.server = ChromeDriverServer(self.logger, self.server = ChromeDriverServer(self.logger,
binary=webdriver_binary, binary=webdriver_binary,
args=webdriver_args) args=webdriver_args)
self.setup_adb_reverse() self.setup_adb_reverse()
def _adb_run(self, args): def _adb_run(self, args):
self.logger.info('adb ' + ' '.join(args)) cmd = ['adb']
subprocess.check_call(['adb'] + args) if self.device_serial:
cmd.extend(['-s', self.device_serial])
cmd.extend(args)
self.logger.info(' '.join(cmd))
subprocess.check_call(cmd)
def setup_adb_reverse(self): def setup_adb_reverse(self):
self._adb_run(['wait-for-device']) self._adb_run(['wait-for-device'])

View file

@ -304,6 +304,11 @@ class RefTestImplementation(object):
assert relation in ("==", "!=") assert relation in ("==", "!=")
if not fuzzy or fuzzy == ((0,0), (0,0)): if not fuzzy or fuzzy == ((0,0), (0,0)):
equal = hashes[0] == hashes[1] equal = hashes[0] == hashes[1]
# sometimes images can have different hashes, but pixels can be identical.
if not equal:
self.logger.info("Image hashes didn't match, checking pixel differences")
max_per_channel, pixels_different = self.get_differences(screenshots)
equal = pixels_different == 0 and max_per_channel == 0
else: else:
max_per_channel, pixels_different = self.get_differences(screenshots) max_per_channel, pixels_different = self.get_differences(screenshots)
allowed_per_channel, allowed_different = fuzzy allowed_per_channel, allowed_different = fuzzy

View file

@ -122,7 +122,7 @@
"href": "gopher://example.net:1234", "href": "gopher://example.net:1234",
"new_value": "file", "new_value": "file",
"expected": { "expected": {
"href": "gopher://example.net:1234/", "href": "gopher://example.net:1234",
"protocol": "gopher:" "protocol": "gopher:"
} }
}, },
@ -212,7 +212,7 @@
}, },
{ {
"href": "ssh://me@example.net", "href": "ssh://me@example.net",
"new_value": "gopher", "new_value": "https",
"expected": { "expected": {
"href": "ssh://me@example.net", "href": "ssh://me@example.net",
"protocol": "ssh:" "protocol": "ssh:"

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