Sync WPT with upstream (06-04-2025) (#36369)

Automated downstream sync of changes from upstream as of 06-04-2025
[no-wpt-sync]

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
This commit is contained in:
Servo WPT Sync 2025-04-06 06:11:16 +02:00 committed by GitHub
parent b4fd9ebb0e
commit bd43b78735
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
708 changed files with 15442 additions and 3379 deletions

File diff suppressed because it is too large Load diff

View file

@ -412,3 +412,36 @@
[CSS Transitions: property <line-height> from [14q\] to [normal\] at (0.3) should be [14q\]]
expected: FAIL
[Web Animations: property <line-height> from [1\] to [200%\] at (-0.3) should be [1\]]
expected: FAIL
[Web Animations: property <line-height> from [1\] to [200%\] at (0) should be [1\]]
expected: FAIL
[Web Animations: property <line-height> from [1\] to [200%\] at (0.3) should be [1\]]
expected: FAIL
[Web Animations: property <line-height> from [1\] to [200%\] at (0.5) should be [200%\]]
expected: FAIL
[Web Animations: property <line-height> from [1\] to [200%\] at (0.6) should be [200%\]]
expected: FAIL
[Web Animations: property <line-height> from [1\] to [200%\] at (1) should be [200%\]]
expected: FAIL
[Web Animations: property <line-height> from [1\] to [200%\] at (1.5) should be [200%\]]
expected: FAIL
[Web Animations: property <line-height> from [100%\] to [200%\] at (0) should be [100%\]]
expected: FAIL
[Web Animations: property <line-height> from [100%\] to [200%\] at (0.3) should be [130%\]]
expected: FAIL
[Web Animations: property <line-height> from [100%\] to [200%\] at (0.6) should be [160%\]]
expected: FAIL
[Web Animations: property <line-height> from [100%\] to [200%\] at (1) should be [200%\]]
expected: FAIL

View file

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

File diff suppressed because it is too large Load diff

View file

@ -45,3 +45,30 @@
[corner-shape-render-fuzzy.html?corner-top-left-shape=bevel&border-radius=40px&border-width=10px]
expected: FAIL
[corner-shape-render-fuzzy.html?corner-shape=superellipse(3)&border-radius=40px&box-shadow=10px 10px 0 10px black]
expected: FAIL
[corner-shape-render-fuzzy.html?corner-shape=superellipse(-7)&border-radius=20%&border-width=20px]
expected: FAIL
[corner-shape-render-fuzzy.html?corner-top-left-shape=superellipse(-4)&border-radius=40%]
expected: FAIL
[corner-shape-render-fuzzy.html?border-radius=40%&corner-shape=notch&box-shadow=10px%2010px%200%2010px%20yellow]
expected: FAIL
[corner-shape-render-fuzzy.html?corner-shape=superellipse(-2)&border-radius=20%&border-width=20px]
expected: FAIL
[corner-shape-render-fuzzy.html?border-radius=30%&corner-shape=superellipse(-1.5)&box-shadow=10px%2010px%200%2010px%20black]
expected: FAIL
[corner-shape-render-fuzzy.html?corner-shape=superellipse(5)&border-radius=20%&border-width=20px]
expected: FAIL
[corner-shape-render-fuzzy.html?corner-top-left-shape=superellipse(2.5)&border-radius=20%&border-width=10px]
expected: FAIL
[corner-shape-render-fuzzy.html?corner-shape=superellipse(0.8)&border-radius=40px&border-width=10px&border-left-color=purple]
expected: FAIL

View file

@ -57,3 +57,33 @@
[corner-shape-render-precise.html?corner-top-left-shape=bevel&border-radius=40px]
expected: FAIL
[corner-shape-render-precise.html?corner-bottom-right-shape=superellipse(0.8)&border-bottom-right-radius=50%]
expected: FAIL
[corner-shape-render-precise.html?corner-top-left-shape=superellipse(0.5)&border-radius=40px]
expected: FAIL
[corner-shape-render-precise.html?corner-shape=square&border-bottom-left-radius=5px]
expected: FAIL
[corner-shape-render-precise.html?corner-top-left-shape=superellipse(-0.5)&border-radius=40px]
expected: FAIL
[corner-shape-render-precise.html?corner-shape=superellipse(3)&border-top-right-radius=33px]
expected: FAIL
[corner-shape-render-precise.html?corner-top-left-shape=superellipse(-4)&border-radius=40px]
expected: FAIL
[corner-shape-render-precise.html?corner-shape=superellipse(2.3)&border-radius=40%]
expected: FAIL
[corner-shape-render-precise.html?corner-top-right-shape=superellipse(-4)&border-top-right-radius=50px]
expected: FAIL
[corner-shape-render-precise.html?border-radius=50%&corner-shape=bevel&box-shadow=10px%2010px%200%2010px%20black]
expected: FAIL
[corner-shape-render-precise.html?border-top-left-radius=50%&corner-shape=superellipse(0.7)&border-left-width=30px&border-top-width=30px]
expected: FAIL

View file

@ -0,0 +1,2 @@
[corner-shape-square.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[corner-shape-straight.html]
expected: FAIL

View file

@ -88,3 +88,27 @@
[Property corner-shape value 'superellipse(0.5) superellipse(3) superellipse(1) superellipse(infinity)']
expected: FAIL
[Property corner-top-left-shape value 'superellipse(-infinity)']
expected: FAIL
[Property corner-top-left-shape value 'superellipse( -1)']
expected: FAIL
[Property corner-shape value 'superellipse(-5) superellipse(3) superellipse(7) superellipse(-5.5)']
expected: FAIL
[Property corner-shape value 'bevel superellipse(1)']
expected: FAIL
[Property corner-shape value 'superellipse(-1) superellipse(3) square']
expected: FAIL
[Property corner-shape value 'superellipse(-1) superellipse(3) superellipse(0)']
expected: FAIL
[Property corner-shape value 'bevel superellipse(1) squircle round']
expected: FAIL
[Property corner-shape value 'superellipse(-1) superellipse(3) superellipse(0) superellipse(infinity)']
expected: FAIL

View file

@ -376,3 +376,105 @@
[e.style['corner-shape'\] = "superellipse(0.5) superellipse(3) superellipse(1) superellipse(infinity)" should set the property value]
expected: FAIL
[e.style['corner-top-left-shape'\] = "square" should set the property value]
expected: FAIL
[e.style['corner-top-left-shape'\] = "superellipse(-infinity)" should set the property value]
expected: FAIL
[e.style['corner-top-left-shape'\] = "superellipse(-0.5)" should set the property value]
expected: FAIL
[e.style['corner-top-left-shape'\] = "superellipse(-4)" should set the property value]
expected: FAIL
[e.style['corner-top-right-shape'\] = "square" should set the property value]
expected: FAIL
[e.style['corner-top-right-shape'\] = "superellipse(-infinity)" should set the property value]
expected: FAIL
[e.style['corner-top-right-shape'\] = "superellipse(-0.5)" should set the property value]
expected: FAIL
[e.style['corner-top-right-shape'\] = "superellipse(-4)" should set the property value]
expected: FAIL
[e.style['corner-bottom-left-shape'\] = "square" should set the property value]
expected: FAIL
[e.style['corner-bottom-left-shape'\] = "superellipse(-infinity)" should set the property value]
expected: FAIL
[e.style['corner-bottom-left-shape'\] = "superellipse(-0.5)" should set the property value]
expected: FAIL
[e.style['corner-bottom-left-shape'\] = "superellipse(-4)" should set the property value]
expected: FAIL
[e.style['corner-bottom-right-shape'\] = "square" should set the property value]
expected: FAIL
[e.style['corner-bottom-right-shape'\] = "superellipse(-infinity)" should set the property value]
expected: FAIL
[e.style['corner-bottom-right-shape'\] = "superellipse(-0.5)" should set the property value]
expected: FAIL
[e.style['corner-bottom-right-shape'\] = "superellipse(-4)" should set the property value]
expected: FAIL
[e.style['corner-start-start-shape'\] = "square" should set the property value]
expected: FAIL
[e.style['corner-start-start-shape'\] = "superellipse(-infinity)" should set the property value]
expected: FAIL
[e.style['corner-start-start-shape'\] = "superellipse(-0.5)" should set the property value]
expected: FAIL
[e.style['corner-start-start-shape'\] = "superellipse(-4)" should set the property value]
expected: FAIL
[e.style['corner-start-end-shape'\] = "square" should set the property value]
expected: FAIL
[e.style['corner-start-end-shape'\] = "superellipse(-infinity)" should set the property value]
expected: FAIL
[e.style['corner-start-end-shape'\] = "superellipse(-0.5)" should set the property value]
expected: FAIL
[e.style['corner-start-end-shape'\] = "superellipse(-4)" should set the property value]
expected: FAIL
[e.style['corner-end-start-shape'\] = "square" should set the property value]
expected: FAIL
[e.style['corner-end-start-shape'\] = "superellipse(-infinity)" should set the property value]
expected: FAIL
[e.style['corner-end-start-shape'\] = "superellipse(-0.5)" should set the property value]
expected: FAIL
[e.style['corner-end-start-shape'\] = "superellipse(-4)" should set the property value]
expected: FAIL
[e.style['corner-end-end-shape'\] = "square" should set the property value]
expected: FAIL
[e.style['corner-end-end-shape'\] = "superellipse(-infinity)" should set the property value]
expected: FAIL
[e.style['corner-end-end-shape'\] = "superellipse(-0.5)" should set the property value]
expected: FAIL
[e.style['corner-end-end-shape'\] = "superellipse(-4)" should set the property value]
expected: FAIL
[e.style['corner-shape'\] = "superellipse(0.5) superellipse(3) square" should set the property value]
expected: FAIL
[e.style['corner-shape'\] = "superellipse(-0.5) superellipse(3) square superellipse(-30)" should set the property value]
expected: FAIL

View file

@ -25,3 +25,6 @@
[e.style['animation-timing-function'\] = "steps(calc(1), jump-none)" should set the property value]
expected: FAIL
[e.style['animation-timing-function'\] = "cubic-bezier(0, sibling-index(), 1, sign(2em - 20px))" should set the property value]
expected: FAIL

View file

@ -1,2 +0,0 @@
[font-variant-emoji-004.html]
expected: FAIL

View file

@ -10,3 +10,15 @@
[Property font-variation-settings value '"wght" sibling-index()']
expected: FAIL
[e.style['font-variation-settings'\] = "\\"wght\\" calc(10)" should set the property value]
expected: FAIL
[e.style['font-variation-settings'\] = "\\"wght\\" sign(2px)" should set the property value]
expected: FAIL
[Property font-variation-settings value '"wght" calc(10)']
expected: FAIL
[Property font-variation-settings value '"wght" sign(2px)']
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-stretch-computed.html]
[Property font-stretch value 'calc(100% + (sign(20cqw - 10px) * 5%))']
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-stretch-valid.html]
[e.style['font-stretch'\] = "calc(100% + (sign(20cqw - 10px) * 5%))" should set the property value]
expected: FAIL

