Update web-platform-tests to revision 73bd4355b891665829c66e1b83d64bcc29197a16

This commit is contained in:
WPT Sync Bot 2020-05-15 08:19:23 +00:00
parent e1cc38bea8
commit db12fbb0be
146 changed files with 2401 additions and 798 deletions

View file

@ -1,4 +0,0 @@
[hit-test-floats-003.html]
[Miss float below something else]
expected: FAIL

View file

@ -2,6 +2,3 @@
[Hit test intersecting scaled box] [Hit test intersecting scaled box]
expected: FAIL expected: FAIL
[Hit test within unscaled box]
expected: FAIL

View file

@ -0,0 +1,4 @@
[elementFromPoint-001.html]
[CSSOM View - 5 - extensions to the Document interface]
expected: FAIL

View file

@ -17,6 +17,3 @@
[test the top of layer] [test the top of layer]
expected: FAIL expected: FAIL
[test some point of the element: top left corner]
expected: FAIL

View file

@ -0,0 +1,4 @@
[elementsFromPoint-invalid-cases.html]
[The root element is the last element returned for otherwise empty queries within the viewport]
expected: FAIL

View file

@ -315,18 +315,9 @@
[<iframe>: separate response Content-Type: text/plain */*] [<iframe>: separate response Content-Type: text/plain */*]
expected: FAIL expected: FAIL
[<iframe>: combined response Content-Type: */* text/html]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*] [<iframe>: separate response Content-Type: text/html */*]
expected: FAIL expected: FAIL
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/html;" \\" text/plain] [<iframe>: separate response Content-Type: text/html;" \\" text/plain]
expected: FAIL expected: FAIL
@ -336,3 +327,12 @@
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk] [<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
expected: FAIL expected: FAIL
[<iframe>: combined response Content-Type: text/html;" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
expected: FAIL
[<iframe>: separate response Content-Type: text/plain ]
expected: FAIL

View file

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

View file

@ -8,9 +8,6 @@
[X-Content-Type-Options%3A%20nosniff%0C] [X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL expected: FAIL
[X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff]
expected: FAIL
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!] [X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
expected: FAIL expected: FAIL

View file

@ -0,0 +1,4 @@
[traverse_the_history_1.html]
[Multiple history traversals from the same task]
expected: FAIL

View file

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

View file

@ -1,20 +1,16 @@
[supported-elements.html] [supported-elements.html]
expected: TIMEOUT
[Contenteditable element should support autofocus] [Contenteditable element should support autofocus]
expected: FAIL expected: FAIL
[Host element with delegatesFocus including no focusable descendants should be skipped] [Host element with delegatesFocus including no focusable descendants should be skipped]
expected: NOTRUN expected: FAIL
[Element with tabindex should support autofocus] [Element with tabindex should support autofocus]
expected: TIMEOUT expected: FAIL
[Area element should support autofocus] [Area element should support autofocus]
expected: NOTRUN expected: FAIL
[Host element with delegatesFocus should support autofocus] [Host element with delegatesFocus should support autofocus]
expected: NOTRUN expected: FAIL
[Non-HTMLElement should not support autofocus]
expected: NOTRUN

View file

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

View file

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

View file

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

View file

@ -1,5 +1,4 @@
[iframe_sandbox_popups_nonescaping-3.html] [iframe_sandbox_popups_nonescaping-3.html]
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: NOTRUN expected: FAIL

View file

@ -0,0 +1,4 @@
[input-pattern-dynamic-value.html]
[input validation is updated after pattern attribute change]
expected: FAIL

View file

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

View file

@ -0,0 +1,19 @@
[readwrite-readonly.html]
[The :read-write pseudo-class must not match input elements to which the readonly attribute does not apply]
expected: FAIL
[The :read-only pseudo-class must match input elements to which the readonly attribute does not apply]
expected: FAIL
[The :read-only pseudo-class must not match elements that are editable]
expected: FAIL
[The :read-only pseudo-class must not match elements that are editing hosts]
expected: FAIL
[The :read-write pseudo-class must match elements that are editing hosts]
expected: FAIL
[The :read-write pseudo-class must match elements that are editable]
expected: FAIL

View file

@ -32,3 +32,21 @@
[Parsing: <file://xn--/p> against <about:blank>] [Parsing: <file://xn--/p> against <about:blank>]
expected: FAIL expected: FAIL
[Parsing: <http://a>b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a^b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a>b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a<b> against <about:blank>]
expected: FAIL
[Parsing: <http://a<b> against <about:blank>]
expected: FAIL
[Parsing: <http://a^b> against <about:blank>]
expected: FAIL

View file

@ -32,3 +32,21 @@
[Parsing: <file://xn--/p> against <about:blank>] [Parsing: <file://xn--/p> against <about:blank>]
expected: FAIL expected: FAIL
[Parsing: <http://a>b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a^b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a>b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a<b> against <about:blank>]
expected: FAIL
[Parsing: <http://a<b> against <about:blank>]
expected: FAIL
[Parsing: <http://a^b> against <about:blank>]
expected: FAIL

View file

@ -161,3 +161,93 @@
[Location's href: \\\\\\.\\Y: should throw] [Location's href: \\\\\\.\\Y: should throw]
expected: FAIL expected: FAIL
[XHR: http://a>b should throw]
expected: FAIL
[Location's href: non-special://a>b should throw]
expected: FAIL
[Location's href: non-special://a^b should throw]
expected: FAIL
[URL's href: http://a<b should throw]
expected: FAIL
[URL's constructor's base argument: non-special://a^b should throw]
expected: FAIL
[URL's href: http://a>b should throw]
expected: FAIL
[window.open(): http://a<b should throw]
expected: FAIL
[URL's href: non-special://a^b should throw]
expected: FAIL
[window.open(): non-special://a^b should throw]
expected: FAIL
[URL's constructor's base argument: non-special://a>b should throw]
expected: FAIL
[XHR: http://a^b should throw]
expected: FAIL
[URL's href: non-special://a<b should throw]
expected: FAIL
[window.open(): http://a>b should throw]
expected: FAIL
[window.open(): non-special://a<b should throw]
expected: FAIL
[XHR: non-special://a>b should throw]
expected: FAIL
[XHR: non-special://a<b should throw]
expected: FAIL
[URL's constructor's base argument: http://a>b should throw]
expected: FAIL
[Location's href: http://a<b should throw]
expected: FAIL
[XHR: non-special://a^b should throw]
expected: FAIL
[URL's constructor's base argument: non-special://a<b should throw]
expected: FAIL
[window.open(): http://a^b should throw]
expected: FAIL
[URL's constructor's base argument: http://a<b should throw]
expected: FAIL
[Location's href: http://a>b should throw]
expected: FAIL
[URL's href: http://a^b should throw]
expected: FAIL
[XHR: http://a<b should throw]
expected: FAIL
[Location's href: http://a^b should throw]
expected: FAIL
[URL's constructor's base argument: http://a^b should throw]
expected: FAIL
[URL's href: non-special://a>b should throw]
expected: FAIL
[Location's href: non-special://a<b should throw]
expected: FAIL
[window.open(): non-special://a>b should throw]
expected: FAIL

View file

@ -32,3 +32,21 @@
[Parsing: <file://xn--/p> against <about:blank>] [Parsing: <file://xn--/p> against <about:blank>]
expected: FAIL expected: FAIL
[Parsing: <http://a>b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a^b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a>b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a<b> against <about:blank>]
expected: FAIL
[Parsing: <http://a<b> against <about:blank>]
expected: FAIL
[Parsing: <http://a^b> against <about:blank>]
expected: FAIL

View file

@ -0,0 +1,4 @@
[pointer_tripleclick.py]
[test_tripleclick_at_coordinates]
expected: FAIL

View file

@ -1,7 +1,8 @@
[shared-worker-in-data-url-context.window.html] [shared-worker-in-data-url-context.window.html]
expected: TIMEOUT
[Create a shared worker in a data url frame] [Create a shared worker in a data url frame]
expected: FAIL expected: TIMEOUT
[Create a data url shared worker in a data url frame] [Create a data url shared worker in a data url frame]
expected: FAIL expected: NOTRUN

File diff suppressed because it is too large Load diff

View file

@ -1,4 +0,0 @@
[hit-test-floats-003.html]
[Miss float below something else]
expected: FAIL

View file

@ -2,6 +2,3 @@
[Hit test intersecting scaled box] [Hit test intersecting scaled box]
expected: FAIL expected: FAIL
[Hit test within unscaled box]
expected: FAIL

View file

@ -0,0 +1,4 @@
[elementFromPoint-001.html]
[CSSOM View - 5 - extensions to the Document interface]
expected: FAIL

View file

@ -21,6 +21,3 @@
[test the top of layer] [test the top of layer]
expected: FAIL expected: FAIL
[test some point of the element: top left corner]
expected: FAIL

View file

@ -0,0 +1,4 @@
[elementsFromPoint-invalid-cases.html]
[The root element is the last element returned for otherwise empty queries within the viewport]
expected: FAIL

View file

@ -315,18 +315,9 @@
[<iframe>: separate response Content-Type: text/plain */*] [<iframe>: separate response Content-Type: text/plain */*]
expected: FAIL expected: FAIL
[<iframe>: combined response Content-Type: */* text/html]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*] [<iframe>: separate response Content-Type: text/html */*]
expected: FAIL expected: FAIL
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/html;" \\" text/plain] [<iframe>: separate response Content-Type: text/html;" \\" text/plain]
expected: FAIL expected: FAIL
@ -336,3 +327,12 @@
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk] [<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
expected: FAIL expected: FAIL
[<iframe>: combined response Content-Type: text/html;" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
expected: FAIL
[<iframe>: separate response Content-Type: text/plain ]
expected: FAIL

View file

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

View file

@ -8,9 +8,6 @@
[X-Content-Type-Options%3A%20nosniff%0C] [X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL expected: FAIL
[X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff]
expected: FAIL
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!] [X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
expected: FAIL expected: FAIL

View file

@ -0,0 +1,4 @@
[traverse_the_history_1.html]
[Multiple history traversals from the same task]
expected: FAIL

View file

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

View file

@ -1,20 +1,16 @@
[supported-elements.html] [supported-elements.html]
expected: TIMEOUT
[Contenteditable element should support autofocus] [Contenteditable element should support autofocus]
expected: FAIL expected: FAIL
[Element with tabindex should support autofocus] [Element with tabindex should support autofocus]
expected: TIMEOUT expected: FAIL
[Host element with delegatesFocus including no focusable descendants should be skipped] [Host element with delegatesFocus including no focusable descendants should be skipped]
expected: NOTRUN expected: FAIL
[Area element should support autofocus] [Area element should support autofocus]
expected: NOTRUN expected: FAIL
[Host element with delegatesFocus should support autofocus] [Host element with delegatesFocus should support autofocus]
expected: NOTRUN expected: FAIL
[Non-HTMLElement should not support autofocus]
expected: NOTRUN

View file

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

View file

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

View file

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

View file

@ -1,6 +1,5 @@
[iframe_sandbox_popups_nonescaping-3.html] [iframe_sandbox_popups_nonescaping-3.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: NOTRUN expected: FAIL

View file

@ -0,0 +1,4 @@
[input-pattern-dynamic-value.html]
[input validation is updated after pattern attribute change]
expected: FAIL

View file

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

View file

@ -1,15 +1,6 @@
[readwrite-readonly.html] [readwrite-readonly.html]
type: testharness type: testharness
bug: https://github.com/servo/servo/issues/10732 bug: https://github.com/servo/servo/issues/10732
[The :read-only pseudo-class must not match input elements to which the readonly attribute applies, and that are mutable]
expected: FAIL
[The :read-only pseudo-class must match input elements after the readonly attribute has been added]
expected: FAIL
[The :read-only pseudo-class must match input elements after the readonly attribute has been removed]
expected: FAIL
[The :read-write pseudo-class must match elements that are editable] [The :read-write pseudo-class must match elements that are editable]
expected: FAIL expected: FAIL

View file

@ -42,3 +42,21 @@
[Parsing: <file://xn--/p> against <about:blank>] [Parsing: <file://xn--/p> against <about:blank>]
expected: FAIL expected: FAIL
[Parsing: <http://a>b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a^b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a>b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a<b> against <about:blank>]
expected: FAIL
[Parsing: <http://a<b> against <about:blank>]
expected: FAIL
[Parsing: <http://a^b> against <about:blank>]
expected: FAIL

View file

@ -42,3 +42,21 @@
[Parsing: <file://xn--/p> against <about:blank>] [Parsing: <file://xn--/p> against <about:blank>]
expected: FAIL expected: FAIL
[Parsing: <http://a>b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a^b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a>b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a<b> against <about:blank>]
expected: FAIL
[Parsing: <http://a<b> against <about:blank>]
expected: FAIL
[Parsing: <http://a^b> against <about:blank>]
expected: FAIL

View file

@ -165,3 +165,93 @@
[Location's href: \\\\\\.\\Y: should throw] [Location's href: \\\\\\.\\Y: should throw]
expected: FAIL expected: FAIL
[XHR: http://a>b should throw]
expected: FAIL
[Location's href: non-special://a>b should throw]
expected: FAIL
[Location's href: non-special://a^b should throw]
expected: FAIL
[URL's href: http://a<b should throw]
expected: FAIL
[URL's constructor's base argument: non-special://a^b should throw]
expected: FAIL
[URL's href: http://a>b should throw]
expected: FAIL
[window.open(): http://a<b should throw]
expected: FAIL
[URL's href: non-special://a^b should throw]
expected: FAIL
[window.open(): non-special://a^b should throw]
expected: FAIL
[URL's constructor's base argument: non-special://a>b should throw]
expected: FAIL
[XHR: http://a^b should throw]
expected: FAIL
[URL's href: non-special://a<b should throw]
expected: FAIL
[window.open(): http://a>b should throw]
expected: FAIL
[window.open(): non-special://a<b should throw]
expected: FAIL
[XHR: non-special://a>b should throw]
expected: FAIL
[XHR: non-special://a<b should throw]
expected: FAIL
[URL's constructor's base argument: http://a>b should throw]
expected: FAIL
[Location's href: http://a<b should throw]
expected: FAIL
[XHR: non-special://a^b should throw]
expected: FAIL
[URL's constructor's base argument: non-special://a<b should throw]
expected: FAIL
[window.open(): http://a^b should throw]
expected: FAIL
[URL's constructor's base argument: http://a<b should throw]
expected: FAIL
[Location's href: http://a>b should throw]
expected: FAIL
[URL's href: http://a^b should throw]
expected: FAIL
[XHR: http://a<b should throw]
expected: FAIL
[Location's href: http://a^b should throw]
expected: FAIL
[URL's constructor's base argument: http://a^b should throw]
expected: FAIL
[URL's href: non-special://a>b should throw]
expected: FAIL
[Location's href: non-special://a<b should throw]
expected: FAIL
[window.open(): non-special://a>b should throw]
expected: FAIL

View file

@ -33,3 +33,21 @@
[Parsing: <file://xn--/p> against <about:blank>] [Parsing: <file://xn--/p> against <about:blank>]
expected: FAIL expected: FAIL
[Parsing: <http://a>b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a^b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a>b> against <about:blank>]
expected: FAIL
[Parsing: <non-special://a<b> against <about:blank>]
expected: FAIL
[Parsing: <http://a<b> against <about:blank>]
expected: FAIL
[Parsing: <http://a^b> against <about:blank>]
expected: FAIL

View file

@ -0,0 +1,4 @@
[pointer_tripleclick.py]
[test_tripleclick_at_coordinates]
expected: FAIL

View file

@ -1,7 +1,8 @@
[shared-worker-in-data-url-context.window.html] [shared-worker-in-data-url-context.window.html]
expected: TIMEOUT
[Create a shared worker in a data url frame] [Create a shared worker in a data url frame]
expected: FAIL expected: TIMEOUT
[Create a data url shared worker in a data url frame] [Create a data url shared worker in a data url frame]
expected: FAIL expected: NOTRUN

View file

@ -8,12 +8,12 @@
(async () => { (async () => {
await test_frame( await test_frame(
"HTTPS_REMOTE_ORIGIN", "HTTPS_REMOTE_ORIGIN",
"device-memory=true&dpr=false&viewport-width=false", "device-memory=true&dpr=false&viewport-width=false&sec-ch-ua=false&sec-ch-ua-mobile=false",
"", "",
"Client hints loaded on cross-origin iframe request with feature policy."); "Client hints loaded on cross-origin iframe request with feature policy.");
await test_frame( await test_frame(
"HTTPS_ORIGIN", "HTTPS_ORIGIN",
"device-memory=true&dpr=false&viewport-width=true", "device-memory=true&dpr=false&viewport-width=true&sec-ch-ua=true&sec-ch-ua-mobile=false",
"", "",
"Client hints loaded on same-origin iframe request with feature policy."); "Client hints loaded on same-origin iframe request with feature policy.");
await test_frame( await test_frame(
@ -23,7 +23,7 @@
"Iframe trying to set Accept-CH-Lifetime.", "/client-hints/resources/iframe-accept-ch-lifetime.html"); "Iframe trying to set Accept-CH-Lifetime.", "/client-hints/resources/iframe-accept-ch-lifetime.html");
await test_frame( await test_frame(
"HTTPS_REMOTE_ORIGIN", "HTTPS_REMOTE_ORIGIN",
"device-memory=true&dpr=false&viewport-width=false", "device-memory=true&dpr=false&viewport-width=false&sec-ch-ua=false&sec-ch-ua-mobile=false",
"", "",
"Client hints loaded on cross-origin iframe request with feature policy after attempting to set independently."); "Client hints loaded on cross-origin iframe request with feature policy after attempting to set independently.");
})(); })();

View file

@ -1,3 +1,3 @@
Accept-CH: Device-Memory, DPR, Viewport-Width Accept-CH: Device-Memory, DPR, Viewport-Width
Accept-CH-Lifetime: 1 Accept-CH-Lifetime: 1
Feature-Policy: ch-device-memory *; ch-dpr 'none'; ch-viewport-width 'self'; ch-lang 'none' Feature-Policy: ch-device-memory *; ch-dpr 'none'; ch-viewport-width 'self'; ch-lang 'none'; ch-ua 'self'; ch-ua-mobile 'none'

View file

@ -8,12 +8,12 @@
(async () => { (async () => {
await test_frame( await test_frame(
"HTTPS_REMOTE_ORIGIN", "HTTPS_REMOTE_ORIGIN",
"device-memory=false&dpr=false&viewport-width=false", "device-memory=false&dpr=false&viewport-width=false&sec-ch-ua=true&sec-ch-ua-mobile=true",
"", "",
"Client hints not loaded on cross-origin iframe request with no feature policy."); "Client hints not loaded on cross-origin iframe request with no feature policy.");
await test_frame( await test_frame(
"HTTPS_ORIGIN", "HTTPS_ORIGIN",
"device-memory=true&dpr=true&viewport-width=true", "device-memory=true&dpr=true&viewport-width=true&sec-ch-ua=true&sec-ch-ua-mobile=true",
"", "",
"Client hints loaded on same-origin iframe request with no feature policy."); "Client hints loaded on same-origin iframe request with no feature policy.");
})(); })();

View file

@ -0,0 +1,11 @@
<html>
<body>
<!-- Page with an empty accept-ch header, which disables client hints -->
<script>
window.top.opener.postMessage('Loaded', '*');
</script>
</body>
</html>

View file

@ -0,0 +1,2 @@
Accept-CH:
Access-Control-Allow-Origin: *

View file

@ -1,5 +1,7 @@
const echo = "/client-hints/accept-ch-stickiness/resources/echo-client-hints-received.py"; const echo = "/client-hints/accept-ch-stickiness/resources/echo-client-hints-received.py";
const accept = "/client-hints/accept-ch-stickiness/resources/accept-ch.html"; const accept = "/client-hints/accept-ch-stickiness/resources/accept-ch.html";
const accept_blank = "/client-hints/accept-ch-stickiness/resources/accept-ch-blank.html";
const no_accept = "/client-hints/accept-ch-stickiness/resources/no-accept-ch.html";
const httpequiv_accept = "/client-hints/accept-ch-stickiness/resources/http-equiv-accept-ch.html"; const httpequiv_accept = "/client-hints/accept-ch-stickiness/resources/http-equiv-accept-ch.html";
const expect = "/client-hints/accept-ch-stickiness/resources/expect-client-hints-headers.html" const expect = "/client-hints/accept-ch-stickiness/resources/expect-client-hints-headers.html"
const do_not_expect = "/client-hints/accept-ch-stickiness/resources/do-not-expect-client-hints-headers.html" const do_not_expect = "/client-hints/accept-ch-stickiness/resources/do-not-expect-client-hints-headers.html"
@ -49,30 +51,26 @@ function verify_subresource_state(expect_url, test_name) {
}); });
}, test_name + " got client hints according to expectations."); }, test_name + " got client hints according to expectations.");
} }
const run_test = test => {
// First, verify the initial state to make sure that the browser does not have
// client hints preferences cached from a previous run of the test.
verify_initial_state(test.initial_url, test.name);
// Then, attempt to set Accept-CH function attempt_set(test_type, accept_url, test_name, test_name_suffix) {
promise_test(t => { promise_test(t => {
return new Promise(resolve => { return new Promise(resolve => {
if (test.type == "navigation") { if (test_type == "navigation") {
const win = window.open(test.accept_url); const win = window.open(accept_url);
assert_not_equals(win, null, "Popup windows not allowed?"); assert_not_equals(win, null, "Popup windows not allowed?");
addEventListener('message', t.step_func(() => { addEventListener('message', t.step_func(() => {
win.close(); win.close();
resolve(); resolve();
}), false); }), false);
} else if (test.type == "iframe") { } else if (test_type == "iframe") {
const iframe = document.createElement("iframe"); const iframe = document.createElement("iframe");
iframe.addEventListener('load', t.step_func(() => { iframe.addEventListener('load', t.step_func(() => {
resolve(); resolve();
}), false); }), false);
iframe.src = test.accept_url; iframe.src = accept_url;
document.body.appendChild(iframe); document.body.appendChild(iframe);
} else if (test.type == "subresource") { } else if (test_type == "subresource") {
fetch(test.accept_url).then(r => { fetch(accept_url).then(r => {
assert_equals(r.status, 200, "subresource response status") assert_equals(r.status, 200, "subresource response status")
// Verify that the browser did not include client hints in the request // Verify that the browser did not include client hints in the request
// headers, just because we can.. // headers, just because we can..
@ -85,7 +83,16 @@ const run_test = test => {
assert_unreached("unknown test type"); assert_unreached("unknown test type");
} }
}); });
}, test.name + " set Accept-CH"); }, test_name + " set Accept-CH" + test_name_suffix);
}
const run_test = test => {
// First, verify the initial state to make sure that the browser does not have
// client hints preferences cached from a previous run of the test.
verify_initial_state(test.initial_url, test.name);
// Then, attempt to set Accept-CH
attempt_set(test.type, test.accept_url, test.name, "");
// Finally, verify that CH are actually sent (or not) on requests // Finally, verify that CH are actually sent (or not) on requests
verify_navigation_state(test.expect_url, test.name); verify_navigation_state(test.expect_url, test.name);

View file

@ -0,0 +1,11 @@
<html>
<body>
<!-- Page with out an accept-ch header; client hints are unaffected -->
<script>
window.top.opener.postMessage('Loaded', '*');
</script>
</body>
</html>

View file

@ -0,0 +1 @@
Access-Control-Allow-Origin: *

View file

@ -8,10 +8,10 @@
<script src="resources/accept-ch-test.js"></script> <script src="resources/accept-ch-test.js"></script>
<script> <script>
run_test({ name: "same origin iframe", run_test({ name: "same origin iframe can't set accept-ch",
initial_url: echo, initial_url: echo,
accept_url: accept, accept_url: accept,
expect_url: expect, expect_url: do_not_expect,
type: "iframe" }); type: "iframe" });
</script> </script>
</body> </body>

View file

@ -0,0 +1,20 @@
<!doctype html>
<meta name="timeout" content="long">
<title>Accept-CH Persistence test</title>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="resources/accept-ch-test.js"></script>
<script>
// Tests that an empty accept-ch header disables client hints.
const test_name = "empty-ch on navigation";
verify_initial_state(echo, test_name);
attempt_set("navigation", accept, test_name, " to non-empty first");
attempt_set("navigation", accept_blank, test_name, " to empty second");
verify_navigation_state(do_not_expect, test_name);
</script>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!doctype html>
<meta name="timeout" content="long">
<title>Accept-CH Persistence test</title>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="resources/accept-ch-test.js"></script>
<script>
// Tests that a non-existing accept-ch header doesn't affect client hints.
const test_name = "empty-ch on navigation";
verify_initial_state(echo, test_name);
attempt_set("navigation", accept, test_name, " to non-empty first");
attempt_set("navigation", no_accept, test_name, " w/o header second");
verify_navigation_state(expect, test_name);
</script>
</body>
</html>

View file

@ -0,0 +1,44 @@
<html>
<head>
<meta http-equiv="Accept-CH" content="viewport-width, rtt">
<meta http-equiv="Accept-CH" content="downlink, ect, lang">
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script>
// Test of merge of http-equiv headers on top of accept-ch provided ones.
//
// resources/echo-client-hints-received.py sets the response headers depending on the set
// of client hints it receives in the request headers.
promise_test(t => {
return fetch(get_host_info()["HTTPS_ORIGIN"] + "/client-hints/resources/echo-client-hints-received.py").then(r => {
assert_equals(r.status, 200)
// Verify that the browser includes client hints in the headers.
assert_true(r.headers.has("device-memory-received"), "device-memory-received");
assert_true(r.headers.has("dpr-received"), "dpr-received");
assert_true(r.headers.has("lang-received"), "lang-received");
assert_true(r.headers.has("viewport-width-received"), "viewport-width-received");
assert_true(r.headers.has("rtt-received"), "rtt-received");
var rtt = parseInt(r.headers.get("rtt-received"));
assert_greater_than_equal(rtt, 0);
assert_less_than_equal(rtt, 3000);
assert_equals(rtt % 50, 0, 'rtt must be a multiple of 50 msec');
assert_true(r.headers.has("downlink-received"), "downlink-received");
var downlinkKbps = r.headers.get("downlink-received") * 1000;
assert_greater_than_equal(downlinkKbps, 0);
assert_less_than_equal(downlinkKbps, 10000);
assert_in_array(r.headers.get("ect-received"), ["slow-2g", "2g",
"3g", "4g"], 'ect-received is unexpected');
});
}, "Accept-CH header test");
</script>
</body>
</html>

View file

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

View file

@ -3,7 +3,7 @@ def main(request, response):
Simple handler that returns an HTML response that passes when the required Simple handler that returns an HTML response that passes when the required
Client Hints are received as request headers. Client Hints are received as request headers.
""" """
values = [ "Device-Memory", "DPR", "Viewport-Width" ] values = [ "Device-Memory", "DPR", "Viewport-Width", "Sec-CH-UA", "Sec-CH-UA-Mobile" ]
result = "PASS" result = "PASS"
log = "" log = ""

View file

@ -6,6 +6,8 @@
<link rel="help" href="https://w3c.github.io/clipboard-apis/#async-clipboard-api"> <link rel="help" href="https://w3c.github.io/clipboard-apis/#async-clipboard-api">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script> <script>
async function loadBlob(fileName) { async function loadBlob(fileName) {
@ -14,6 +16,9 @@ async function loadBlob(fileName) {
} }
promise_test(async t => { promise_test(async t => {
test_driver.set_permission({name: 'clipboard-read'}, 'granted');
test_driver.set_permission({name: 'clipboard-write'}, 'granted');
const blobText = new Blob(['test text'], {type: 'text/plain'}); const blobText = new Blob(['test text'], {type: 'text/plain'});
const blobImage = await loadBlob('resources/greenbox.png'); const blobImage = await loadBlob('resources/greenbox.png');
@ -37,8 +42,3 @@ promise_test(async t => {
assert_equals(blobImageOutput.type, 'image/png'); assert_equals(blobImageOutput.type, 'image/png');
}, 'Verify write and read clipboard (multiple types)'); }, 'Verify write and read clipboard (multiple types)');
</script> </script>
<p>
Note: This is a manual test because it writes/reads to the shared system
clipboard and thus cannot be run async with other tests that might interact
with the clipboard.
</p>

View file

@ -7,7 +7,8 @@
<link rel="help" href="https://w3c.github.io/clipboard-apis/#async-clipboard-api"> <link rel="help" href="https://w3c.github.io/clipboard-apis/#async-clipboard-api">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<p> <p>
<p>The bottom image should display the same image as the top image.</p> <p>The bottom image should display the same image as the top image.</p>
<p>Original Image:</p> <p>Original Image:</p>
@ -39,6 +40,9 @@ async function loadBlob(fileName) {
} }
promise_test(async t => { promise_test(async t => {
test_driver.set_permission({name: 'clipboard-read'}, 'granted');
test_driver.set_permission({name: 'clipboard-write'}, 'granted');
const blobInput = await loadBlob('resources/greenbox.png'); const blobInput = await loadBlob('resources/greenbox.png');
assert_equals(blobInput.type, 'image/png'); assert_equals(blobInput.type, 'image/png');
@ -63,15 +67,13 @@ promise_test(async t => {
}, 'Verify write and read clipboard [image/png Blob]'); }, 'Verify write and read clipboard [image/png Blob]');
promise_test(async t => { promise_test(async t => {
test_driver.set_permission({name: 'clipboard-read'}, 'granted');
test_driver.set_permission({name: 'clipboard-write'}, 'granted');
const invalidPngBlob = new Blob(['this text is not a valid png image'], const invalidPngBlob = new Blob(['this text is not a valid png image'],
{type: "image/png"}); {type: 'image/png'});
const clipboardItemInput = new ClipboardItem({'image/png' : invalidPngBlob}); const clipboardItemInput = new ClipboardItem({'image/png' : invalidPngBlob});
await promise_rejects_dom(t, "DataError", await promise_rejects_dom(t, 'DataError',
navigator.clipboard.write([clipboardItemInput])); navigator.clipboard.write([clipboardItemInput]));
}, 'Verify write error on malformed data [image/png ClipboardItem]'); }, 'Verify write error on malformed data [image/png ClipboardItem]');
</script> </script>
<p>
Note: This is a manual test because it writes/reads to the shared system
clipboard and thus cannot be run async with other tests that might interact
with the clipboard.
</p>

View file

@ -4,6 +4,8 @@
<link rel='help' href='https://w3c.github.io/clipboard-apis/#async-clipboard-api'> <link rel='help' href='https://w3c.github.io/clipboard-apis/#async-clipboard-api'>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<iframe id="iframe"></iframe> <iframe id="iframe"></iframe>
<script> <script>
'use strict'; 'use strict';
@ -12,9 +14,12 @@ promise_test(async t => {
// Note: This tests proper behavior on a detaching iframe. text/plain is // Note: This tests proper behavior on a detaching iframe. text/plain is
// chosen for simplicity, and the test should fail the same way no matter what // chosen for simplicity, and the test should fail the same way no matter what
// the input type is. // the input type is.
test_driver.set_permission({name: 'clipboard-read'}, 'granted');
test_driver.set_permission({name: 'clipboard-write'}, 'granted');
const iframe = document.getElementById('iframe'); const iframe = document.getElementById('iframe');
const iframeClipboard = iframe.contentWindow.navigator.clipboard; const iframeClipboard = iframe.contentWindow.navigator.clipboard;
const blobInput = new Blob(["test string"], {type: 'text/plain'}); const blobInput = new Blob(['test string'], {type: 'text/plain'});
const clipboardItemInput = new ClipboardItem({'text/plain': blobInput}); const clipboardItemInput = new ClipboardItem({'text/plain': blobInput});
// Clipboard API must only be available in focused documents. // Clipboard API must only be available in focused documents.
// reference: https://www.w3.org/TR/clipboard-apis/#privacy-async // reference: https://www.w3.org/TR/clipboard-apis/#privacy-async
@ -25,10 +30,5 @@ promise_test(async t => {
// while the read operation is running. // while the read operation is running.
iframeClipboard.read([clipboardItemInput]); iframeClipboard.read([clipboardItemInput]);
iframe.parentNode.removeChild(iframe); iframe.parentNode.removeChild(iframe);
}, "Verify read fails on detaching iframe"); }, 'Verify read fails on detaching iframe');
</script> </script>
<p>
Note: This is a manual test because it writes/reads to the shared system
clipboard and thus cannot be run async with other tests that might interact
with the clipboard.
</p>

View file

@ -4,6 +4,8 @@
<link rel='help' href='https://w3c.github.io/clipboard-apis/#async-clipboard-api'> <link rel='help' href='https://w3c.github.io/clipboard-apis/#async-clipboard-api'>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<iframe id="iframe"></iframe> <iframe id="iframe"></iframe>
<script> <script>
'use strict'; 'use strict';
@ -12,9 +14,12 @@ promise_test(async t => {
// Note: This tests proper behavior on a detaching iframe. text/plain is // Note: This tests proper behavior on a detaching iframe. text/plain is
// chosen for simplicity, and the test should fail the same way no matter what // chosen for simplicity, and the test should fail the same way no matter what
// the input type is. // the input type is.
test_driver.set_permission({name: 'clipboard-read'}, 'granted');
test_driver.set_permission({name: 'clipboard-write'}, 'granted');
const iframe = document.getElementById('iframe'); const iframe = document.getElementById('iframe');
const iframeClipboard = iframe.contentWindow.navigator.clipboard; const iframeClipboard = iframe.contentWindow.navigator.clipboard;
const blobInput = new Blob(["test string"], {type: 'text/plain'}); const blobInput = new Blob(['test string'], {type: 'text/plain'});
const clipboardItemInput = new ClipboardItem({'text/plain': blobInput}); const clipboardItemInput = new ClipboardItem({'text/plain': blobInput});
// Clipboard API must only be available in focused documents. // Clipboard API must only be available in focused documents.
// reference: https://www.w3.org/TR/clipboard-apis/#privacy-async // reference: https://www.w3.org/TR/clipboard-apis/#privacy-async
@ -25,10 +30,5 @@ promise_test(async t => {
// while the write operation is running. // while the write operation is running.
iframeClipboard.write([clipboardItemInput]); iframeClipboard.write([clipboardItemInput]);
iframe.parentNode.removeChild(iframe); iframe.parentNode.removeChild(iframe);
}, "Verify write fails on detaching iframe"); }, 'Verify write fails on detaching iframe');
</script> </script>
<p>
Note: This is a manual test because it writes/reads to the shared system
clipboard and thus cannot be run async with other tests that might interact
with the clipboard.
</p>

View file

@ -4,6 +4,8 @@
<link rel='help' href='https://w3c.github.io/clipboard-apis/#async-clipboard-api'> <link rel='help' href='https://w3c.github.io/clipboard-apis/#async-clipboard-api'>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<iframe id="iframe"></iframe> <iframe id="iframe"></iframe>
<script> <script>
'use strict'; 'use strict';
@ -12,9 +14,12 @@ promise_test(async t => {
// Note: This tests proper detached iframe behavior. text/plain is chosen for // Note: This tests proper detached iframe behavior. text/plain is chosen for
// simplicity, and the test should fail the same way no matter what the input // simplicity, and the test should fail the same way no matter what the input
// type is. // type is.
test_driver.set_permission({name: 'clipboard-read'}, 'granted');
test_driver.set_permission({name: 'clipboard-write'}, 'granted');
const iframe = document.getElementById('iframe'); const iframe = document.getElementById('iframe');
const iframeClipboard = iframe.contentWindow.navigator.clipboard; const iframeClipboard = iframe.contentWindow.navigator.clipboard;
const blobInput = new Blob(["test string"], {type: 'text/plain'}); const blobInput = new Blob(['test string'], {type: 'text/plain'});
const clipboardItemInput = new ClipboardItem({'text/plain': blobInput}); const clipboardItemInput = new ClipboardItem({'text/plain': blobInput});
// Clipboard API must only be available in focused documents. // Clipboard API must only be available in focused documents.
// reference: https://www.w3.org/TR/clipboard-apis/#privacy-async // reference: https://www.w3.org/TR/clipboard-apis/#privacy-async
@ -25,18 +30,13 @@ promise_test(async t => {
const readResultAttached = await iframeClipboard.read(); const readResultAttached = await iframeClipboard.read();
assert_not_equals(readResultAttached, undefined); assert_not_equals(readResultAttached, undefined);
assert_equals(readResultAttached.length, 1, assert_equals(readResultAttached.length, 1,
"attached iframes should be able to read and write normally"); 'attached iframes should be able to read and write normally');
iframe.parentNode.removeChild(iframe); iframe.parentNode.removeChild(iframe);
// Writing onto a detached iframe's clipboard should fail, but not crash. // Writing onto a detached iframe's clipboard should fail, but not crash.
await iframeClipboard.write([clipboardItemInput]); await iframeClipboard.write([clipboardItemInput]);
const readResultDetached = await iframeClipboard.read(); const readResultDetached = await iframeClipboard.read();
assert_equals(readResultDetached, undefined, assert_equals(readResultDetached, undefined,
"reading from detached iframes should output undefined"); 'reading from detached iframes should output undefined');
}, "Verify read and write fail on detached iframe"); }, 'Verify read and write fail on detached iframe');
</script> </script>
<p>
Note: This is a manual test because it writes/reads to the shared system
clipboard and thus cannot be run async with other tests that might interact
with the clipboard.
</p>

View file

@ -4,11 +4,16 @@
<link rel='help' href='https://w3c.github.io/clipboard-apis/#async-clipboard-api'> <link rel='help' href='https://w3c.github.io/clipboard-apis/#async-clipboard-api'>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<iframe id="iframe"></iframe> <iframe id="iframe"></iframe>
<script> <script>
'use strict'; 'use strict';
promise_test(async t => { promise_test(async t => {
test_driver.set_permission({name: 'clipboard-read'}, 'granted');
test_driver.set_permission({name: 'clipboard-write'}, 'granted');
const iframe = document.getElementById('iframe'); const iframe = document.getElementById('iframe');
// Clipboard API must only be available in focused documents. // Clipboard API must only be available in focused documents.
// reference: https://www.w3.org/TR/clipboard-apis/#privacy-async // reference: https://www.w3.org/TR/clipboard-apis/#privacy-async
@ -16,23 +21,18 @@ promise_test(async t => {
const iframeClipboard = iframe.contentWindow.navigator.clipboard; const iframeClipboard = iframe.contentWindow.navigator.clipboard;
// Writing and reading should succeed on same-origin iframes. // Writing and reading should succeed on same-origin iframes.
const attachedWriteText = "attached write text" const attachedWriteText = 'attached write text'
await iframeClipboard.writeText(attachedWriteText); await iframeClipboard.writeText(attachedWriteText);
const attachedWriteResult = await iframeClipboard.readText(); const attachedWriteResult = await iframeClipboard.readText();
assert_equals(attachedWriteResult, attachedWriteText, assert_equals(attachedWriteResult, attachedWriteText,
"attached iframes should be able to readText and writeText normally"); 'attached iframes should be able to readText and writeText normally');
iframe.parentNode.removeChild(iframe); iframe.parentNode.removeChild(iframe);
// Writing onto a detached iframe's clipboard should fail, but not crash. // Writing onto a detached iframe's clipboard should fail, but not crash.
const detachedWriteText = "detached write text"; const detachedWriteText = 'detached write text';
await iframeClipboard.writeText(detachedWriteText); await iframeClipboard.writeText(detachedWriteText);
const readResultDetached = await iframeClipboard.readText(); const readResultDetached = await iframeClipboard.readText();
assert_equals(readResultDetached, undefined, assert_equals(readResultDetached, undefined,
"reading from detached iframes should output undefined"); 'reading from detached iframes should output undefined');
}, "Verify readText and writeText fails on detached iframe"); }, 'Verify readText and writeText fails on detached iframe');
</script> </script>
<p>
Note: This is a manual test because it writes/reads to the shared system
clipboard and thus cannot be run async with other tests that might interact
with the clipboard.
</p>

View file

@ -7,9 +7,14 @@
<link rel="help" href="https://w3c.github.io/clipboard-apis/#async-clipboard-api"> <link rel="help" href="https://w3c.github.io/clipboard-apis/#async-clipboard-api">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script> <script>
async function readWriteTest(textInput) { async function readWriteTest(textInput) {
promise_test(async t => { promise_test(async t => {
test_driver.set_permission({name: 'clipboard-read'}, 'granted');
test_driver.set_permission({name: 'clipboard-write'}, 'granted');
const blobInput = new Blob([textInput], {type: 'text/plain'}); const blobInput = new Blob([textInput], {type: 'text/plain'});
const clipboardItemInput = new ClipboardItem({'text/plain': blobInput}); const clipboardItemInput = new ClipboardItem({'text/plain': blobInput});
@ -30,8 +35,3 @@ async function readWriteTest(textInput) {
readWriteTest('Clipboard write ([text/plain ClipboardItem]) -> read ([text/plain ClipboardItem]) test'); readWriteTest('Clipboard write ([text/plain ClipboardItem]) -> read ([text/plain ClipboardItem]) test');
readWriteTest('non-Latin1 text encoding test データ'); readWriteTest('non-Latin1 text encoding test データ');
</script> </script>
<p>
Note: This is a manual test because it writes/reads to the shared system
clipboard and thus cannot be run async with other tests that might interact
with the clipboard.
</p>

View file

@ -6,9 +6,14 @@
<link rel="help" href="https://w3c.github.io/clipboard-apis/#async-clipboard-api"> <link rel="help" href="https://w3c.github.io/clipboard-apis/#async-clipboard-api">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script> <script>
async function readWriteTest(textInput) { async function readWriteTest(textInput) {
promise_test(async t => { promise_test(async t => {
test_driver.set_permission({name: 'clipboard-read'}, 'granted');
test_driver.set_permission({name: 'clipboard-write'}, 'granted');
const blobInput = new Blob([textInput], {type: 'text/plain'}); const blobInput = new Blob([textInput], {type: 'text/plain'});
const clipboardItem = new ClipboardItem({'text/plain': blobInput}); const clipboardItem = new ClipboardItem({'text/plain': blobInput});
@ -22,8 +27,3 @@ async function readWriteTest(textInput) {
readWriteTest('Clipboard write ([text/plain ClipboardItem) -> read text test'); readWriteTest('Clipboard write ([text/plain ClipboardItem) -> read text test');
readWriteTest('non-Latin1 text encoding test データ'); readWriteTest('non-Latin1 text encoding test データ');
</script> </script>
<p>
Note: This is a manual test because it writes/reads to the shared system
clipboard and thus cannot be run async with other tests that might interact
with the clipboard.
</p>

View file

@ -6,9 +6,14 @@
<link rel="help" href="https://w3c.github.io/clipboard-apis/#async-clipboard-api"> <link rel="help" href="https://w3c.github.io/clipboard-apis/#async-clipboard-api">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script> <script>
async function readWriteTest(textInput) { async function readWriteTest(textInput) {
promise_test(async t => { promise_test(async t => {
test_driver.set_permission({name: 'clipboard-read'}, 'granted');
test_driver.set_permission({name: 'clipboard-write'}, 'granted');
await navigator.clipboard.writeText(textInput); await navigator.clipboard.writeText(textInput);
const clipboardItems = await navigator.clipboard.read(); const clipboardItems = await navigator.clipboard.read();
assert_equals(clipboardItems.length, 1); assert_equals(clipboardItems.length, 1);
@ -26,8 +31,3 @@ async function readWriteTest(textInput) {
readWriteTest('Clipboard write text -> read ([text/plain ClipboardItem]) test'); readWriteTest('Clipboard write text -> read ([text/plain ClipboardItem]) test');
readWriteTest('non-Latin1 text encoding test データ'); readWriteTest('non-Latin1 text encoding test データ');
</script> </script>
<p>
Note: This is a manual test because it writes/reads to the shared system
clipboard and thus cannot be run async with other tests that might interact
with the clipboard.
</p>

View file

@ -4,9 +4,14 @@
<link rel="help" href="https://w3c.github.io/clipboard-apis/#async-clipboard-api"> <link rel="help" href="https://w3c.github.io/clipboard-apis/#async-clipboard-api">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script> <script>
async function readWriteTest(textInput) { async function readWriteTest(textInput) {
promise_test(async t => { promise_test(async t => {
test_driver.set_permission({name: 'clipboard-read'}, 'granted');
test_driver.set_permission({name: 'clipboard-write'}, 'granted');
await navigator.clipboard.writeText(textInput); await navigator.clipboard.writeText(textInput);
const textOutput = await navigator.clipboard.readText(); const textOutput = await navigator.clipboard.readText();
@ -17,8 +22,3 @@ async function readWriteTest(textInput) {
readWriteTest('Clipboard write text -> read text test'); readWriteTest('Clipboard write text -> read text test');
readWriteTest('non-Latin1 text encoding test データ'); readWriteTest('non-Latin1 text encoding test データ');
</script> </script>
<p>
Note: This is a manual test because it writes/reads to the shared system
clipboard and thus cannot be run async with other tests that might interact
with the clipboard.
</p>

View file

@ -1,5 +1,5 @@
// META: global=window,worker // META: global=window,worker
// META: script=pako/pako_inflate.min.js // META: script=third_party/pako/pako_inflate.min.js
// META: timeout=long // META: timeout=long
'use strict'; 'use strict';

View file

@ -1,5 +1,5 @@
// META: global=window,worker // META: global=window,worker
// META: script=pako/pako_inflate.min.js // META: script=third_party/pako/pako_inflate.min.js
// META: timeout=long // META: timeout=long
'use strict'; 'use strict';

View file

@ -1,5 +1,5 @@
// META: global=window,worker // META: global=window,worker
// META: script=pako/pako_inflate.min.js // META: script=third_party/pako/pako_inflate.min.js
// META: timeout=long // META: timeout=long
'use strict'; 'use strict';

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<link rel="help" href="https://crbug.com/1064987">
<body style="width: 100px;">
<div style="float: right; width: 10px;"></div>
<span>
<div style="display: inline-block; width: 1000px; height: 10px;"></div>
</span>
<span style="position: absolute;"></span>
<span style="float: left; height: 10px; column-gap: 65536px; column-count: 65536;"></span>
</body>

View file

@ -13,7 +13,7 @@
@import url("test-fonts.css"); @import url("test-fonts.css");
@font-face { @font-face {
font-family: "WOFF Test"; font-family: "WOFF Test";
src: url("support/available-002.woff2#1") format("woff2"); src: url("available-002.woff2#1") format("woff2");
} }
body { body {
font-size: 20px; font-size: 20px;

View file

@ -0,0 +1,87 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: minimum contribution with percentages</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-grid/#minimum-contribution">
<meta name="assert" content="Checks that the minimum contribution is the minimum size when the preferred size is 'auto' or contains a percentage.">
<style>
#grid {
display: grid;
height: 50px;
width: 50px;
grid: auto / auto;
}
#item {
background: cyan;
}
#content {
height: 100px;
width: 100px;
}
.min {
min-height: calc(100% + 50px);
min-width: calc(100% + 50px);
}
.max {
max-height: calc(100% - 50px);
max-width: calc(100% - 50px);
}
.size {
height: calc(100% + 10px);
width: calc(100% + 10px);
}
</style>
<div id="log"></div>
<div id="grid">
<div id="item">
<div id="content"></div>
</div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
"use strict";
const cs = getComputedStyle(document.getElementById("grid"));
const item = document.getElementById("item");
function check(name, size) {
item.className = name;
test(function() {
assert_equals(cs.gridTemplateColumns, size + "px", "grid-template-columns");
}, name + " - columns");
test(function() {
assert_equals(cs.gridTemplateRows, size + "px", "grid-template-rows");
}, name + " - rows");
}
// The minimum contribution is the automatic minimum size (100px)
// because the preferred size is 'auto'.
check("auto", 100);
// The minimum contribution is the minimum size (50px)
// because the preferred size is 'auto'.
check("min", 50);
// The minimum contribution is the automatic minimum size (100px)
// because the preferred size is 'auto'.
check("max", 100);
// The minimum contribution is the automatic minimum size (100px)
// because the preferred size depends on the containing block.
check("size", 100);
// The minimum contribution is the minimum size (50px)
// because the preferred size is 'auto'.
check("min max", 50);
// The minimum contribution is the minimum size (50px)
// because the preferred size depends on the containing block.
check("min size", 50);
// The minimum contribution is the automatic minimum size (100px)
// because the preferred size depends on the containing block.
check("max size", 100);
// The minimum contribution is the minimum size (50px)
// because the preferred size depends on the containing block.
check("min max size", 50);
</script>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Ruby Layout: parsing ruby-merge with invalid values</title>
<link rel="help" href="https://drafts.csswg.org/css-ruby-1/#ruby-align-property">
<meta name="assert" content="ruby-merge supports only the grammar 'separate | merge | auto'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("ruby-merge", "none");
test_invalid_value("ruby-merge", "collapse");
test_invalid_value("ruby-merge", "10px");
test_invalid_value("ruby-merge", "merge separate");
test_invalid_value("ruby-merge", "merge auto");
test_invalid_value("ruby-merge", "auto separate");
</script>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Ruby Layout: parsing ruby-merge with valid values</title>
<link rel="help" href="https://drafts.csswg.org/css-ruby-1/#ruby-align-property">
<meta name="assert" content="ruby-merge supports the full grammar 'separate | merge | auto'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("ruby-align", "separate");
test_valid_value("ruby-align", "merge");
test_valid_value("ruby-align", "auto");
</script>
</body>
</html>

View file

@ -0,0 +1,46 @@
<!DOCTYPE html>
<meta charset="utf8">
<title>CSS Scroll Anchoring: prioritize focused element</title>
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring/#anchor-node-selection">
<meta name="assert" content="anchor selection prioritized focused element">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
body { height: 4000px }
.spacer { height: 100px }
#growing { height: 100px }
#focused { height: 10px }
</style>
<div class=spacer></div>
<div class=spacer></div>
<div class=spacer></div>
<div class=spacer></div>
<div id=growing></div>
<div class=spacer></div>
<div id=focused tabindex=0></div>
<div class=spacer></div>
<div class=spacer></div>
<script>
async_test((t) => {
document.scrollingElement.scrollTop = 150;
focused.focus();
const target_rect = focused.getBoundingClientRect();
growing.style.height = "3000px";
requestAnimationFrame(() => {
t.step(() => {
const new_rect = focused.getBoundingClientRect();
assert_equals(new_rect.x, target_rect.x, "x coordinate");
assert_equals(new_rect.y, target_rect.y, "y coordinate");
assert_not_equals(document.scrollingElement.scrollTop, 150, "scroll adjusted");
});
t.done();
});
}, "Anchor selection prioritized focused element.");
</script>

View file

@ -17,6 +17,7 @@
</style> </style>
<div id="target"></div> <div id="target"></div>
<script> <script>
test_computed_value("outline-offset", "2.5px");
test_computed_value("outline-offset", "10px"); test_computed_value("outline-offset", "10px");
test_computed_value("outline-offset", "0.5em", "20px"); test_computed_value("outline-offset", "0.5em", "20px");
test_computed_value("outline-offset", "calc(10px + 0.5em)", "30px"); test_computed_value("outline-offset", "calc(10px + 0.5em)", "30px");

View file

@ -9,7 +9,6 @@
<script src=/resources/testdriver-vendor.js></script> <script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-test-utils.js></script> <script src=resources/event-timing-test-utils.js></script>
<div id='target'>Click me</div> <div id='target'>Click me</div>
<button id='button'>Click me</button>
<script> <script>
promise_test(async t => { promise_test(async t => {
return testEventType(t, 'auxclick'); return testEventType(t, 'auxclick');

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<meta charset=utf-8 />
<title>Event Timing click.</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-actions.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-test-utils.js></script>
<div id='target'>Click me</div>
<script>
promise_test(async t => {
return testEventType(t, 'click');
})
</script>
</html>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<meta charset=utf-8 />
<title>Event Timing contextmenu.</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-actions.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-test-utils.js></script>
<div id='target' contextmenu="mymenu">Menu
<menu type="context" id="mymenu">
<menuitem label="label"></menuitem>
</menu>
</div>
<script>
promise_test(async t => {
return testEventType(t, 'contextmenu');
})
</script>
</html>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<meta charset=utf-8 />
<title>Event Timing dblclick.</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-actions.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-test-utils.js></script>
<div>Outside target!</div>
<div id='target'>Click me</div>
<script>
promise_test(async t => {
return testEventType(t, 'dblclick');
})
</script>
</html>

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<meta charset=utf-8 />
<title>Event Timing mousedown.</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-actions.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-test-utils.js></script>
<div id='target'>Click me</div>
<script>
promise_test(async t => {
return testEventType(t, 'mousedown');
})
</script>
</html>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<meta charset=utf-8 />
<title>Event Timing mouseenter.</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-actions.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-test-utils.js></script>
<div>Outside target!</div>
<div id='target'>Target</div>
<script>
promise_test(async t => {
return testEventType(t, 'mouseenter');
})
</script>
</html>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<meta charset=utf-8 />
<title>Event Timing mouseleave.</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-actions.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-test-utils.js></script>
<div>Outside target!</div>
<div id='target'>Target</div>
<script>
promise_test(async t => {
return testEventType(t, 'mouseleave');
})
</script>
</html>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<meta charset=utf-8 />
<title>Event Timing mouseout.</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-actions.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-test-utils.js></script>
<div>Outside target!</div>
<div id='target'>Target</div>
<script>
promise_test(async t => {
return testEventType(t, 'mouseout', true /* looseCount */);
})
</script>
</html>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<meta charset=utf-8 />
<title>Event Timing mouseover.</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-actions.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-test-utils.js></script>
<div>Outside target!</div>
<div id='target'>Target</div>
<script>
promise_test(async t => {
return testEventType(t, 'mouseover', true /* looseCount */);
})
</script>
</html>

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<meta charset=utf-8 />
<title>Event Timing mouseup.</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-actions.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-test-utils.js></script>
<div id='target'>Target</div>
<script>
promise_test(async t => {
return testEventType(t, 'mouseup');
})
</script>
</html>

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<meta charset=utf-8 />
<title>Event Timing pointerdown.</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-actions.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-test-utils.js></script>
<div id='target'>Target</div>
<script>
promise_test(async t => {
return testEventType(t, 'pointerdown');
})
</script>
</html>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<meta charset=utf-8 />
<title>Event Timing pointerenter.</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-actions.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-test-utils.js></script>
<div>Outside target!</div>
<div id='target'>Target</div>
<script>
promise_test(async t => {
return testEventType(t, 'pointerenter');
})
</script>
</html>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<meta charset=utf-8 />
<title>Event Timing pointerleave.</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-actions.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-test-utils.js></script>
<div>Outside target!</div>
<div id='target'>Target</div>
<script>
promise_test(async t => {
return testEventType(t, 'pointerleave');
})
</script>
</html>

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