View file

@ -0,0 +1,48 @@
[font-width-computed.html]
[Property font-width value 'ultra-condensed']
expected: FAIL
[Property font-width value 'extra-condensed']
expected: FAIL
[Property font-width value 'condensed']
expected: FAIL
[Property font-width value 'semi-condensed']
expected: FAIL
[Property font-width value 'normal']
expected: FAIL
[Property font-width value 'semi-expanded']
expected: FAIL
[Property font-width value 'expanded']
expected: FAIL
[Property font-width value 'extra-expanded']
expected: FAIL
[Property font-width value 'ultra-expanded']
expected: FAIL
[Property font-width value '234.5%']
expected: FAIL
[Property font-width value 'calc(100%)']
expected: FAIL
[Property font-width value 'calc(0%)']
expected: FAIL
[Property font-width value 'calc(-100%)']
expected: FAIL
[Property font-width value 'calc(100% + 100%)']
expected: FAIL
[Property font-width value 'calc(100% + (sign(20cqw - 10px) * 5%))']
expected: FAIL
[Property font-stretch value 'calc(100% + (sign(20cqw - 10px) * 5%))']
expected: FAIL

View file

@ -0,0 +1,48 @@
[font-width-valid.html]
[e.style['font-width'\] = "normal" should set the property value]
expected: FAIL
[e.style['font-width'\] = "ultra-condensed" should set the property value]
expected: FAIL
[e.style['font-width'\] = "extra-condensed" should set the property value]
expected: FAIL
[e.style['font-width'\] = "condensed" should set the property value]
expected: FAIL
[e.style['font-width'\] = "semi-condensed" should set the property value]
expected: FAIL
[e.style['font-width'\] = "semi-expanded" should set the property value]
expected: FAIL
[e.style['font-width'\] = "expanded" should set the property value]
expected: FAIL
[e.style['font-width'\] = "extra-expanded" should set the property value]
expected: FAIL
[e.style['font-width'\] = "ultra-expanded" should set the property value]
expected: FAIL
[e.style['font-width'\] = "234.5%" should set the property value]
expected: FAIL
[e.style['font-width'\] = "calc(100%)" should set the property value]
expected: FAIL
[e.style['font-width'\] = "calc(0%)" should set the property value]
expected: FAIL
[e.style['font-width'\] = "calc(-100%)" should set the property value]
expected: FAIL
[e.style['font-width'\] = "calc(100% + 100%)" should set the property value]
expected: FAIL
[e.style['font-width'\] = "calc(100% + (sign(20cqw - 10px) * 5%))" should set the property value]
expected: FAIL
[e.style['font-stretch'\] = "calc(100% + (sign(20cqw - 10px) * 5%))" should set the property value]
expected: FAIL

View file

@ -0,0 +1,2 @@
[grid-gap-decorations-016.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[grid-gap-decorations-017.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[grid-gap-decorations-018.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[grid-gap-decorations-019.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[conic-gradient-angle-negative.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[conic-gradient-angle.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[conic-gradient-center.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[multiple-position-color-stop-conic.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[normalization-conic-2.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[normalization-conic-degenerate.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[normalization-conic.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[out-of-range-color-stop-conic.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[tiled-conic-gradients.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[block-ellipsis-013.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[block-ellipsis-014.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[block-ellipsis-015.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[block-ellipsis-016.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[block-ellipsis-017.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[block-ellipsis-018.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[block-ellipsis-019.tentative.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[block-ellipsis-020.tentative.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[block-ellipsis-021.tentative.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[root-scroll-button.html]
expected: FAIL

View file

@ -0,0 +1,3 @@
[interactivity-inert-all.tentative.html]
[The 'all' shorthand should not set 'interactivity']
expected: FAIL

View file

@ -2,3 +2,5 @@
[The style attribute must return a CSSStyleDeclaration block]
expected: FAIL
[The style attribute must return a CSSFontFaceDescriptors block]
expected: FAIL

View file

@ -0,0 +1,21 @@
[getComputedStyle-resolved-min-size-auto.html]
[Resolved value of min-width & min-height 'auto' keyword behaves as expected on element with id="block-box"]
expected: FAIL
[Resolved value of min-width & min-height 'auto' keyword behaves as expected on element with id="inline-box"]
expected: FAIL
[Resolved value of min-width & min-height 'auto' keyword behaves as expected on element with id="display-none"]
expected: FAIL
[Resolved value of min-width & min-height 'auto' keyword behaves as expected on element with id="display-none-valid-aspect-ratio"]
expected: FAIL
[Resolved value of min-width & min-height 'auto' keyword behaves as expected on element with id="display-none-subtree-valid-aspect-ratio"]
expected: FAIL
[Resolved value of min-width & min-height 'auto' keyword behaves as expected on element with id="display-none-subtree-flex-item"]
expected: FAIL
[Resolved value of min-width & min-height 'auto' keyword behaves as expected on element with id="display-none-subtree-grid-item"]
expected: FAIL

View file

@ -571,3 +571,78 @@
[CSSPageDescriptors interface: attribute page-orientation]
expected: FAIL
[CSSPageDescriptors must be primary interface of sheet.cssRules[2\].style]
expected: FAIL
[CSSPageDescriptors interface: sheet.cssRules[2\].style must inherit property "margin" with the proper type]
expected: FAIL
[CSSPageDescriptors interface: sheet.cssRules[2\].style must inherit property "marginTop" with the proper type]
expected: FAIL
[CSSPageDescriptors interface: sheet.cssRules[2\].style must inherit property "marginRight" with the proper type]
expected: FAIL
[CSSPageDescriptors interface: sheet.cssRules[2\].style must inherit property "marginBottom" with the proper type]
expected: FAIL
[CSSPageDescriptors interface: sheet.cssRules[2\].style must inherit property "marginLeft" with the proper type]
expected: FAIL
[CSSPageDescriptors interface: sheet.cssRules[2\].style must inherit property "margin-top" with the proper type]
expected: FAIL
[CSSPageDescriptors interface: sheet.cssRules[2\].style must inherit property "margin-right" with the proper type]
expected: FAIL
[CSSPageDescriptors interface: sheet.cssRules[2\].style must inherit property "margin-bottom" with the proper type]
expected: FAIL
[CSSPageDescriptors interface: sheet.cssRules[2\].style must inherit property "margin-left" with the proper type]
expected: FAIL
[CSSPageDescriptors interface: sheet.cssRules[2\].style must inherit property "size" with the proper type]
expected: FAIL
[CSSPageDescriptors interface: sheet.cssRules[2\].style must inherit property "pageOrientation" with the proper type]
expected: FAIL
[CSSPageDescriptors interface: sheet.cssRules[2\].style must inherit property "page-orientation" with the proper type]
expected: FAIL
[CSSPageDescriptors interface: sheet.cssRules[2\].style must inherit property "marks" with the proper type]
expected: FAIL
[CSSPageDescriptors interface: sheet.cssRules[2\].style must inherit property "bleed" with the proper type]
expected: FAIL
[CSSStyleProperties must be primary interface of sheet.cssRules[4\].style]
expected: FAIL
[CSSStyleProperties interface: sheet.cssRules[4\].style must inherit property "cssFloat" with the proper type]
expected: FAIL
[CSSStyleProperties must be primary interface of sheet.cssRules[2\].cssRules[0\].style]
expected: FAIL
[CSSStyleProperties interface: sheet.cssRules[2\].cssRules[0\].style must inherit property "cssFloat" with the proper type]
expected: FAIL
[CSSStyleProperties must be primary interface of style_element.style]
expected: FAIL
[Stringification of style_element.style]
expected: FAIL
[CSSStyleProperties must be primary interface of svg_element.style]
expected: FAIL
[CSSStyleProperties interface: svg_element.style must inherit property "cssFloat" with the proper type]
expected: FAIL
[CSSStyleProperties must be primary interface of getComputedStyle(svg_element)]
expected: FAIL
[Stringification of getComputedStyle(svg_element)]
expected: FAIL

View file

@ -52,3 +52,6 @@
[sec-fetch-storage-access - Cross-site]
expected: FAIL
[sec-fetch-user]
expected: FAIL

View file

@ -1,8 +1,5 @@
[serviceworker.https.sub.html]
expected: ERROR
[sec-fetch-site - Same origin, no options - registration]
expected: FAIL
[sec-fetch-site - Same origin, no options - updating]
expected: NOTRUN

View file

@ -0,0 +1,3 @@
[008.html]
[Link with onclick form submit to javascript url and href navigation ]
expected: FAIL

View file

@ -2,8 +2,5 @@
[window.open]
expected: FAIL
[form submission]
expected: FAIL
[link click]
expected: FAIL

View file

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

View file

@ -0,0 +1,2 @@
[2d.canvas.host.size.large.html]
expected: CRASH

View file

@ -22,3 +22,6 @@
[Scrolling should still occur when beforematch sets visiblity:hidden on the target element.]
expected: FAIL
[The hidden attribute should still be set inside the beforematch event handler.]
expected: FAIL

View file

@ -0,0 +1,3 @@
[document-with-fragment-valid.html]
[Autofocus elements in top-level browsing context's documents with URL fragments should be skipped.]
expected: FAIL

View file

@ -1,5 +1,4 @@
[supported-elements.html]
expected: TIMEOUT
[Contenteditable element should support autofocus]
expected: FAIL
@ -10,7 +9,7 @@
expected: FAIL
[Area element should support autofocus]
expected: NOTRUN
expected: FAIL
[Host element with delegatesFocus should support autofocus]
expected: FAIL

View file

@ -7,12 +7,3 @@
[Import of import of non-CSS stylesheet]
expected: FAIL
[Load of http:// stylesheet]
expected: FAIL
[Import of http:// stylesheet]
expected: FAIL
[Import of import of http:// stylesheet]
expected: FAIL

View file

@ -1,4 +1,4 @@
[iframe_sandbox_popups_escaping-1.html]
expected: TIMEOUT
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
expected: TIMEOUT
expected: FAIL

View file

@ -1,4 +1,4 @@
[iframe_sandbox_popups_escaping-3.html]
expected: TIMEOUT
expected: CRASH
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
expected: FAIL

View file

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

View file

@ -1,4 +1,4 @@
[iframe_sandbox_popups_nonescaping-2.html]
expected: CRASH
expected: TIMEOUT
[Check that popups from a sandboxed iframe do not escape the sandbox]
expected: FAIL
expected: NOTRUN

View file

@ -1,3 +0,0 @@
[form-submit-iframe-then-location-navigate.html]
[Verifies that location navigations take precedence when following form submissions.]
expected: FAIL

View file

@ -0,0 +1,4 @@
[reparent-form-during-planned-navigation-task.html]
expected: TIMEOUT
[reparent-form-during-planned-navigation-task]
expected: TIMEOUT

View file

@ -1,3 +1,3 @@
[no-end-tag-no-contents.tentative.html]
[no-children-rendered.tentative.html]
[The permission element should have no end tag or contents]
expected: FAIL

View file

@ -0,0 +1,39 @@
[type-supported-feature-detect.tentative.html]
[Test HTMLPermissionElement and isTypeSupported existence]
expected: FAIL
[Test HTMLPermissionElement should support type geolocation]
expected: FAIL
[Test HTMLPermissionElement should support type camera]
expected: FAIL
[Test HTMLPermissionElement should support type microphone]
expected: FAIL
[Test HTMLPermissionElement should support type camera microphone ]
expected: FAIL
[Test HTMLPermissionElement should support type microphone camera ]
expected: FAIL
[Test HTMLPermissionElement should support type camera camera microphone]
expected: FAIL
[Test HTMLPermissionElement should support type microphone microphone camera ]
expected: FAIL
[Test HTMLPermissionElement should not support type invalid]
expected: FAIL
[Test HTMLPermissionElement should not support type cameraa]
expected: FAIL
[Test HTMLPermissionElement should not support type microphone geolocation]
expected: FAIL
[Test HTMLPermissionElement should not support type camera geolocation]
expected: FAIL
[Test HTMLPermissionElement should not support type camera geolocation microphone]
expected: FAIL

View file

@ -1,25 +1,25 @@
[audio-tag.https.html]
expected: TIMEOUT
[Mixed-Content: Expects blocked for audio-tag to cross-http origin and keep-scheme redirection from https context.]
expected: FAIL
expected: TIMEOUT
[Mixed-Content: Expects blocked for audio-tag to cross-http origin and no-redirect redirection from https context.]
expected: FAIL
expected: NOTRUN
[Mixed-Content: Expects blocked for audio-tag to cross-http origin and swap-scheme redirection from https context.]
expected: FAIL
expected: NOTRUN
[Mixed-Content: Expects blocked for audio-tag to cross-https origin and swap-scheme redirection from https context.]
expected: FAIL
expected: NOTRUN
[Mixed-Content: Expects blocked for audio-tag to same-http origin and keep-scheme redirection from https context.]
expected: FAIL
expected: NOTRUN
[Mixed-Content: Expects blocked for audio-tag to same-http origin and no-redirect redirection from https context.]
expected: FAIL
expected: NOTRUN
[Mixed-Content: Expects blocked for audio-tag to same-http origin and swap-scheme redirection from https context.]
expected: FAIL
expected: NOTRUN
[Mixed-Content: Expects blocked for audio-tag to same-https origin and swap-scheme redirection from https context.]
expected: FAIL
expected: NOTRUN

View file

@ -0,0 +1,3 @@
[eventloop.html]
[test0: multiple notifications inside same event loop]
expected: FAIL

View file

@ -108,21 +108,6 @@
[Window interface: attribute caches]
expected: FAIL
[ServiceWorkerContainer interface: operation register((TrustedScriptURL or USVString), optional RegistrationOptions)]
expected: TIMEOUT
[NavigationPreloadManager interface: operation enable()]
expected: TIMEOUT
[NavigationPreloadManager interface: operation disable()]
expected: TIMEOUT
[NavigationPreloadManager interface: operation setHeaderValue(ByteString)]
expected: TIMEOUT
[NavigationPreloadManager interface: operation getState()]
expected: TIMEOUT
[idlharness.https.any.serviceworker.html]
expected: ERROR

View file

@ -0,0 +1,30 @@
[client-url-creation-url.https.html]
[No navigation creation URL is same as window URL]
expected: FAIL
[Fragment only navigation doesn't change creation URL]
expected: FAIL
[Pushstate doesn't change creation URL]
expected: FAIL
[Replacestate doesn't change creation URL]
expected: FAIL
[Going back over pushstate to other pushstate via back]
expected: FAIL
[Query navigation changes creation URL]
expected: FAIL
[Reloading doesn't change creation URL]
expected: FAIL
[Reloading pushstate URL changes creation URL]
expected: FAIL
[Going back over pushstate to creation URL]
expected: FAIL
[Going back to new document changes creation URL]
expected: FAIL

View file

@ -21,3 +21,9 @@
[close.any.shadowrealm-in-shadowrealm.html]
expected: ERROR
[close.any.worker.html]
expected: CRASH
[close.any.html]
expected: CRASH

View file

@ -29,3 +29,6 @@
[directive "require-trusted-types-for 'invalid' 'script' 'also-invalid" (unknown sink group)]
expected: NOTRUN
[directive "require-trusted-types-for unquoted-invalid 'script' also-unquoted-invalid (unknown sink group)]
expected: NOTRUN

View file

@ -1,13 +1,13 @@
[trusted-types-navigation.html]
expected: TIMEOUT
[Navigate a window via anchor with javascript:-urls in enforcing mode.]
expected: TIMEOUT
expected: FAIL
[Navigate a window via anchor with javascript:-urls w/ default policy in enforcing mode.]
expected: NOTRUN
expected: FAIL
[Navigate a window via anchor with javascript:-urls in report-only mode.]
expected: NOTRUN
expected: TIMEOUT
[Navigate a window via anchor with javascript:-urls w/ default policy in report-only mode.]
expected: NOTRUN

View file

@ -0,0 +1,37 @@
[trusted-types-reporting-clipping-of-sample.html]
expected: TIMEOUT
[Clipping of violation sample for createPolicy(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA)]
expected: TIMEOUT
[Clipping of violation sample for Element.innerHTML = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"]
expected: NOTRUN
[Clipping of violation sample for createPolicy(BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB)]
expected: NOTRUN
[Clipping of violation sample for Element.innerHTML = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"]
expected: NOTRUN
[Clipping of violation sample for createPolicy(CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC)]
expected: NOTRUN
[Clipping of violation sample for Element.innerHTML = "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"]
expected: NOTRUN
[Clipping of violation sample for createPolicy(ÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐ)]
expected: NOTRUN
[Clipping of violation sample for Element.innerHTML = "ÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐ"]
expected: NOTRUN
[Clipping of violation sample for createPolicy(ÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉ)]
expected: NOTRUN
[Clipping of violation sample for Element.innerHTML = "ÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉ"]
expected: NOTRUN
[Clipping of violation sample for createPolicy(℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉)]
expected: NOTRUN
[Clipping of violation sample for Element.innerHTML = "℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉℉"]
expected: NOTRUN

View file

@ -0,0 +1,25 @@
[trusted-types-reporting-clipping-of-sample.tentative.html]
expected: TIMEOUT
[Clipping of violation sample for createPolicy(𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆)]
expected: TIMEOUT
[Clipping of violation sample for Element.innerHTML = "𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆𝐆"]
expected: NOTRUN
[Clipping of violation sample for createPolicy(H𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇)]
expected: NOTRUN
[Clipping of violation sample for Element.innerHTML = "H𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇𝐇"]
expected: NOTRUN
[Clipping of violation sample for createPolicy(𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈I)]
expected: NOTRUN
[Clipping of violation sample for Element.innerHTML = "𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈𝐈I"]
expected: NOTRUN
[Clipping of violation sample for createPolicy(𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉)]
expected: NOTRUN
[Clipping of violation sample for Element.innerHTML = "𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉𝐉"]
expected: NOTRUN

View file

@ -1,5 +1,4 @@
[realtimeanalyser-fft-scaling.html]
expected: TIMEOUT
[X 2048-point FFT peak position is not equal to 64. Got 0.]
expected: FAIL

View file

@ -718,3 +718,15 @@
[X SNR (55.28431859691825 dB) is not greater than or equal to 65.737. Got 55.28431859691825.]
expected: FAIL
[X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[14680\]\t-3.8465124000000000e+7\t2.0512369275093079e-1\t3.8465124205123693e+7\t1.8752160557010618e+8\t3.8985999999999999e-3\n\t[14681\]\t1.1480505578219891e-2\t1.4340442419052124e-1\t1.3192391861230135e-1\t9.1994315626575540e-1\t3.8985999999999999e-3\n\tMax AbsError of 3.8465124205123693e+7 at index of 14680.\n\tMax RelError of 1.8752160557010618e+8 at index of 14680.\n]
expected: FAIL
[X SNR (-108.26725683849378 dB) is not greater than or equal to 65.737. Got -108.26725683849378.]
expected: FAIL
[X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[14680\]\t1.6520574524194816e+17\t2.0512369275093079e-1\t1.6520574524194816e+17\t8.0539572502015859e+17\t3.8985999999999999e-3\n\t[14681\]\t1.1480505578219891e-2\t1.4340442419052124e-1\t1.3192391861230135e-1\t9.1994315626575540e-1\t3.8985999999999999e-3\n\tMax AbsError of 1.6520574524194816e+17 at index of 14680.\n\tMax RelError of 8.0539572502015859e+17 at index of 14680.\n]
expected: FAIL
[X SNR (-300.92641698386234 dB) is not greater than or equal to 65.737. Got -300.92641698386234.]
expected: FAIL

View file

@ -0,0 +1,2 @@
[Worker-constructor.html]
expected: ERROR

View file

@ -71,7 +71,7 @@ jobs:
displayName: './wpt test-jobs'
condition: eq(variables['Build.Reason'], 'PullRequest')
pool:
vmImage: 'ubuntu-20.04'
vmImage: 'ubuntu-24.04'
steps:
- task: UsePythonVersion@0
inputs:

View file

@ -57,7 +57,7 @@ tasks:
owner: ${owner}
source: ${event.repository.clone_url}
payload:
image: ghcr.io/web-platform-tests/wpt:1
image: ghcr.io/web-platform-tests/wpt:2
maxRunTime: 7200
artifacts:
public/results:

View file

@ -0,0 +1,207 @@
// META: global=window,worker
// META: title=IndexedDB: Exceptions thrown during key conversion
// META: script=resources/support.js
// META: timeout=long
'use strict';
// Convenience function for tests that only need to run code in onupgradeneeded.
function indexeddb_upgrade_only_test(upgrade_callback, description) {
indexeddb_test(upgrade_callback, t => t.done(), description);
}
// Key that throws during conversion.
function throwing_key(name) {
const throws = [];
throws.length = 1;
const err = new Error('throwing from getter');
err.name = name;
Object.defineProperty(throws, '0', {
get: function() {
throw err;
},
enumerable: true,
});
return [throws, err];
}
const valid_key = [];
const invalid_key = {};
// Calls method on receiver with the specified number of args (default 1)
// and asserts that the method fails appropriately (rethrowing if
// conversion throws, or DataError if not a valid key), and that
// the first argument is fully processed before the second argument
// (if appropriate).
function check_method(receiver, method, args) {
args = args || 1;
if (args < 2) {
const [key, err] = throwing_key('getter');
assert_throws_exactly(err, () => {
receiver[method](key);
}, 'key conversion with throwing getter should rethrow');
assert_throws_dom('DataError', () => {
receiver[method](invalid_key);
}, 'key conversion with invalid key should throw DataError');
} else {
const [key1, err1] = throwing_key('getter 1');
const [key2, err2] = throwing_key('getter 2');
assert_throws_exactly(err1, () => {
receiver[method](key1, key2);
}, 'first key conversion with throwing getter should rethrow');
assert_throws_dom('DataError', () => {
receiver[method](invalid_key, key2);
}, 'first key conversion with invalid key should throw DataError');
assert_throws_exactly(err2, () => {
receiver[method](valid_key, key2);
}, 'second key conversion with throwing getter should rethrow');
assert_throws_dom('DataError', () => {
receiver[method](valid_key, invalid_key);
}, 'second key conversion with invalid key should throw DataError');
}
}
// Static key comparison utility on IDBFactory.
test(
t => check_method(indexedDB, 'cmp', 2),
'IDBFactory cmp() static with throwing/invalid keys');
// Continue methods on IDBCursor.
indexeddb_upgrade_only_test((t, db) => {
const store = db.createObjectStore('store');
store.put('a', 1).onerror = t.unreached_func('put should succeed');
const request = store.openCursor();
request.onerror = t.unreached_func('openCursor should succeed');
request.onsuccess = t.step_func(() => {
const cursor = request.result;
assert_not_equals(cursor, null, 'cursor should find a value');
check_method(cursor, 'continue');
});
}, 'IDBCursor continue() method with throwing/invalid keys');
indexeddb_upgrade_only_test((t, db) => {
const store = db.createObjectStore('store');
const index = store.createIndex('index', 'prop');
store.put({prop: 'a'}, 1).onerror = t.unreached_func('put should succeed');
const request = index.openCursor();
request.onerror = t.unreached_func('openCursor should succeed');
request.onsuccess = t.step_func(() => {
const cursor = request.result;
assert_not_equals(cursor, null, 'cursor should find a value');
check_method(cursor, 'continuePrimaryKey', 2);
});
}, null, 'IDBCursor continuePrimaryKey() method with throwing/invalid keys');
// Mutation methods on IDBCursor.
indexeddb_upgrade_only_test((t, db) => {
const store = db.createObjectStore('store', {keyPath: 'prop'});
store.put({prop: 1}).onerror = t.unreached_func('put should succeed');
const request = store.openCursor();
request.onerror = t.unreached_func('openCursor should succeed');
request.onsuccess = t.step_func(() => {
const cursor = request.result;
assert_not_equals(cursor, null, 'cursor should find a value');
const value = {};
let err;
[value.prop, err] = throwing_key('getter');
assert_throws_exactly(err, () => {
cursor.update(value);
}, 'throwing getter should rethrow during clone');
// Throwing from the getter during key conversion is
// not possible since (1) a clone is used, (2) only own
// properties are cloned, and (3) only own properties
// are used for key path evaluation.
value.prop = invalid_key;
assert_throws_dom('DataError', () => {
cursor.update(value);
}, 'key conversion with invalid key should throw DataError');
});
}, 'IDBCursor update() method with throwing/invalid keys');
// Static constructors on IDBKeyRange
['only', 'lowerBound', 'upperBound'].forEach((method) => {
test(
t => check_method(IDBKeyRange, method),
'IDBKeyRange ' + method + '() static with throwing/invalid keys');
});
test(
t => check_method(IDBKeyRange, 'bound', 2),
'IDBKeyRange bound() static with throwing/invalid keys');
// Insertion methods on IDBObjectStore.
['add', 'put'].forEach((method) => {
indexeddb_upgrade_only_test((t, db) => {
const out_of_line = db.createObjectStore('out-of-line keys');
const in_line = db.createObjectStore('in-line keys', {keyPath: 'prop'});
let [key, err] = throwing_key('getter');
assert_throws_exactly(err, () => {
out_of_line[method]('value', key);
}, 'key conversion with throwing getter should rethrow');
assert_throws_dom('DataError', () => {
out_of_line[method]('value', invalid_key);
}, 'key conversion with invalid key should throw DataError');
const value = {};
[value.prop, err] = throwing_key('getter');
assert_throws_exactly(err, () => {
in_line[method](value);
}, 'throwing getter should rethrow during clone');
// Throwing from the getter during key conversion is
// not possible since (1) a clone is used, (2) only own
// properties are cloned, and (3) only own properties
// are used for key path evaluation.
value.prop = invalid_key;
assert_throws_dom('DataError', () => {
in_line[method](value);
}, 'key conversion with invalid key should throw DataError');
}, `IDBObjectStore ${method}() method with throwing/invalid keys`);
});
// Generic (key-or-key-path) methods on IDBObjectStore.
['delete',
'get',
'getKey',
'getAll',
'getAllKeys',
'count',
'openCursor',
'openKeyCursor',
].forEach(method => {
indexeddb_upgrade_only_test((t, db) => {
const store = db.createObjectStore('store');
check_method(store, method);
}, `IDBObjectStore ${method}() method with throwing/invalid keys`);
});
// Generic (key-or-key-path) methods on IDBIndex.
['get',
'getKey',
'getAll',
'getAllKeys',
'count',
'openCursor',
'openKeyCursor',
].forEach((method) => {
indexeddb_upgrade_only_test((t, db) => {
const store = db.createObjectStore('store');
const index = store.createIndex('index', 'keyPath');
check_method(index, method);
}, `IDBIndex ${method}() method with throwing/invalid keys`);
});

View file

@ -1,199 +0,0 @@
<!doctype html>
<meta charset=utf-8>
<title>IndexedDB: Exceptions thrown during key conversion</title>
<meta name=timeout content=long>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/support.js"></script>
<script>
// Convenience function for tests that only need to run code in onupgradeneeded.
function indexeddb_upgrade_only_test(upgrade_callback, description) {
indexeddb_test(upgrade_callback, t => { t.done(); }, description);
}
// Key that throws during conversion.
function throwing_key(name) {
var throws = [];
throws.length = 1;
const err = new Error('throwing from getter');
err.name = name;
Object.defineProperty(throws, '0', {get: function() {
throw err;
}, enumerable: true});
return [throws, err];
}
var valid_key = [];
var invalid_key = {};
// Calls method on receiver with the specified number of args (default 1)
// and asserts that the method fails appropriately (rethrowing if
// conversion throws, or DataError if not a valid key), and that
// the first argument is fully processed before the second argument
// (if appropriate).
function check_method(receiver, method, args) {
args = args || 1;
if (args < 2) {
const [key, err] = throwing_key('getter');
assert_throws_exactly(err, () => {
receiver[method](key);
}, 'key conversion with throwing getter should rethrow');
assert_throws_dom('DataError', () => {
receiver[method](invalid_key);
}, 'key conversion with invalid key should throw DataError');
} else {
const [key1, err1] = throwing_key('getter 1');
const [key2, err2] = throwing_key('getter 2');
assert_throws_exactly(err1, () => {
receiver[method](key1, key2);
}, 'first key conversion with throwing getter should rethrow');
assert_throws_dom('DataError', () => {
receiver[method](invalid_key, key2);
}, 'first key conversion with invalid key should throw DataError');
assert_throws_exactly(err2, () => {
receiver[method](valid_key, key2);
}, 'second key conversion with throwing getter should rethrow');
assert_throws_dom('DataError', () => {
receiver[method](valid_key, invalid_key);
}, 'second key conversion with invalid key should throw DataError');
}
}
// Static key comparison utility on IDBFactory.
test(t => {
check_method(indexedDB, 'cmp', 2);
}, 'IDBFactory cmp() static with throwing/invalid keys');
// Continue methods on IDBCursor.
indexeddb_upgrade_only_test((t, db) => {
var store = db.createObjectStore('store');
store.put('a', 1).onerror = t.unreached_func('put should succeed');
var request = store.openCursor();
request.onerror = t.unreached_func('openCursor should succeed');
request.onsuccess = t.step_func(() => {
var cursor = request.result;
assert_not_equals(cursor, null, 'cursor should find a value');
check_method(cursor, 'continue');
});
}, 'IDBCursor continue() method with throwing/invalid keys');
indexeddb_upgrade_only_test((t, db) => {
var store = db.createObjectStore('store');
var index = store.createIndex('index', 'prop');
store.put({prop: 'a'}, 1).onerror = t.unreached_func('put should succeed');
var request = index.openCursor();
request.onerror = t.unreached_func('openCursor should succeed');
request.onsuccess = t.step_func(() => {
var cursor = request.result;
assert_not_equals(cursor, null, 'cursor should find a value');
check_method(cursor, 'continuePrimaryKey', 2);
});
}, null, 'IDBCursor continuePrimaryKey() method with throwing/invalid keys');
// Mutation methods on IDBCursor.
indexeddb_upgrade_only_test((t, db) => {
var store = db.createObjectStore('store', {keyPath: 'prop'});
store.put({prop: 1}).onerror = t.unreached_func('put should succeed');
var request = store.openCursor();
request.onerror = t.unreached_func('openCursor should succeed');
request.onsuccess = t.step_func(() => {
var cursor = request.result;
assert_not_equals(cursor, null, 'cursor should find a value');
var value = {};
var err;
[value.prop, err] = throwing_key('getter');
assert_throws_exactly(err, () => {
cursor.update(value);
}, 'throwing getter should rethrow during clone');
// Throwing from the getter during key conversion is
// not possible since (1) a clone is used, (2) only own
// properties are cloned, and (3) only own properties
// are used for key path evaluation.
value.prop = invalid_key;
assert_throws_dom('DataError', () => {
cursor.update(value);
}, 'key conversion with invalid key should throw DataError');
});
}, 'IDBCursor update() method with throwing/invalid keys');
// Static constructors on IDBKeyRange
['only', 'lowerBound', 'upperBound'].forEach(method => {
test(t => {
check_method(IDBKeyRange, method);
}, 'IDBKeyRange ' + method + '() static with throwing/invalid keys');
});
test(t => {
check_method(IDBKeyRange, 'bound', 2);
}, 'IDBKeyRange bound() static with throwing/invalid keys');
// Insertion methods on IDBObjectStore.
['add', 'put'].forEach(method => {
indexeddb_upgrade_only_test((t, db) => {
var out_of_line = db.createObjectStore('out-of-line keys');
var in_line = db.createObjectStore('in-line keys', {keyPath: 'prop'});
var [key, err] = throwing_key('getter');
assert_throws_exactly(err, () => {
out_of_line[method]('value', key);
}, 'key conversion with throwing getter should rethrow');
assert_throws_dom('DataError', () => {
out_of_line[method]('value', invalid_key);
}, 'key conversion with invalid key should throw DataError');
var value = {};
[value.prop, err] = throwing_key('getter');
assert_throws_exactly(err, () => {
in_line[method](value);
}, 'throwing getter should rethrow during clone');
// Throwing from the getter during key conversion is
// not possible since (1) a clone is used, (2) only own
// properties are cloned, and (3) only own properties
// are used for key path evaluation.
value.prop = invalid_key;
assert_throws_dom('DataError', () => {
in_line[method](value);
}, 'key conversion with invalid key should throw DataError');
}, `IDBObjectStore ${method}() method with throwing/invalid keys`);
});
// Generic (key-or-key-path) methods on IDBObjectStore.
[
'delete', 'get', 'getKey', 'getAll', 'getAllKeys', 'count', 'openCursor',
'openKeyCursor'
].forEach(method => {
indexeddb_upgrade_only_test((t, db) => {
var store = db.createObjectStore('store');
check_method(store, method);
}, `IDBObjectStore ${method}() method with throwing/invalid keys`);
});
// Generic (key-or-key-path) methods on IDBIndex.
[
'get', 'getKey', 'getAll', 'getAllKeys', 'count', 'openCursor',
'openKeyCursor'
].forEach(method => {
indexeddb_upgrade_only_test((t, db) => {
var store = db.createObjectStore('store');
var index = store.createIndex('index', 'keyPath');
check_method(index, method);
}, `IDBIndex ${method}() method with throwing/invalid keys`);
});
</script>

View file

@ -0,0 +1,134 @@
// META: global=window,worker
// META: title=Invalid key
// META: script=resources/support.js
// Spec: https://w3c.github.io/IndexedDB/#key-construct
'use strict';
const invalid_key = (desc, key) => {
async_test(t => {
const db = createdb_for_multiple_tests();
let objStore = null;
let objStore2 = null;
const is_cloneable = o => {
try {
self.postMessage(o, '*');
return true;
} catch (ex) {
return false;
}
};
db.setTest(t).onupgradeneeded = t.step_func(e => {
objStore = objStore || e.target.result.createObjectStore('store');
assert_throws_dom('DataError', () => {
objStore.add('value', key);
});
if (is_cloneable(key)) {
objStore2 = objStore2 || e.target.result.createObjectStore('store2', {
keyPath: ['x', 'keypath'],
});
assert_throws_dom('DataError', () => {
objStore.add('value', key);
});
}
t.done();
});
}, 'Invalid key - ' + desc);
};
const fake_array = {
length: 0,
constructor: Array,
};
const ArrayClone = function() {};
ArrayClone.prototype = Array;
const ArrayClone_instance = new ArrayClone();
// booleans
invalid_key('true', true);
invalid_key('false', false);
// null/NaN/undefined
invalid_key('null', null);
invalid_key('NaN', NaN);
invalid_key('undefined', undefined);
invalid_key('undefined2');
// functions
invalid_key('function() {}', function() {});
// objects
invalid_key('{}', {});
invalid_key('{ obj: 1 }', {obj: 1});
invalid_key('Math', Math);
invalid_key('self', self);
invalid_key('{length:0,constructor:Array}', fake_array);
invalid_key('Array clones instance', ArrayClone_instance);
invalid_key('Array (object)', Array);
invalid_key('String (object)', String);
invalid_key('new String()', new String());
invalid_key('new Number()', new Number());
invalid_key('new Boolean()', new Boolean());
// arrays
invalid_key('[{}]', [{}]);
invalid_key('[[], [], [], [[ Date ]]]', [[], [], [], [[Date]]]);
invalid_key('[undefined]', [undefined]);
invalid_key('[,1]', [, 1]);
if (typeof document !== 'undefined') {
invalid_key(
'document.getElementsByTagName("script")',
document.getElementsByTagName('script'));
}
// dates
invalid_key('new Date(NaN)', new Date(NaN));
invalid_key('new Date(Infinity)', new Date(Infinity));
// regexes
invalid_key('/foo/', /foo/);
invalid_key('new RegExp()', new RegExp());
const sparse = [];
sparse[10] = 'hei';
invalid_key('sparse array', sparse);
const sparse2 = [];
sparse2[0] = 1;
sparse2[''] = 2;
sparse2[2] = 3;
invalid_key('sparse array 2', sparse2);
invalid_key('[[1], [3], [7], [[ sparse array ]]]', [
[1],
[3],
[7],
[[sparse2]],
]);
// sparse3
invalid_key('[1,2,3,,]', [
1,
2,
3,
,
]);
const recursive = [];
recursive.push(recursive);
invalid_key('array directly contains self', recursive);
const recursive2 = [];
recursive2.push([recursive2]);
invalid_key('array indirectly contains self', recursive2);
const recursive3 = [recursive];
invalid_key('array member contains self', recursive3);
invalid_key('proxy of an array', new Proxy([1, 2, 3], {}));

View file

@ -1,131 +0,0 @@
<!DOCTYPE html>
<!-- Submitted from TestTWF Paris -->
<meta charset=utf-8">
<title>Invalid key</title>
<link rel=help href="http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#key-construct">
<link rel=assert title="A value is said to be a valid key if it is one of the following types: Array JavaScript objects [ECMA-262], DOMString [WEBIDL], Date [ECMA-262] or float [WEBIDL]. However Arrays are only valid keys if every item in the array is defined and is a valid key (i.e. sparse arrays can not be valid keys) and if the Array doesn't directly or indirectly contain itself. Any non-numeric properties are ignored, and thus does not affect whether the Array is a valid key. Additionally, if the value is of type float, it is only a valid key if it is not NaN, and if the value is of type Date it is only a valid key if its [[PrimitiveValue]] internal property, as defined by [ECMA-262], is not NaN. Conforming user agents must support all valid keys as keys.">
<!-- original author -->
<link rel=author href="mailto:odinho@opera.com" title="Odin Hørthe Omdal">
<!-- some additions by Baptiste Fontaine (batifon@yahoo.fr) -->
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=resources/support.js></script>
<script>
var db = createdb_for_multiple_tests(),
// cache for ObjectStores
objStore = null,
objStore2 = null;
function is_cloneable(o) {
try {
self.postMessage(o, '*');
return true;
} catch (ex) {
return false;
}
}
function invalid_key(desc, key) {
var t = async_test(document.title + " - " + desc);
// set the current test, and run it
db.setTest(t).onupgradeneeded = function(e) {
objStore = objStore || e.target.result.createObjectStore("store");
assert_throws_dom('DataError', function() {
objStore.add("value", key);
});
if (is_cloneable(key)) {
objStore2 = objStore2 || e.target.result.createObjectStore("store2", { keyPath: ["x", "keypath"] });
assert_throws_dom('DataError', function() {
objStore2.add({ x: "value", keypath: key });
});
}
this.done();
};
}
var fake_array = {
length : 0,
constructor : Array
};
var ArrayClone = function(){};
ArrayClone.prototype = Array;
var ArrayClone_instance = new ArrayClone();
// booleans
invalid_key( 'true' , true );
invalid_key( 'false' , false );
// null/NaN/undefined
invalid_key( 'null' , null );
invalid_key( 'NaN' , NaN );
invalid_key( 'undefined' , undefined );
invalid_key( 'undefined2');
// functions
invalid_key( 'function() {}', function(){} );
// objects
invalid_key( '{}' , {} );
invalid_key( '{ obj: 1 }' , { obj: 1 });
invalid_key( 'Math' , Math );
invalid_key( 'window' , window );
invalid_key( '{length:0,constructor:Array}' , fake_array );
invalid_key( 'Array clones instance' , ArrayClone_instance );
invalid_key( 'Array (object)' , Array );
invalid_key( 'String (object)' , String );
invalid_key( 'new String()' , new String() );
invalid_key( 'new Number()' , new Number() );
invalid_key( 'new Boolean()' , new Boolean() );
// arrays
invalid_key( '[{}]' , [{}] );
invalid_key( '[[], [], [], [[ Date ]]]' , [ [], [], [], [[ Date ]] ] );
invalid_key( '[undefined]' , [undefined] );
invalid_key( '[,1]' , [,1] );
invalid_key( 'document.getElements'
+'ByTagName("script")' , document.getElementsByTagName("script") );
// dates
invalid_key( 'new Date(NaN)' , new Date(NaN) );
invalid_key( 'new Date(Infinity)' , new Date(Infinity) );
// regexes
invalid_key( '/foo/' , /foo/ );
invalid_key( 'new RegExp()' , new RegExp() );
var sparse = [];
sparse[10] = "hei";
invalid_key('sparse array', sparse);
var sparse2 = [];
sparse2[0] = 1;
sparse2[""] = 2;
sparse2[2] = 3;
invalid_key('sparse array 2', sparse2);
invalid_key('[[1], [3], [7], [[ sparse array ]]]', [ [1], [3], [7], [[ sparse2 ]] ]);
// sparse3
invalid_key( '[1,2,3,,]', [1,2,3,,] );
var recursive = [];
recursive.push(recursive);
invalid_key('array directly contains self', recursive);
var recursive2 = [];
recursive2.push([recursive2]);
invalid_key('array indirectly contains self', recursive2);
var recursive3 = [recursive];
invalid_key('array member contains self', recursive3);
invalid_key('proxy of an array', new Proxy([1,2,3], {}));
</script>
<div id=log></div>

View file

@ -0,0 +1,68 @@
// META: global=window,worker
// META: title=Valid key
// META: script=resources/support.js
// Spec: https://w3c.github.io/IndexedDB/#key-construct
'use strict';
const valid_key = (desc, key) => {
async_test(t => {
let db;
const open_rq = createdb(t);
open_rq.onupgradeneeded = t.step_func(e => {
db = e.target.result;
const store = db.createObjectStore('store');
assert_true(store.add('value', key) instanceof IDBRequest);
const store2 = db.createObjectStore('store2', {
keyPath: ['x', 'keypath'],
});
assert_true(store2.add({x: 'v', keypath: key}) instanceof IDBRequest);
});
open_rq.onsuccess = t.step_func(e => {
const rq =
db.transaction('store', 'readonly').objectStore('store').get(key);
rq.onsuccess = t.step_func(e => {
assert_equals(e.target.result, 'value');
const rq2 =
db.transaction('store2', 'readonly').objectStore('store2').get([
'v', key
]);
rq2.onsuccess = t.step_func(e => {
assert_equals(e.target.result.x, 'v');
assert_key_equals(e.target.result.keypath, key);
t.done();
});
});
});
}, 'Valid key - ' + desc);
};
// Date
valid_key('new Date()', new Date());
valid_key('new Date(0)', new Date(0));
// Array
valid_key('[]', []);
valid_key('new Array()', new Array());
valid_key('["undefined"]', ['undefined']);
// Float
valid_key('Infinity', Infinity);
valid_key('-Infinity', -Infinity);
valid_key('0', 0);
valid_key('1.5', 1.5);
valid_key('3e38', 3e38);
valid_key('3e-38', 3e38);
// String
valid_key('"foo"', 'foo');
valid_key('"\\n"', '\n');
valid_key('""', '');
valid_key('"\\""', '"');
valid_key('"\\u1234"', '\u1234');
valid_key('"\\u0000"', '\u0000');
valid_key('"NaN"', 'NaN');

View file

@ -1,75 +0,0 @@
<!DOCTYPE html>
<!-- Submitted from TestTWF Paris -->
<meta charset=utf-8">
<meta name="timeout" content="long">
<title>Valid key</title>
<link rel=help href="http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#key-construct">
<link rel=assert title="A value is said to be a valid key if it is one of the following types: Array JavaScript objects [ECMA-262], DOMString [WEBIDL], Date [ECMA-262] or float [WEBIDL]. However Arrays are only valid keys if every item in the array is defined and is a valid key (i.e. sparse arrays can not be valid keys) and if the Array doesn't directly or indirectly contain itself. Any non-numeric properties are ignored, and thus does not affect whether the Array is a valid key. Additionally, if the value is of type float, it is only a valid key if it is not NaN, and if the value is of type Date it is only a valid key if its [[PrimitiveValue]] internal property, as defined by [ECMA-262], is not NaN. Conforming user agents must support all valid keys as keys.">
<link rel=author href="mailto:batifon@yahoo.fr" title="Baptiste Fontaine">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=resources/support.js></script>
<script>
function valid_key(desc, key) {
var db;
var t = async_test(document.title + " - " + desc);
var open_rq = createdb(t);
open_rq.onupgradeneeded = function(e) {
db = e.target.result;
store = db.createObjectStore("store");
assert_true(store.add('value', key) instanceof IDBRequest);
store2 = db.createObjectStore("store2", { keyPath: ["x", "keypath"] });
assert_true(store2.add({ x: 'v', keypath: key }) instanceof IDBRequest);
};
open_rq.onsuccess = function(e) {
var rq = db.transaction("store", "readonly")
.objectStore("store")
.get(key)
rq.onsuccess = t.step_func(function(e) {
assert_equals(e.target.result, 'value')
var rq = db.transaction("store2", "readonly")
.objectStore("store2")
.get(['v', key])
rq.onsuccess = t.step_func(function(e) {
assert_equals(e.target.result.x, 'v');
assert_key_equals(e.target.result.keypath, key);
t.done()
})
})
}
}
// Date
valid_key( 'new Date()' , new Date() );
valid_key( 'new Date(0)' , new Date(0) );
// Array
valid_key( '[]' , [] );
valid_key( 'new Array()' , new Array() );
valid_key( '["undefined"]' , ['undefined'] );
// Float
valid_key( 'Infinity' , Infinity );
valid_key( '-Infinity' , -Infinity );
valid_key( '0' , 0 );
valid_key( '1.5' , 1.5 );
valid_key( '3e38' , 3e38 );
valid_key( '3e-38' , 3e38 );
// String
valid_key( '"foo"' , "foo" );
valid_key( '"\\n"' , "\n" );
valid_key( '""' , "" );
valid_key( '"\\""' , "\"" );
valid_key( '"\\u1234"' , "\u1234" );
valid_key( '"\\u0000"' , "\u0000" );
valid_key( '"NaN"' , "NaN" );
</script>
<div id=log></div>

View file

@ -0,0 +1,169 @@
// META: global=window,worker
// META: title=Key sort order
// META: script=resources/support.js
// Spec: https://w3c.github.io/IndexedDB/#key-construct
'use strict';
const global_db = createdb_for_multiple_tests();
const keysort = (desc, unsorted, expected) => {
async_test(t => {
const store_name = 'store-' + Date.now() + Math.random();
// The database test
const open_rq = global_db.setTest(t);
open_rq.onupgradeneeded = t.step_func(e => {
const db = e.target.result;
const objStore = db.createObjectStore(store_name);
for (let i = 0; i < unsorted.length; i++)
objStore.add('value', unsorted[i]);
});
open_rq.onsuccess = t.step_func(e => {
const db = e.target.result;
const actual_keys = [];
const rq =
db.transaction(store_name).objectStore(store_name).openCursor();
rq.onsuccess = t.step_func(e => {
const cursor = e.target.result;
if (cursor) {
actual_keys.push(cursor.key);
cursor.continue();
} else {
assert_key_equals(actual_keys, expected, 'keyorder array');
assert_equals(actual_keys.length, expected.length, 'array length');
t.done();
}
});
});
}, `Database readback sort - ${desc}`);
// The IDBKey.cmp test
test(() => {
const sorted = unsorted.slice(0).sort((a, b) => indexedDB.cmp(a, b));
assert_key_equals(sorted, expected, 'sorted array');
}, `IDBKey.cmp sort - ${desc}`);
};
const now = new Date();
const one_sec_ago = new Date(now - 1000);
const one_min_future = new Date(now.getTime() + 1000 * 60);
keysort('String < Array', [[0], 'yo', '', []], ['', 'yo', [], [0]]);
keysort(
'float < String', [Infinity, 'yo', 0, '', 100],
[0, 100, Infinity, '', 'yo']);
keysort(
'float < Date', [now, 0, 9999999999999, -0.22],
[-0.22, 0, 9999999999999, now]);
keysort(
'float < Date < String < Array', [[], '', now, [0], '-1', 0, 9999999999999],
[0, 9999999999999, now, '', '-1', [], [0]]);
keysort(
'Date(1 sec ago) < Date(now) < Date(1 minute in future)',
[now, one_sec_ago, one_min_future], [one_sec_ago, now, one_min_future]);
keysort(
'-1.1 < 1 < 1.01337 < 1.013373 < 2', [1.013373, 2, 1.01337, -1.1, 1],
[-1.1, 1, 1.01337, 1.013373, 2]);
keysort(
'-Infinity < -0.01 < 0 < Infinity', [0, -0.01, -Infinity, Infinity],
[-Infinity, -0.01, 0, Infinity]);
keysort(
'"" < "a" < "ab" < "b" < "ba"', ['a', 'ba', '', 'b', 'ab'],
['', 'a', 'ab', 'b', 'ba']);
keysort(
'Arrays', [[[0]], [0], [], [0, 0], [0, [0]]],
[[], [0], [0, 0], [0, [0]], [[0]]]);
const big_array = [];
const bigger_array = [];
for (let i = 0; i < 10000; i++) {
big_array.push(i);
bigger_array.push(i);
}
bigger_array.push(0);
keysort(
'Array.length: 10,000 < Array.length: 10,001',
[bigger_array, [0, 2, 3], [0], [9], big_array],
[[0], big_array, bigger_array, [0, 2, 3], [9]]);
keysort(
'Infinity inside arrays',
[
[Infinity, 1],
[Infinity, Infinity],
[1, 1],
[1, Infinity],
[1, -Infinity],
[-Infinity, Infinity],
],
[
[-Infinity, Infinity],
[1, -Infinity],
[1, 1],
[1, Infinity],
[Infinity, 1],
[Infinity, Infinity],
]);
keysort(
'Test different stuff at once',
[
now,
[0, []],
'test',
1,
['a', [1, [-1]]],
['b', 'a'],
[0, 2, 'c'],
['a', [1, 2]],
[],
[0, [], 3],
['a', 'b'],
[1, 2],
['a', 'b', 'c'],
one_sec_ago,
[0, 'b', 'c'],
Infinity,
-Infinity,
2.55,
[0, now],
[1],
],
[
-Infinity,
1,
2.55,
Infinity,
one_sec_ago,
now,
'test',
[],
[0, 2, 'c'],
[0, now],
[0, 'b', 'c'],
[0, []],
[0, [], 3],
[1],
[1, 2],
['a', 'b'],
['a', 'b', 'c'],
['a', [1, 2]],
['a', [1, [-1]]],
['b', 'a'],
]);

View file

@ -1,175 +0,0 @@
<!DOCTYPE html>
<!-- Submitted from TestTWF Paris -->
<meta charset="utf-8">
<title>Key sort order</title>
<link rel=help href="http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#key-construct">
<link rel=assert title="For purposes of comparison, all Arrays are greater than all DOMString, Date and float values; all DOMString values are greater than all Date and float values; and all Date values are greater than all float values. Values of type float are compared to other float values numerically. Values of type Date are compared to other Date values chronologically. Values of type DOMString are compared to other values of type DOMString by using the algorithm defined by step 4 of section 11.8.5, The Abstract Relational Comparison Algorithm, of the ECMAScript Language Specification [ECMA-262]. Values of type Array are compared to other values of type Array as follows:
1. Let A be the first Array value and B be the second Array value.
2. Let length be the lesser of A's length and B's length.
3. Let i be 0.
4. If the ith value of A is less than the ith value of B, then A is less than B. Skip the remaining steps.
5. If the ith value of A is greater than the ith value of B, then A is greater than B. Skip the remaining steps.
6. Increase i by 1.
7. If i is not equal to length, go back to step 4. Otherwise continue to next step.
8. If A's length is less than B's length, then A is less than B. If A's length is greater than B's length, then A is greater than B. Otherwise A and B are equal.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/support.js"></script>
<script>
var global_db = createdb_for_multiple_tests();
function keysort(desc, unsorted, expected) {
var db,
t = async_test("Database readback sort - " + desc),
store_name = 'store-' + Date.now() + Math.random();
// The database test
var open_rq = global_db.setTest(t);
open_rq.onupgradeneeded = function(e) {
db = e.target.result;
var objStore = db.createObjectStore(store_name);
for (var i = 0; i < unsorted.length; i++)
objStore.add("value", unsorted[i]);
};
open_rq.onsuccess = function(e) {
var actual_keys = [],
rq = db.transaction(store_name)
.objectStore(store_name)
.openCursor();
rq.onsuccess = t.step_func(function(e) {
var cursor = e.target.result;
if (cursor) {
actual_keys.push(cursor.key);
cursor.continue();
}
else {
assert_key_equals(actual_keys, expected, "keyorder array");
assert_equals(actual_keys.length, expected.length, "array length");
t.done();
}
});
};
// The IDBKey.cmp test
test(function () {
var sorted = unsorted.slice(0).sort(function(a, b) { return indexedDB.cmp(a, b)});
assert_key_equals(sorted, expected, "sorted array");
}, "IDBKey.cmp sorted - " + desc);
}
var now = new Date(),
one_sec_ago = new Date(now - 1000),
one_min_future = new Date(now.getTime() + (1000*60));
keysort('String < Array',
[ [0], "yo", "", [] ],
[ "", "yo", [], [0] ]);
keysort('float < String',
[ Infinity, "yo", 0, "", 100 ],
[ 0, 100, Infinity, "", "yo" ]);
keysort('float < Date',
[ now, 0, 9999999999999, -0.22 ],
[ -0.22, 0, 9999999999999, now ]);
keysort('float < Date < String < Array',
[ [], "", now, [0], "-1", 0, 9999999999999, ],
[ 0, 9999999999999, now, "", "-1", [], [0] ]);
keysort('Date(1 sec ago) < Date(now) < Date(1 minute in future)',
[ now, one_sec_ago, one_min_future ],
[ one_sec_ago, now, one_min_future ]);
keysort('-1.1 < 1 < 1.01337 < 1.013373 < 2',
[ 1.013373, 2, 1.01337, -1.1, 1 ],
[ -1.1, 1, 1.01337, 1.013373, 2 ]);
keysort('-Infinity < -0.01 < 0 < Infinity',
[ 0, -0.01, -Infinity, Infinity ],
[ -Infinity, -0.01, 0, Infinity ]);
keysort('"" < "a" < "ab" < "b" < "ba"',
[ "a", "ba", "", "b", "ab" ],
[ "", "a", "ab", "b", "ba" ]);
keysort('Arrays',
[ [[0]], [0], [], [0, 0], [0, [0]] ],
[ [], [0], [0, 0], [0, [0]], [[0]] ]);
var big_array = [], bigger_array = [];
for (var i=0; i < 10000; i++) {
big_array.push(i);
bigger_array.push(i);
}
bigger_array.push(0);
keysort('Array.length: 10,000 < Array.length: 10,001',
[ bigger_array, [0, 2, 3], [0], [9], big_array ],
[ [0], big_array, bigger_array, [0, 2, 3], [9] ]);
keysort('Infinity inside arrays',
[ [Infinity, 1], [Infinity, Infinity], [1, 1],
[1, Infinity], [1, -Infinity], [-Infinity, Infinity] ],
[ [-Infinity, Infinity], [1, -Infinity], [1, 1],
[1, Infinity], [Infinity, 1], [Infinity, Infinity] ]);
keysort('Test different stuff at once',
[
now,
[0, []],
"test",
1,
["a", [1, [-1]]],
["b", "a"],
[ 0, 2, "c"],
["a", [1, 2]],
[],
[0, [], 3],
["a", "b"],
[ 1, 2 ],
["a", "b", "c"],
one_sec_ago,
[ 0, "b", "c"],
Infinity,
-Infinity,
2.55,
[ 0, now ],
[1]
],
[
-Infinity,
1,
2.55,
Infinity,
one_sec_ago,
now,
"test",
[],
[0 ,2, "c"],
[0, now],
[0, "b", "c"],
[0, []],
[0, [], 3],
[1],
[1, 2],
["a", "b"],
["a", "b", "c"],
["a", [1, 2]],
["a", [1, [-1]]],
["b", "a"]
]);
</script>
<div id="log"></div>

View file

@ -22,6 +22,10 @@ promise_test(async t => {
}
}, 'Simple LanguageDetector.detect() call');
promise_test(async t => {
testMonitor(LanguageDetector.create);
}, 'LanguageDetector.create() notifies its monitor on downloadprogress');
promise_test(async t => {
const controller = new AbortController();
controller.abort();
@ -82,19 +86,18 @@ promise_test(async t => {
detector.measureInputUsage('hello', {signal: controller.signal});
await promise_rejects_dom(t, 'AbortError', measureInputUsagePromise);
}, 'Translator.measureInputUsage() call with an aborted signal.');
}, 'LanguageDetector.measureInputUsage() call with an aborted signal.');
promise_test(async t => {
const detector = await LanguageDetector.create();
await testAbortPromise(t, signal => {
return detector.measureInputUsage('hello', {signal});
});
}, 'Aborting Translator.measureInputUsage().');
}, 'Aborting LanguageDetector.measureInputUsage().');
promise_test(async () => {
const expected_languages = ['en', 'es'];
const detector = await languageDetector.create({
expectedInputLanguages: expected_languages
});
assert_array_equals(detector.expectedInputLanguages(), expected_languages);
const expectedLanguages = ['en', 'es'];
const detector = await LanguageDetector.create(
{expectedInputLanguages: expectedLanguages});
assert_array_equals(detector.expectedInputLanguages, expectedLanguages);
}, 'Creating LanguageDetector with expectedInputLanguages');

View file

@ -25,3 +25,33 @@ const testAbortPromise = async (t, method) => {
await promise_rejects_exactly(t, err, anotherPromise);
}
};
async function testMonitor(createFunc, options = {}) {
let created = false;
const progressEvents = [];
function monitor(m) {
m.addEventListener('downloadprogress', e => {
// No progress events should be fired after `createFunc` resolves.
assert_false(created);
progressEvents.push(e);
});
}
await createFunc({...options, monitor});
created = true;
assert_greater_than_equal(progressEvents.length, 2);
assert_equals(progressEvents.at(0).loaded, 0);
assert_equals(progressEvents.at(-1).loaded, 1);
let lastProgressEventLoaded = -1;
for (const progressEvent of progressEvents) {
assert_equals(progressEvent.total, 1);
assert_less_than_equal(progressEvent.loaded, progressEvent.total);
// Progress events should have monotonically increasing `loaded` values.
assert_greater_than(progressEvent.loaded, lastProgressEventLoaded);
lastProgressEventLoaded = progressEvent.loaded;
}
}

View file

@ -108,39 +108,9 @@ promise_test(async t => {
}, 'Aborting Translator.translate().');
promise_test(async t => {
let monitorCalled = false;
let createdTranslator = false;
const progressEvents = [];
function monitor(m) {
monitorCalled = true;
m.addEventListener('downloadprogress', e => {
// No progress events should have been fired after we've created the
// translator.
assert_false(createdTranslator);
progressEvents.push(e);
});
}
await createTranslator({sourceLanguage: 'en', targetLanguage: 'ja', monitor});
createdTranslator = true;
// Monitor callback must be called.
assert_true(monitorCalled);
// Must have at least 2 progress events, one for 0 and one for 1.
assert_greater_than_equal(progressEvents.length, 2);
// 0 should be the first event and 1 should be the last event.
assert_equals(progressEvents.at(0).loaded, 0);
assert_equals(progressEvents.at(-1).loaded, 1);
// All progress events must have a total of 1.
for (const progressEvent of progressEvents) {
assert_equals(progressEvent.total, 1);
}
}, 'Translator.create() monitor option is called correctly.');
await testMonitor(
createTranslator, {sourceLanguage: 'en', targetLanguage: 'ja'});
}, 'Translator.create() notifies its monitor on downloadprogress');
promise_test(async t => {
const translator =

View file

@ -24,7 +24,7 @@
const kIframeURLPath = "support/frame-with-csp.sub.html";
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/Sources#unsafe-inline
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy#unsafe-inline
document.getElementById("iframeWithScriptSrcUnsafeInline").src =
encodeURIWithApostrophes(kIframeURLPath + "?csp=script-src 'unsafe-inline'");
document.getElementById("iframeWithScriptSrcNone").src =

View file

@ -62,3 +62,33 @@ promise_test(async testCase => {
}
assert_true(exceptionThrown, "No exception thrown.");
}, 'cookieStore.set with malformed name.');
promise_test(async testCase => {
// Nameless cookies cannot have a __Host- prefix
await cookieStore.delete('');
const currentUrl = new URL(self.location.href);
const currentDomain = currentUrl.hostname;
await promise_rejects_js(testCase, TypeError, cookieStore.set(
{ name: '',
value: '__Host-nameless-cookie',
domain: `.${currentDomain}` }));
const cookie = await cookieStore.get('');
assert_equals(cookie, null);
}, 'cookieStore.set a nameless cookie cannot have __Host- prefix');
promise_test(async testCase => {
// Nameless cookies cannot have a __Secure- prefix
await cookieStore.delete('');
const currentUrl = new URL(self.location.href);
const currentDomain = currentUrl.hostname;
await promise_rejects_js(testCase, TypeError, cookieStore.set(
{ name: '',
value: '__Secure-nameless-cookie',
domain: `.${currentDomain}` }));
const cookie = await cookieStore.get('');
assert_equals(cookie, null);
}, 'cookieStore.set a nameless cookie cannot have __Secure- prefix');

View file

@ -102,6 +102,9 @@ promise_test( async() => {
assert_false(iframe2.contentWindow.document.cookie.includes(partitionedCookie),
iframe2.contentWindow.document.cookie);
erase_cookie_from_js("partitionedCookie", "Secure; Path=/; SameSite=None; Partitioned");
erase_cookie_from_js("second", "Secure; Path=/; SameSite=None; Partitioned");
}, "Partitioned cookies set in same-site contexts are available in other same-site documents.");
</script>
</body>

View file

@ -183,4 +183,21 @@ test_no_interpolation({
from: '14q',
to: 'normal',
});
test_no_interpolation({
property: 'line-height',
from: '1',
to: '200%',
});
test_interpolation({
property: 'line-height',
from: '100%',
to: '200%',
}, [
{at: 0, expect: '100%'},
{at: 0.3, expect: '130%'},
{at: 0.6, expect: '160%'},
{at: 1, expect: '200%'},
]);
</script>

View file

@ -1,5 +1,10 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<style>
:root {
print-color-adjust: exact;
}
</style>
<p>There should be a green square below, and no red.</p>
<div style="width:100px; height:100px; background:green;"></div>

View file

@ -3,6 +3,11 @@
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-anchor-1/#anchor-pos">
<link rel="match" href="anchor-position-005-print-ref.html">
<style>
:root {
print-color-adjust: exact;
}
</style>
<p>There should be a green square below, and no red.</p>
<div style="width:100px; height:100px; background:red;">
<div style="anchor-name:--first; width:50px; height:100px; background:green;"></div>

View file

@ -99,8 +99,8 @@
}
test_position_area("span-bottom span-left", {left:"auto", right:"auto", top:"auto", bottom:"auto"},
{left:200, top:150, width:50, height:150});
{left:100, top:150, width:150, height:150});
test_position_area("span-bottom span-left", {left:"10px", right:"10px", top:"10px", bottom:"10px"},
{left:210, top:160, width:30, height:130});
{left:110, top:160, width:130, height:130});
</script>

View file

@ -16,16 +16,11 @@
height: 50%;
background: cyan;
}
#container.thicker > .pos {
border-width: thick;
}
</style>
<div id="scrollable" style="position:relative; overflow:scroll; scrollbar-width:none; width:500px; height:500px; background:yellow;">
<div style="width:2000px; height:2000px;">
<div id="container">
<div style="anchor-name:--anchor; margin:200px; width:50px; height:1000px; background:gray;"></div>
<div id="anchored" style="position-area:top left;"></div>
</div>
<div style="display: flow-root; width:2000px; height:2000px;">
<div style="anchor-name:--anchor; margin:200px; width:50px; height:1000px; background:gray;"></div>
<div id="anchored" style="position-area:top left;"></div>
</div>
</div>
<script>

View file

@ -0,0 +1,130 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>corner-shape interpolation</title>
<link rel="help" href="https://drafts.csswg.org/css-borders-4/#corner-shape-interpolation">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<style>
.parent {
corner-shape: bevel;
padding: 10px;
}
.target {
display: inline-block;
width: 100px;
height: 100px;
background-color: black;
corner-shape: bevel superellipse(3) superellipse(-2.5) square;
}
.expected {
background-color: green;
}
</style>
<body>
<script>
function test_corner_shape_interpolation({from, to}, expected) {
for (const corner of ['top-left', 'top-right', 'bottom-right', 'bottom-left']) {
test_interpolation({property: `corner-${corner}-shape`, from, to}, expected);
}
}
test_corner_shape_interpolation({
from: 'round',
to: 'bevel',
}, [
{at: -0.3, expect: 'superellipse(1.4)'},
{at: 0, expect: 'round'},
{at: 0.6, expect: 'superellipse(0.36)'},
{at: 1, expect: 'bevel'},
{at: 1.5, expect: 'superellipse(-0.46)'},
]);
test_corner_shape_interpolation({
from: 'initial',
to: 'scoop',
}, [
{at: -0.3, expect: 'superellipse(1.91)'},
{at: 0, expect: 'round'},
{at: 0.5, expect: 'bevel'},
{at: 0.6, expect: 'superellipse(-0.18)'},
{at: 1, expect: 'scoop'},
{at: 1.5, expect: 'superellipse(-2.95)'},
]);
test_interpolation({
property: 'corner-top-left-shape',
from: 'inherit',
to: 'squircle',
}, [
{at: -0.3, expect: 'superellipse(-0.45)'},
{at: 0, expect: 'bevel'},
{at: 0.6, expect: 'superellipse(0.98)'},
{at: 1, expect: 'squircle'},
{at: 1.5, expect: 'square'},
]);
test_interpolation({
property: 'corner-top-right-shape',
from: 'inherit',
to: 'square',
}, [
{at: -0.3, expect: 'superellipse(-0.69)'},
{at: 0, expect: 'bevel'},
{at: 0.6, expect: 'superellipse(1.64)'},
{at: 1, expect: 'square'},
{at: 1.5, expect: 'square'},
]);
test_interpolation({
property: 'corner-bottom-right-shape',
from: 'inherit',
to: 'scoop',
}, [
{at: -0.3, expect: 'superellipse(0.27)'},
{at: 0, expect: 'bevel'},
{at: 0.6, expect: 'superellipse(-0.56)'},
{at: 1, expect: 'scoop'},
{at: 1.5, expect: 'superellipse(-1.72)'},
]);
test_interpolation({
property: 'corner-bottom-left-shape',
from: 'inherit',
to: 'notch',
}, [
{at: -0.3, expect: 'superellipse(0.69)'},
{at: 0, expect: 'bevel'},
{at: 0.6, expect: 'superellipse(-1.64)'},
{at: 1, expect: 'notch'},
{at: 1.5, expect: 'notch'},
]);
test_corner_shape_interpolation({
from: 'notch',
to: 'square',
}, [
{at: -0.3, expect: 'notch'},
{at: 0, expect: 'notch'},
{at: 0.5, expect: 'bevel'},
{at: 0.8, expect: 'superellipse(1.64)'},
{at: 1, expect: 'square'},
{at: 1.5, expect: 'square'},
]);
test_corner_shape_interpolation({
from: 'superellipse(3)',
to: 'superellipse(-2)',
}, [
{at: -0.3, expect: 'square'},
{at: 0, expect: 'superellipse(3)'},
{at: 0.5, expect: 'superellipse(0.16)'},
{at: 0.8, expect: 'superellipse(-0.9)'},
{at: 1, expect: 'superellipse(-2)'},
{at: 1.1, expect: 'superellipse(-2.99)'},
]);
</script>
</body>

View file

@ -10,7 +10,7 @@
height: 100px;
border-radius: 25px;
box-sizing: border-box;
corner-shape: notch superellipse(0.00001) round superellipse(0);
corner-shape: notch superellipse(-100) round superellipse(-infinity);
}
</style>
<div class=target></div>

View file

@ -7,19 +7,22 @@
<meta name="variant" content="?corner-shape=scoop&border-radius=20%&border-width=20px&border-top-color=rebeccapurple&border-bottom-color=blue">
<meta name="variant" content="?corner-shape=scoop&border-radius=20%&border-width=20px">
<meta name="variant" content="?corner-top-left-shape=notch&border-radius=40px&border-width=10px&border-color=blue&border-left-color=yellow">
<meta name="variant" content="?corner-shape=superellipse(0.25)&border-radius=20%&border-width=20px">
<meta name="variant" content="?corner-shape=superellipse(-2)&border-radius=20%&border-width=20px">
<meta name="variant" content="?corner-top-left-shape=bevel&border-radius=40px&border-width=10px">
<meta name="variant" content="?corner-top-left-shape=scoop&corner-top-right-shape=scoop&border-radius=50%">
<meta name="variant" content="?corner-shape=squircle&border-radius=25%&border-width=20px">
<meta name="variant" content="?corner-shape=squircle&border-radius=25%&box-shadow=10px 10px 0 10px black">
<meta name="variant" content="?corner-shape=squircle&border-radius=50%">
<meta name="variant" content="?corner-shape=superellipse(0.05)&border-radius=20%&border-width=20px">
<meta name="variant" content="?corner-shape=superellipse(40)&border-radius=20%&border-width=20px">
<meta name="variant" content="?corner-shape=superellipse(-7)&border-radius=20%&border-width=20px">
<meta name="variant" content="?corner-shape=superellipse(5)&border-radius=20%&border-width=20px">
<meta name="variant" content="?corner-top-left-shape=bevel&corner-bottom-right-shape=bevel&border-radius=40px&border-width=10px">
<meta name="variant" content="?corner-top-left-shape=superellipse(0.3)&border-radius=40%">
<meta name="variant" content="?corner-top-left-shape=superellipse(6)&border-radius=20%&border-width=10px">
<meta name="variant" content="?corner-top-left-shape=superellipse(-4)&border-radius=40%">
<meta name="variant" content="?corner-top-left-shape=superellipse(2.5)&border-radius=20%&border-width=10px">
<meta name="variant" content="?corner-top-right-shape=scoop&border-radius=20%&border-width=10px">
<meta name="variant" content="?corner-shape=superellipse(1.8)&border-radius=40px&border-width=10px&border-left-color=purple">
<meta name="variant" content="?corner-shape=superellipse(0.8)&border-radius=40px&border-width=10px&border-left-color=purple">
<meta name="variant" content="?corner-shape=superellipse(3)&border-radius=40px&box-shadow=10px 10px 0 10px black">
<meta name="variant" content="?border-radius=30%&corner-shape=superellipse(-1.5)&box-shadow=10px%2010px%200%2010px%20black">
<meta name="variant" content="?border-radius=40%&corner-shape=notch&box-shadow=10px%2010px%200%2010px%20yellow">
<style>
body {
margin: 0;

View file

@ -6,17 +6,16 @@
<meta name="fuzzy" content="maxDifference=0-180;totalPixels=0-350">
<meta name="variant" content="?corner-shape=squircle&border-top-left-radius=30%">
<meta name="variant" content="?corner-shape=squircle&border-top-right-radius=30px">
<meta name="variant" content="?corner-shape=straight&border-bottom-left-radius=5px">
<meta name="variant" content="?corner-shape=superellipse(5.2)&border-radius=40%">
<meta name="variant" content="?corner-shape=superellipse(8)&border-top-right-radius=33px">
<meta name="variant" content="?corner-top-right-shape=superellipse(0.1)&border-top-right-radius=50px">
<meta name="variant" content="?corner-bottom-right-shape=superellipse(1.9)&border-bottom-right-radius=50%">
<meta name="variant" content="?corner-shape=square&border-bottom-left-radius=5px">
<meta name="variant" content="?corner-shape=superellipse(2.3)&border-radius=40%">
<meta name="variant" content="?corner-shape=superellipse(3)&border-top-right-radius=33px">
<meta name="variant" content="?corner-top-right-shape=superellipse(-4)&border-top-right-radius=50px">
<meta name="variant" content="?corner-bottom-right-shape=superellipse(0.8)&border-bottom-right-radius=50%">
<meta name="variant" content="?corner-top-left-shape=bevel&border-radius=40px">
<meta name="variant" content="?corner-top-left-shape=scoop&border-radius=40px">
<meta name="variant" content="?corner-top-left-shape=superellipse(0.2)&border-radius=40px">
<meta name="variant" content="?corner-top-left-shape=superellipse(1.2)&border-radius=40px">
<meta name="variant" content="?corner-top-left-shape=superellipse(0.8)&border-radius=40px">
<meta name="variant" content="?corner-shape=superellipse(8)&border-radius=10px&box-shadow=10px 10px 0 10px black">
<meta name="variant" content="?corner-top-left-shape=superellipse(-4)&border-radius=40px">
<meta name="variant" content="?corner-top-left-shape=superellipse(0.5)&border-radius=40px">
<meta name="variant" content="?corner-top-left-shape=superellipse(-0.5)&border-radius=40px">
<meta name="variant" content="?corner-shape=squircle&border-top-left-radius=25%&border-width=10px">
<meta name="variant" content="?corner-bottom-left-shape=bevel&border-bottom-left-radius=30px">
<meta name="variant" content="?corner-top-left-shape=bevel&border-width=10px&border-color=black">
@ -24,6 +23,8 @@
<meta name="variant" content="?corner-bottom-left-shape=bevel&border-width=10px&border-radius=20px">
<meta name="variant" content="?corner-bottom-right-shape=bevel&border-width=10px&border-radius=20px">
<meta name="variant" content="?corner-bottom-right-shape=bevel&corner-bottom-left-shape=bevel">
<meta name="variant" content="?border-top-left-radius=50%&corner-shape=superellipse(0.7)&border-left-width=30px&border-top-width=30px">
<meta name="variant" content="?border-radius=50%&corner-shape=bevel&box-shadow=10px%2010px%200%2010px%20black">
<style>
body {
margin: 0;

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