mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Auto merge of #23610 - servo-wpt-sync:wpt_update_23-06-2019, r=servo-wpt-sync
Sync WPT with upstream (23-06-2019) Automated downstream sync of changes from upstream as of 23-06-2019. [no-wpt-sync]
This commit is contained in:
commit
223d6cd13c
204 changed files with 5112 additions and 1445 deletions
|
@ -14,6 +14,9 @@
|
||||||
[Revoke blob URL after creating Request, will fetch]
|
[Revoke blob URL after creating Request, will fetch]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Revoke blob URL after calling fetch, fetch should succeed]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
||||||
[url-with-fetch.any.html]
|
[url-with-fetch.any.html]
|
||||||
[Untitled]
|
[Untitled]
|
||||||
|
@ -34,3 +37,6 @@
|
||||||
[Revoke blob URL after creating Request, will fetch]
|
[Revoke blob URL after creating Request, will fetch]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Revoke blob URL after calling fetch, fetch should succeed]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -74,6 +74,3 @@
|
||||||
[opacity end]
|
[opacity end]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[outline-width end]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
10
tests/wpt/metadata/css/css-ui/appearance-parsing.html.ini
Normal file
10
tests/wpt/metadata/css/css-ui/appearance-parsing.html.ini
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[appearance-parsing.html]
|
||||||
|
[parsing via modification of cssText]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[parsing via attribute change steps of CSS declaration block's owner node]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[parsing via creation of CSS declaration block]
|
||||||
|
expected: FAIL
|
||||||
|
|
13
tests/wpt/metadata/css/css-ui/appearance-property.html.ini
Normal file
13
tests/wpt/metadata/css/css-ui/appearance-property.html.ini
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[appearance-property.html]
|
||||||
|
[property access]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[removeProperty]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[getPropertyValue]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[setProperty]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
[appearance-serialization.html]
|
||||||
|
[serialization via CSSStyleRule]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[serialization via CSSStyleDeclaration]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[serialization via CSSMediaRule]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
[webkit-appearance-parsing.html]
|
||||||
|
[parsing via modification of cssText]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[parsing via attribute change steps of CSS declaration block's owner node]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[parsing via creation of CSS declaration block]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
[webkit-appearance-property.html]
|
||||||
|
[removeProperty - camel-cased property name (ignored)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[removeProperty - webkit-cased property name (ignored)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[setProperty - CSS property name]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[property assignment - webkit-cased property name]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[setProperty - camel-cased property name (ignored)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[property assignment - camel-cased property name]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[property access - CSS property name]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[removeProperty - CSS property name]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[property access - webkit-cased property name]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[property access - camel-cased property name]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[getPropertyValue - CSS property name]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[property assignment - CSS property name]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[setProperty - webkit-cased property name (ignored)]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
[webkit-appearance-serialization.html]
|
||||||
|
[serialization via CSSStyleRule]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[serialization via CSSStyleDeclaration]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[serialization via CSSMediaRule]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
[backdrop-filter-plus-mask.html]
|
||||||
|
expected: FAIL
|
|
@ -2,7 +2,6 @@
|
||||||
type: testharness
|
type: testharness
|
||||||
|
|
||||||
[single-byte-decoder.html?document]
|
[single-byte-decoder.html?document]
|
||||||
expected: TIMEOUT
|
|
||||||
[ISO-8859-4: iso_8859-4:1988 (document.characterSet and document.inputEncoding)]
|
[ISO-8859-4: iso_8859-4:1988 (document.characterSet and document.inputEncoding)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -321,12 +321,15 @@
|
||||||
[<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>: separate response Content-Type: text/html;" text/plain]
|
[<iframe>: separate response Content-Type: text/html;" text/plain]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
|
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[<iframe>: combined response Content-Type: text/html */*;charset=gbk]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -56,3 +56,9 @@
|
||||||
[separate text/javascript x/x]
|
[separate text/javascript x/x]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[separate text/javascript;charset=windows-1252 error text/javascript]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[separate text/javascript ]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,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%2Cnosniff]
|
[X-Content-Type-Options%3A%20'NosniFF']
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
[multiple-redirect-https-downgrade-upgrade.tentative.sub.html]
|
||||||
|
expected: ERROR
|
||||||
|
[Https downgrade-upgrade iframe => No headers]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Https downgrade-upgrade script => No headers]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Https downgrade-upgrade top level navigation => No headers]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Https downgrade-upgrade fetch() api => No headers]
|
||||||
|
expected: NOTRUN
|
||||||
|
|
||||||
|
[Https downgrade-upgrade embed => No headers]
|
||||||
|
expected: TIMEOUT
|
||||||
|
|
||||||
|
[Https downgrade-upgrade object => No headers]
|
||||||
|
expected: NOTRUN
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
[redirect-http-upgrade.tentative.sub.html]
|
||||||
|
expected: ERROR
|
||||||
|
[Http upgrade object => No headers]
|
||||||
|
expected: NOTRUN
|
||||||
|
|
||||||
|
[Http upgrade embed => No headers]
|
||||||
|
expected: TIMEOUT
|
||||||
|
|
||||||
|
[Http upgrade script => No headers]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Http upgrade iframe => No headers]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Http upgrade top level navigation => No headers]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Http upgrade fetch() api => No headers]
|
||||||
|
expected: NOTRUN
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
[redirect-https-downgrade.tentative.sub.html]
|
||||||
|
expected: ERROR
|
||||||
|
[Https downgrade fetch() api => No headers]
|
||||||
|
expected: NOTRUN
|
||||||
|
|
||||||
|
[Https downgrade object => No headers]
|
||||||
|
expected: NOTRUN
|
||||||
|
|
||||||
|
[Https downgrade embed => No headers]
|
||||||
|
expected: TIMEOUT
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[traverse_the_history_4.html]
|
[traverse_the_history_3.html]
|
||||||
[Multiple history traversals, last would be aborted]
|
[Multiple history traversals, last would be aborted]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
[new_window_null.tentative.html]
|
||||||
|
[null document opening popup to http://not-web-platform.test:8000 with COOP: "same-site unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://web-platform.test:8000 with COOP: "jibberish"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://web-platform.test:8000 with COOP: "same-origin unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://web-platform.test:8000 with COOP: "same-site unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://not-web-platform.test:8000 with COOP: "jibberish"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://www1.web-platform.test:8000 with COOP: "same-origin unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://www1.web-platform.test:8000 with COOP: "same-origin"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://web-platform.test:8000 with COOP: "same-origin"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://not-web-platform.test:8000 with COOP: "same-origin unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://not-web-platform.test:8000 with COOP: "same-origin"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://www1.web-platform.test:8000 with COOP: ""]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://www1.web-platform.test:8000 with COOP: "same-site"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://www1.web-platform.test:8000 with COOP: "same-site unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://www1.web-platform.test:8000 with COOP: "jibberish"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://web-platform.test:8000 with COOP: "same-site"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://web-platform.test:8000 with COOP: ""]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://not-web-platform.test:8000 with COOP: "same-site"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[null document opening popup to http://not-web-platform.test:8000 with COOP: ""]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
[new_window_same_origin.tentative.html]
|
||||||
|
[same-origin document opening popup to http://www1.web-platform.test:8000 with COOP: "same-site unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://web-platform.test:8000 with COOP: "same-origin"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://web-platform.test:8000 with COOP: "same-origin unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://www1.web-platform.test:8000 with COOP: "same-origin"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://not-web-platform.test:8000 with COOP: "jibberish"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://web-platform.test:8000 with COOP: "same-site unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://not-web-platform.test:8000 with COOP: "same-site"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://not-web-platform.test:8000 with COOP: "same-site unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://www1.web-platform.test:8000 with COOP: "same-site"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://www1.web-platform.test:8000 with COOP: ""]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://web-platform.test:8000 with COOP: ""]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://not-web-platform.test:8000 with COOP: ""]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://www1.web-platform.test:8000 with COOP: "jibberish"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://web-platform.test:8000 with COOP: "same-site"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://www1.web-platform.test:8000 with COOP: "same-origin unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://not-web-platform.test:8000 with COOP: "same-origin unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://web-platform.test:8000 with COOP: "jibberish"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin document opening popup to http://not-web-platform.test:8000 with COOP: "same-origin"]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
[new_window_same_origin_unsafe_allow_outgoing.tentative.html]
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://not-web-platform.test:8000 with COOP: ""]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://not-web-platform.test:8000 with COOP: "same-origin"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://not-web-platform.test:8000 with COOP: "jibberish"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://www1.web-platform.test:8000 with COOP: "same-origin unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://www1.web-platform.test:8000 with COOP: "same-site unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://www1.web-platform.test:8000 with COOP: "jibberish"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://www1.web-platform.test:8000 with COOP: "same-origin"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://web-platform.test:8000 with COOP: "same-site unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://not-web-platform.test:8000 with COOP: "same-origin unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://not-web-platform.test:8000 with COOP: "same-site unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://web-platform.test:8000 with COOP: ""]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://web-platform.test:8000 with COOP: "same-site"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://web-platform.test:8000 with COOP: "same-origin unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://web-platform.test:8000 with COOP: "same-origin"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://web-platform.test:8000 with COOP: "jibberish"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://not-web-platform.test:8000 with COOP: "same-site"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://www1.web-platform.test:8000 with COOP: ""]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-origin_unsafe-allow-outgoing document opening popup to http://www1.web-platform.test:8000 with COOP: "same-site"]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
[new_window_same_site.tentative.html]
|
||||||
|
[same-site document opening popup to http://not-web-platform.test:8000 with COOP: "jibberish"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://www1.web-platform.test:8000 with COOP: "same-site"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://web-platform.test:8000 with COOP: "same-site"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://web-platform.test:8000 with COOP: "same-origin"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://not-web-platform.test:8000 with COOP: "same-origin unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://www1.web-platform.test:8000 with COOP: "same-site unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://web-platform.test:8000 with COOP: ""]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://www1.web-platform.test:8000 with COOP: "same-origin"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://www1.web-platform.test:8000 with COOP: "jibberish"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://not-web-platform.test:8000 with COOP: "same-site unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://not-web-platform.test:8000 with COOP: ""]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://not-web-platform.test:8000 with COOP: "same-site"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://www1.web-platform.test:8000 with COOP: "same-origin unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://web-platform.test:8000 with COOP: "same-origin unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://web-platform.test:8000 with COOP: "same-site unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://web-platform.test:8000 with COOP: "jibberish"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://not-web-platform.test:8000 with COOP: "same-origin"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site document opening popup to http://www1.web-platform.test:8000 with COOP: ""]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
[new_window_same_site_unsafe_allow_outgoing.tentative.html]
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://not-web-platform.test:8000 with COOP: ""]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://www1.web-platform.test:8000 with COOP: "same-site unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://web-platform.test:8000 with COOP: "same-origin"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://not-web-platform.test:8000 with COOP: "same-site"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://web-platform.test:8000 with COOP: ""]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://not-web-platform.test:8000 with COOP: "same-site unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://web-platform.test:8000 with COOP: "same-site"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://not-web-platform.test:8000 with COOP: "jibberish"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://www1.web-platform.test:8000 with COOP: "same-origin unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://not-web-platform.test:8000 with COOP: "same-origin unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://www1.web-platform.test:8000 with COOP: "same-site"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://www1.web-platform.test:8000 with COOP: ""]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://www1.web-platform.test:8000 with COOP: "jibberish"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://web-platform.test:8000 with COOP: "jibberish"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://web-platform.test:8000 with COOP: "same-origin unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://web-platform.test:8000 with COOP: "same-site unsafe-allow-outgoing"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://not-web-platform.test:8000 with COOP: "same-origin"]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[same-site_unsafe-allow-outgoing document opening popup to http://www1.web-platform.test:8000 with COOP: "same-origin"]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
[unload-event-same-origin-check.html]
|
||||||
|
[Redirect chain with a partial TAO opt-in]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[No previous document with same origin redirect]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[cross-cross-same Redirect chain with no TAO opt-in]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Same-cross-same redirect chain with no TAO opt-in]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Same origin previous document with same origin redirect]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Redirect chain with full TAO opt-in]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Previous document same origin]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[No previous document]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[No previous document with cross origin redirect]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Previous document cross origin]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[No previous document with cross origin redirect with TAO]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[No previous document with cross origin redirect with partial TAO]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
[subresource-integrity.html]
|
||||||
|
[Style: Same-origin with correct sha256 and sha512 hash, rel='alternate stylesheet' enabled]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
[realtimeanalyser-fft-scaling.html]
|
[realtimeanalyser-fft-scaling.html]
|
||||||
|
expected: TIMEOUT
|
||||||
[X 2048-point FFT peak position is not equal to 64. Got 0.]
|
[X 2048-point FFT peak position is not equal to 64. Got 0.]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -40,3 +40,7 @@
|
||||||
|
|
||||||
[test_height_width_larger_than_max]
|
[test_height_width_larger_than_max]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[test_negative_x_y]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
[alerts.py]
|
||||||
|
[test_retain_tab_modal_status]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
[remove-own-iframe-during-onerror.window.html]
|
||||||
|
expected: TIMEOUT
|
||||||
|
[removing an iframe from within an onerror handler should work]
|
||||||
|
expected: TIMEOUT
|
||||||
|
|
|
@ -85,11 +85,11 @@ jobs:
|
||||||
- template: tools/ci/azure/install_safari.yml
|
- template: tools/ci/azure/install_safari.yml
|
||||||
- template: tools/ci/azure/update_hosts.yml
|
- template: tools/ci/azure/update_hosts.yml
|
||||||
- template: tools/ci/azure/update_manifest.yml
|
- template: tools/ci/azure/update_manifest.yml
|
||||||
- script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl $(Build.ArtifactStagingDirectory)/chrome.tbpl.log --log-tbpl-level info --channel dev chrome infrastructure/
|
- script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl - --log-tbpl-level info --channel dev chrome infrastructure/
|
||||||
displayName: 'Run tests: Chrome Dev'
|
displayName: 'Run tests: Chrome Dev'
|
||||||
- script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl $(Build.ArtifactStagingDirectory)/firefox.tbpl.log --log-tbpl-level info --channel nightly firefox infrastructure/
|
- script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl - --log-tbpl-level info --channel nightly firefox infrastructure/
|
||||||
displayName: 'Run tests: Firefox Nightly'
|
displayName: 'Run tests: Firefox Nightly'
|
||||||
- script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl $(Build.ArtifactStagingDirectory)/safari.tbpl.log --log-tbpl-level info --channel preview safari infrastructure/
|
- script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl - --log-tbpl-level info --channel preview safari infrastructure/
|
||||||
displayName: 'Run tests: Safari Technology Preview'
|
displayName: 'Run tests: Safari Technology Preview'
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: 'Publish results'
|
displayName: 'Publish results'
|
||||||
|
@ -223,7 +223,7 @@ jobs:
|
||||||
- template: tools/ci/azure/install_edge.yml
|
- template: tools/ci/azure/install_edge.yml
|
||||||
- template: tools/ci/azure/update_hosts.yml
|
- template: tools/ci/azure/update_hosts.yml
|
||||||
- template: tools/ci/azure/update_manifest.yml
|
- template: tools/ci/azure/update_manifest.yml
|
||||||
- script: python ./wpt run --yes --no-manifest-update --install-fonts --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl $(Build.ArtifactStagingDirectory)/edge.tbpl.log --log-tbpl-level info --channel dev edgechromium infrastructure/
|
- script: python ./wpt run --yes --no-manifest-update --install-fonts --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl - --log-tbpl-level info --channel dev edgechromium infrastructure/
|
||||||
displayName: 'Run tests: Edge Dev'
|
displayName: 'Run tests: Edge Dev'
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: 'Publish results'
|
displayName: 'Publish results'
|
||||||
|
@ -256,7 +256,7 @@ jobs:
|
||||||
- template: tools/ci/azure/install_edge.yml
|
- template: tools/ci/azure/install_edge.yml
|
||||||
- template: tools/ci/azure/update_hosts.yml
|
- template: tools/ci/azure/update_hosts.yml
|
||||||
- template: tools/ci/azure/update_manifest.yml
|
- template: tools/ci/azure/update_manifest.yml
|
||||||
- script: python ./wpt run --yes --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --install-fonts --this-chunk $(System.JobPositionInPhase) --total-chunks $(System.TotalJobsInPhase) --chunk-type hash --log-tbpl - --log-tbpl-level info --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --channel dev edgechromium
|
- script: python ./wpt run --yes --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --install-fonts --this-chunk $(System.JobPositionInPhase) --total-chunks $(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-tbpl - --log-tbpl-level info --channel dev edgechromium
|
||||||
displayName: 'Run tests: Edge Dev'
|
displayName: 'Run tests: Edge Dev'
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: 'Publish results'
|
displayName: 'Publish results'
|
||||||
|
@ -293,7 +293,7 @@ jobs:
|
||||||
- script: |
|
- script: |
|
||||||
# TODO: drop this when `safaridriver --version` is supported.
|
# TODO: drop this when `safaridriver --version` is supported.
|
||||||
SAFARI_VERSION="$(/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' /Applications/Safari.app/Contents/Info.plist) ($(/usr/libexec/PlistBuddy -c 'Print :CFBundleVersion' /Applications/Safari.app/Contents/Info.plist))"
|
SAFARI_VERSION="$(/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' /Applications/Safari.app/Contents/Info.plist) ($(/usr/libexec/PlistBuddy -c 'Print :CFBundleVersion' /Applications/Safari.app/Contents/Info.plist))"
|
||||||
no_proxy='*' ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --browser-version "$SAFARI_VERSION" safari
|
no_proxy='*' ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-tbpl - --log-tbpl-level info --browser-version "$SAFARI_VERSION" safari
|
||||||
displayName: 'Run tests'
|
displayName: 'Run tests'
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: 'Publish results'
|
displayName: 'Publish results'
|
||||||
|
@ -324,7 +324,7 @@ jobs:
|
||||||
- template: tools/ci/azure/install_safari.yml
|
- template: tools/ci/azure/install_safari.yml
|
||||||
- template: tools/ci/azure/update_hosts.yml
|
- template: tools/ci/azure/update_hosts.yml
|
||||||
- template: tools/ci/azure/update_manifest.yml
|
- template: tools/ci/azure/update_manifest.yml
|
||||||
- script: no_proxy='*' ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --channel preview safari
|
- script: no_proxy='*' ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-tbpl - --log-tbpl-level info --channel preview safari
|
||||||
displayName: 'Run tests'
|
displayName: 'Run tests'
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: 'Publish results'
|
displayName: 'Publish results'
|
||||||
|
|
|
@ -6,12 +6,13 @@
|
||||||
<script src=support.js></script>
|
<script src=support.js></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var open_rq = createdb(async_test(), 'database_name', 13);
|
var database_name = document.location + '-database_name';
|
||||||
|
var open_rq = createdb(async_test(), database_name, 13);
|
||||||
|
|
||||||
open_rq.onupgradeneeded = function(e) {};
|
open_rq.onupgradeneeded = function(e) {};
|
||||||
open_rq.onsuccess = function(e) {
|
open_rq.onsuccess = function(e) {
|
||||||
var db = e.target.result;
|
var db = e.target.result;
|
||||||
assert_equals(db.name, 'database_name', 'db.name');
|
assert_equals(db.name, database_name, 'db.name');
|
||||||
assert_equals(db.version, 13, 'db.version');
|
assert_equals(db.version, 13, 'db.version');
|
||||||
this.done();
|
this.done();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<script src=support.js></script>
|
<script src=support.js></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var open_rq = createdb(async_test(), 'database_name');
|
var open_rq = createdb(async_test(), document.location + '-database_name');
|
||||||
|
|
||||||
open_rq.onupgradeneeded = function(e) {
|
open_rq.onupgradeneeded = function(e) {
|
||||||
assert_equals(e.target.result.version, 1, "db.version");
|
assert_equals(e.target.result.version, 1, "db.version");
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<script src=support.js></script>
|
<script src=support.js></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var open_rq = createdb(async_test(), 'database_name');
|
var open_rq = createdb(async_test(), document.location + '-database_name');
|
||||||
|
|
||||||
open_rq.onupgradeneeded = function() {};
|
open_rq.onupgradeneeded = function() {};
|
||||||
open_rq.onsuccess = function(e) {
|
open_rq.onsuccess = function(e) {
|
||||||
|
|
|
@ -7,12 +7,19 @@
|
||||||
<script src='/resources/testharnessreport.js'></script>
|
<script src='/resources/testharnessreport.js'></script>
|
||||||
<script nonce='abc'>
|
<script nonce='abc'>
|
||||||
var t_spv = async_test("Should fire violation events for every failed violation");
|
var t_spv = async_test("Should fire violation events for every failed violation");
|
||||||
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
window.addEventListener(
|
||||||
assert_equals(e.violatedDirective, "script-src");
|
"securitypolicyviolation", t_spv.unreached_func("securitypolicyviolation should not be emitted"));
|
||||||
}));
|
|
||||||
|
window.addEventListener("load", function() {
|
||||||
|
t_spv.done();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<script src='positiveTest.js'></script>
|
<script src='positiveTest.js'></script>
|
||||||
<script nonce='abc'>t_spv.done();</script>
|
<script nonce='abc'>
|
||||||
|
test(function() {
|
||||||
|
assert_true(window.cspPositiveTest);
|
||||||
|
}, "Allows scripts from the same host.");
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>'self' keyword positive test</h1>
|
<h1>'self' keyword positive test</h1>
|
||||||
|
|
|
@ -9,17 +9,16 @@
|
||||||
<script>
|
<script>
|
||||||
var t = async_test("Test that script does not fire violation event");
|
var t = async_test("Test that script does not fire violation event");
|
||||||
window.addEventListener("securitypolicyviolation", t.unreached_func("Should not have fired a violation event"));
|
window.addEventListener("securitypolicyviolation", t.unreached_func("Should not have fired a violation event"));
|
||||||
|
window.addEventListener("load", t.step_func(function() {
|
||||||
|
assert_true(window.wildcardHostTestRan);
|
||||||
|
t.done();
|
||||||
|
}));
|
||||||
var head = document.getElementsByTagName('head')[0];
|
var head = document.getElementsByTagName('head')[0];
|
||||||
var script = document.createElement('script');
|
var script = document.createElement('script');
|
||||||
script.type = 'text/javascript';
|
script.type = 'text/javascript';
|
||||||
script.src = "http://www." + location.hostname + ":" + location.port + "/content-security-policy/generic/wildcardHostTestSuceeds.js";
|
script.src = "http://www." + location.hostname + ":" + location.port + "/content-security-policy/generic/wildcardHostTestSuceeds.js";
|
||||||
head.appendChild(script);
|
head.appendChild(script);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
|
||||||
t.done();
|
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>test wildcard host name matching (asterisk as a subdomain of the current domain)</h1>
|
<h1>test wildcard host name matching (asterisk as a subdomain of the current domain)</h1>
|
||||||
|
|
|
@ -8,8 +8,13 @@
|
||||||
<script src='wildcardHostTestFailure.js'></script>
|
<script src='wildcardHostTestFailure.js'></script>
|
||||||
<script>
|
<script>
|
||||||
var t_spv = async_test("Should fire violation events for every failed violation");
|
var t_spv = async_test("Should fire violation events for every failed violation");
|
||||||
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
|
var spvEvent;
|
||||||
assert_equals(e.violatedDirective, "script-src-elem");
|
window.addEventListener("securitypolicyviolation", t_spv.step_func(function(e) {
|
||||||
|
spvEvent = e;
|
||||||
|
}));
|
||||||
|
addEventListener("load", t_spv.step_func_done(function() {
|
||||||
|
assert_true(!!spvEvent);
|
||||||
|
assert_equals(spvEvent.violatedDirective, "script-src-elem");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var head = document.getElementsByTagName('head')[0];
|
var head = document.getElementsByTagName('head')[0];
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
<script>
|
<script>
|
||||||
var t = async_test("Test that script does not fire violation event");
|
var t = async_test("Test that script does not fire violation event");
|
||||||
window.addEventListener("securitypolicyviolation", t.unreached_func("Should not have fired a violation event"));
|
window.addEventListener("securitypolicyviolation", t.unreached_func("Should not have fired a violation event"));
|
||||||
|
window.addEventListener("load", function() {
|
||||||
|
t.done();
|
||||||
|
});
|
||||||
|
|
||||||
var head = document.getElementsByTagName('head')[0];
|
var head = document.getElementsByTagName('head')[0];
|
||||||
var script = document.createElement('script');
|
var script = document.createElement('script');
|
||||||
|
@ -16,10 +19,6 @@
|
||||||
script.src = "http://" + location.hostname + ":{{ports[http][1]}}/content-security-policy/generic/wildcardPortTestSuceeds.js";
|
script.src = "http://" + location.hostname + ":{{ports[http][1]}}/content-security-policy/generic/wildcardPortTestSuceeds.js";
|
||||||
head.appendChild(script);
|
head.appendChild(script);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
|
||||||
t.done();
|
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>test wildcard port number matching</h1>
|
<h1>test wildcard port number matching</h1>
|
||||||
|
|
|
@ -18,11 +18,24 @@
|
||||||
<br>
|
<br>
|
||||||
<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAABACAIAAAABPqsMAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1QoMCC8h3if5rgAAAB10RVh0Q29tbWVudABDcmVhdGVkIHdpdGggVGhlIEdJTVDvZCVuAAAGD0lEQVR42u2aa0yTVxiA39ILxa4KIkKrVCCIitzrqkAXQiXDSFjQHyZDBRRdtoDzgooao5uaoInID4hRJFC8RBOzxQuKigyYokuDSB0WlaJQlQrITRCwte1+nKVhpbT9aGUue59fb84573dO+uR7v/drS4OfAPkf4oQfAYpHUDyC4hEUj6B4BMUjKB5B8QiKR1A8guIRFI+geATFIygeQfEIikdQPEIVxmd1GsN+w9hBrV7bN9Kn7FHWqmqLHxY3vW2ycIWtS7Yeiz9G4h0VO47eO2rj1p4cz7WhayW+kuCZwdNdpjsznIe0Q53vO1X9qsbOxrr2uprWmrb+Nofn/lvQPqs/W5oVb0KBrCDrVpZGpzE7++iHR8Ezg0ms6FIsPL7Qho+Ali3O3h+zn81gW1n5M82BuVjqqZEpyjyVeMrs1CL+IqN1AAj0CBTNElm9YGFiYc7SHKvmHJ6Lpd7K/cF0YvK5/KV+S3eLd/tP9weAlNAUaYO0qrXKJGtd2DoS6A16J5oTGZG9llnYKDEgcUPEBhI/636WL8uvelHV1t82rB1mM9geHA8fV58QzxAhTxjjE+PAXCz15ku92cLIZXFr1tWEe4UDwLk/z635dc3oWWe6s3q72o3tBgD7qvYdiD0AAH0jfbxc3sjHkfF2LF9dvsx/GQDcbLmZdCHJwkrH5mKpp8CAZiC7IpvEUd5RJrMrFqwg1pU9ykO/H2rpbQEAV7brygUrLVxz8ezFJNh2cxtVc/bkonhq3Ht5jwReX3iNV+elDVIDGKQNUpNxs0x1nkoCZY+S6mHsyUXxE30oGP7R/3tP9Y7ziyNP91J5KQCUNpTqDXoAkPhKBNME412ne6ibBEEzg6iewZ5cFE8NY4XveN8xejw1LJV0cxXPK169ewUAL9+9vP38NgA40ZxSQ1OtlpDCxMI50+ZMrPxMIBfFU4DD5ByOO2zyoRPSwtJIUPyw2DhojNPC0mhg/jU67488AxgAQMgTNv/YfPXbq5miTNEskQvDxep57MnFrt56V890YvK4vFif2D1f7QlwDyCDcafjKl9UkjhmTkx1WjUA9Az38HP5H3Qfxvb5saWx1a3VZjfdsmRL7te5pGAY0Rl0ii7FnbY7l55cqnxRSZ4ajs1F8WbEW8bkXU6aJCXFvEBWsKl80+iVBcsLMr7MAIDT8tOpl8Yt+JGzIw9KDkp8JWYLg7JHmXUr68rTKw7PRfEUxJ98cHJz+Wbjbc1lcdXb1RwmBwCEhcJ6df3oxUKesO67OgAY0g55HfUa0AxYuLJgmmD53OVigTiCFxHgHkCn0UfP7rq960jtkU+Ri+LH/ZGmf6S/pbelVlVb0lDS2Nk4ejY9PL3omyIAkHfIw06EjU2Xfy8P8QwBgI1XNxbVF9l4EheGi5AvTJibkB6R7jHFAwAMYBAXi016C4fn4jPe1p807q6/G+0dbWMTHl0cTfVIbmy3suQy8jZxUXFx1cVVk5OLXb0lAtwDbLROXgWNvaHt9I70ZlzPILFYIJ60XBRvCcvfytm/ntDU9fc/AEjdnrTcTwrjv2udTqOnhKaQOOlC0uWnl8dbmTA3oSy5DABSQlP2/rZXZ9BR2mjejHkksNwbOjwX73jzxPvH87l8AOh433Gt+ZqFlTeUN9SDagDgc/nx/vGUdpnCnJIXn0fiB+0PJi0X73jrdfvso7Mf9R8trNQZdGfkZ3ZG7yRZ15uvG6dUW1W1qtp6db2iS9HW36YeUA9qBrV6LYfJ8XPzk/hKMkWZfm5+ZLHJS4E9udjVT7Crd3dxb89qZ9FZABB0POhx12PL6+fPmN+U0QQAGp2Gn8vvHu6m9JWR2bbcnlws9RNkdchqYl32WmbVOgA8efvk/qv7AMCis5KDkyntpdFpcu7mJP+SPIFz2pOLpd5SnS9pKLExpeRhSeTsSABYH74+X5ZPBgV5gijvqAheRKBHoI+rD4/L47K4TDpzWDv8ZvCNoktR3Vp9vvF8+0D72Avak4ulHsFSj6B4BMUjKB5B8QiKR1A8guIRFI+geATFo3gExSMoHkHxCIpHUDyC4hEUj6B45HPmL9so2ZKs94sNAAAAAElFTkSuQmCC'>
|
<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAABACAIAAAABPqsMAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1QoMCC8h3if5rgAAAB10RVh0Q29tbWVudABDcmVhdGVkIHdpdGggVGhlIEdJTVDvZCVuAAAGD0lEQVR42u2aa0yTVxiA39ILxa4KIkKrVCCIitzrqkAXQiXDSFjQHyZDBRRdtoDzgooao5uaoInID4hRJFC8RBOzxQuKigyYokuDSB0WlaJQlQrITRCwte1+nKVhpbT9aGUue59fb84573dO+uR7v/drS4OfAPkf4oQfAYpHUDyC4hEUj6B4BMUjKB5B8QiKR1A8guIRFI+geATFIygeQfEIikdQPEIVxmd1GsN+w9hBrV7bN9Kn7FHWqmqLHxY3vW2ycIWtS7Yeiz9G4h0VO47eO2rj1p4cz7WhayW+kuCZwdNdpjsznIe0Q53vO1X9qsbOxrr2uprWmrb+Nofn/lvQPqs/W5oVb0KBrCDrVpZGpzE7++iHR8Ezg0ms6FIsPL7Qho+Ali3O3h+zn81gW1n5M82BuVjqqZEpyjyVeMrs1CL+IqN1AAj0CBTNElm9YGFiYc7SHKvmHJ6Lpd7K/cF0YvK5/KV+S3eLd/tP9weAlNAUaYO0qrXKJGtd2DoS6A16J5oTGZG9llnYKDEgcUPEBhI/636WL8uvelHV1t82rB1mM9geHA8fV58QzxAhTxjjE+PAXCz15ku92cLIZXFr1tWEe4UDwLk/z635dc3oWWe6s3q72o3tBgD7qvYdiD0AAH0jfbxc3sjHkfF2LF9dvsx/GQDcbLmZdCHJwkrH5mKpp8CAZiC7IpvEUd5RJrMrFqwg1pU9ykO/H2rpbQEAV7brygUrLVxz8ezFJNh2cxtVc/bkonhq3Ht5jwReX3iNV+elDVIDGKQNUpNxs0x1nkoCZY+S6mHsyUXxE30oGP7R/3tP9Y7ziyNP91J5KQCUNpTqDXoAkPhKBNME412ne6ibBEEzg6iewZ5cFE8NY4XveN8xejw1LJV0cxXPK169ewUAL9+9vP38NgA40ZxSQ1OtlpDCxMI50+ZMrPxMIBfFU4DD5ByOO2zyoRPSwtJIUPyw2DhojNPC0mhg/jU67488AxgAQMgTNv/YfPXbq5miTNEskQvDxep57MnFrt56V890YvK4vFif2D1f7QlwDyCDcafjKl9UkjhmTkx1WjUA9Az38HP5H3Qfxvb5saWx1a3VZjfdsmRL7te5pGAY0Rl0ii7FnbY7l55cqnxRSZ4ajs1F8WbEW8bkXU6aJCXFvEBWsKl80+iVBcsLMr7MAIDT8tOpl8Yt+JGzIw9KDkp8JWYLg7JHmXUr68rTKw7PRfEUxJ98cHJz+Wbjbc1lcdXb1RwmBwCEhcJ6df3oxUKesO67OgAY0g55HfUa0AxYuLJgmmD53OVigTiCFxHgHkCn0UfP7rq960jtkU+Ri+LH/ZGmf6S/pbelVlVb0lDS2Nk4ejY9PL3omyIAkHfIw06EjU2Xfy8P8QwBgI1XNxbVF9l4EheGi5AvTJibkB6R7jHFAwAMYBAXi016C4fn4jPe1p807q6/G+0dbWMTHl0cTfVIbmy3suQy8jZxUXFx1cVVk5OLXb0lAtwDbLROXgWNvaHt9I70ZlzPILFYIJ60XBRvCcvfytm/ntDU9fc/AEjdnrTcTwrjv2udTqOnhKaQOOlC0uWnl8dbmTA3oSy5DABSQlP2/rZXZ9BR2mjejHkksNwbOjwX73jzxPvH87l8AOh433Gt+ZqFlTeUN9SDagDgc/nx/vGUdpnCnJIXn0fiB+0PJi0X73jrdfvso7Mf9R8trNQZdGfkZ3ZG7yRZ15uvG6dUW1W1qtp6db2iS9HW36YeUA9qBrV6LYfJ8XPzk/hKMkWZfm5+ZLHJS4E9udjVT7Crd3dxb89qZ9FZABB0POhx12PL6+fPmN+U0QQAGp2Gn8vvHu6m9JWR2bbcnlws9RNkdchqYl32WmbVOgA8efvk/qv7AMCis5KDkyntpdFpcu7mJP+SPIFz2pOLpd5SnS9pKLExpeRhSeTsSABYH74+X5ZPBgV5gijvqAheRKBHoI+rD4/L47K4TDpzWDv8ZvCNoktR3Vp9vvF8+0D72Avak4ulHsFSj6B4BMUjKB5B8QiKR1A8guIRFI+geATFo3gExSMoHkHxCIpHUDyC4hEUj6B45HPmL9so2ZKs94sNAAAAAElFTkSuQmCC'>
|
||||||
<script>
|
<script>
|
||||||
var allowedScriptRan = true;
|
setup({ explicit_done: true });
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
assert_true(window.cspPositiveTest);
|
||||||
|
}, "Allows scripts from the same host.");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id='log'></div>
|
<div id='log'></div>
|
||||||
|
|
||||||
<script async defer src='../support/checkReport.sub.js?reportExists=false'></script>
|
<script>
|
||||||
|
var script = document.createElement('script');
|
||||||
|
script.src = '../support/checkReport.sub.js?reportExists=false';
|
||||||
|
script.async = true;
|
||||||
|
script.defer = true;
|
||||||
|
script.addEventListener('load', function() {
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
document.body.appendChild(script);
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,6 +1 @@
|
||||||
onload = function() {
|
window.cspPositiveTest = true;
|
||||||
test(function() {
|
|
||||||
assert_true(true, 'Script ran.')},
|
|
||||||
"Allows scripts from the same host."
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="base-uri {{location[scheme]}}://{{domains[]}}:{{ports[http][0]}}/base/">
|
||||||
|
|
||||||
|
<title>base-uri works correctly inside a sandboxed iframe.</title>
|
||||||
|
<script src='/resources/testharness.js'></script>
|
||||||
|
<script src='/resources/testharnessreport.js'></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>self is derived correctly inside inside a sandboxed iframe.</h1>
|
||||||
|
<div id='log'></div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window.addEventListener('securitypolicyviolation', function(e) {
|
||||||
|
assert_unreached('No CSP violation report should have been fired.');
|
||||||
|
});
|
||||||
|
|
||||||
|
async_test(function(t) {
|
||||||
|
var i = document.createElement('iframe');
|
||||||
|
i.sandbox = 'allow-scripts';
|
||||||
|
i.style.display = 'none';
|
||||||
|
i.srcdoc = `
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="img-src 'self'">
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
var img = document.createElement('img');
|
||||||
|
img.src = '../support/fail.png';
|
||||||
|
img.onerror = function() {
|
||||||
|
top.postMessage('FAIL', '*');
|
||||||
|
};
|
||||||
|
img.onload = function() {
|
||||||
|
top.postMessage('PASS', '*');
|
||||||
|
};
|
||||||
|
document.body.appendChild(img);
|
||||||
|
</sc` + `ript></body>`;
|
||||||
|
|
||||||
|
window.addEventListener('message', t.step_func(function(e) {
|
||||||
|
if (e.source === i.contentWindow) {
|
||||||
|
assert_equals(e.data, 'PASS');
|
||||||
|
t.done();
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
document.body.appendChild(i);
|
||||||
|
}, 'img-src \'self\' works when specified in a meta tag.');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -34,6 +34,12 @@
|
||||||
script.defer = true;
|
script.defer = true;
|
||||||
script.src = '../support/checkReport.sub.js?reportExists=false'
|
script.src = '../support/checkReport.sub.js?reportExists=false'
|
||||||
document.body.appendChild(script);
|
document.body.appendChild(script);
|
||||||
|
|
||||||
|
// Immediately declare a test so that the harness does not infer
|
||||||
|
// completion if the image loads before the script.
|
||||||
|
var checkReportTest = async_test("checkReport tests loaded");
|
||||||
|
script.onload = checkReportTest.step_func_done();
|
||||||
|
script.onerror = checkReportTest.unreached_func();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script nonce="abc">
|
<script nonce="abc">
|
||||||
var t1 = async_test("Check that we received a message from the child frame");
|
|
||||||
|
|
||||||
window.onmessage = function(e) {
|
window.onmessage = function(e) {
|
||||||
if (e.data == 'cookie set') {
|
if (e.data == 'cookie set') {
|
||||||
var s = document.createElement('script');
|
var s = document.createElement('script');
|
||||||
|
@ -17,8 +15,6 @@
|
||||||
s.defer = true;
|
s.defer = true;
|
||||||
s.src = '../support/checkReport.sub.js?reportField=violated-directive&reportValue=script-src%20%27self%27%20%27nonce-abc%27&reportCookieName=generate-csp-report';
|
s.src = '../support/checkReport.sub.js?reportField=violated-directive&reportValue=script-src%20%27self%27%20%27nonce-abc%27&reportCookieName=generate-csp-report';
|
||||||
document.body.appendChild(s);
|
document.body.appendChild(s);
|
||||||
|
|
||||||
t1.done();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
try {
|
try {
|
||||||
importScripts("/content-security-policy/support/post-message.js");
|
importScripts("/content-security-policy/support/post-message.js");
|
||||||
postMessage("importScripts allowed");
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
postMessage("importScripts blocked");
|
postMessage("importScripts blocked");
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,11 +8,21 @@
|
||||||
<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>
|
<script>
|
||||||
|
setup({ explicit_done: true });
|
||||||
|
|
||||||
var t = async_test("Test that violation report event was fired");
|
var t = async_test("Test that violation report event was fired");
|
||||||
window.addEventListener("securitypolicyviolation", t.step_func_done(function(e) {
|
window.addEventListener("securitypolicyviolation", t.step_func_done(function(e) {
|
||||||
assert_equals(e.violatedDirective, "style-src");
|
assert_equals(e.violatedDirective, "style-src");
|
||||||
}));
|
}));
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
|
try {
|
||||||
|
runTests();
|
||||||
|
} finally {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function runTests() {
|
||||||
window.nodes = document.getElementById('nodes');
|
window.nodes = document.getElementById('nodes');
|
||||||
window.node1 = document.getElementById('node1');
|
window.node1 = document.getElementById('node1');
|
||||||
window.node1.style.background = "yellow";
|
window.node1.style.background = "yellow";
|
||||||
|
@ -101,7 +111,7 @@
|
||||||
test(function() {
|
test(function() {
|
||||||
assert_equals(ops.id, clonedOps.id)
|
assert_equals(ops.id, clonedOps.id)
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -9,12 +9,18 @@ self.addEventListener('install', (event) => {
|
||||||
// The subscribeToChanges calls are not done in parallel on purpose. Having
|
// The subscribeToChanges calls are not done in parallel on purpose. Having
|
||||||
// multiple in-flight requests introduces failure modes aside from the
|
// multiple in-flight requests introduces failure modes aside from the
|
||||||
// cookie change logic that this test aims to cover.
|
// cookie change logic that this test aims to cover.
|
||||||
await cookieStore.subscribeToChanges([
|
try {
|
||||||
{ name: 'cookie-name1', matchType: 'equals', url: '/scope/path1' }]);
|
await cookieStore.subscribeToChanges([
|
||||||
await cookieStore.subscribeToChanges([
|
{ name: 'cookie-name1', matchType: 'equals', url: '/scope/path1' }]);
|
||||||
{ }, // Test the default values for subscription properties.
|
await cookieStore.subscribeToChanges([
|
||||||
{ name: 'cookie-prefix', matchType: 'starts-with' },
|
{ }, // Test the default values for subscription properties.
|
||||||
]);
|
{ name: 'cookie-prefix', matchType: 'starts-with' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
// If the worker enters the "redundant" state, the UA may terminate it
|
||||||
|
// before all tests have been reported to the client. Stifle errors in
|
||||||
|
// order to avoid this and ensure all tests are consistently reported.
|
||||||
|
} catch (err) {}
|
||||||
})());
|
})());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,14 @@ importScripts("/resources/testharness.js");
|
||||||
|
|
||||||
self.addEventListener('install', (event) => {
|
self.addEventListener('install', (event) => {
|
||||||
event.waitUntil((async () => {
|
event.waitUntil((async () => {
|
||||||
await cookieStore.subscribeToChanges([
|
try {
|
||||||
{ name: 'cookie-name', matchType: 'equals', url: '/scope/path' }]);
|
await cookieStore.subscribeToChanges([
|
||||||
|
{ name: 'cookie-name', matchType: 'equals', url: '/scope/path' }]);
|
||||||
|
|
||||||
|
// If the worker enters the "redundant" state, the UA may terminate it
|
||||||
|
// before all tests have been reported to the client. Stifle errors in
|
||||||
|
// order to avoid this and ensure all tests are consistently reported.
|
||||||
|
} catch (err) {}
|
||||||
})());
|
})());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,13 @@ importScripts("/resources/testharness.js");
|
||||||
|
|
||||||
self.addEventListener('install', (event) => {
|
self.addEventListener('install', (event) => {
|
||||||
event.waitUntil((async () => {
|
event.waitUntil((async () => {
|
||||||
await cookieStore.subscribeToChanges([]);
|
try {
|
||||||
|
await cookieStore.subscribeToChanges([]);
|
||||||
|
|
||||||
|
// If the worker enters the "redundant" state, the UA may terminate it
|
||||||
|
// before all tests have been reported to the client. Stifle errors in
|
||||||
|
// order to avoid this and ensure all tests are consistently reported.
|
||||||
|
} catch (err) {}
|
||||||
})());
|
})());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,14 @@ importScripts("/resources/testharness.js");
|
||||||
|
|
||||||
self.addEventListener('install', (event) => {
|
self.addEventListener('install', (event) => {
|
||||||
event.waitUntil((async () => {
|
event.waitUntil((async () => {
|
||||||
await cookieStore.subscribeToChanges([
|
try {
|
||||||
{ name: 'cookie-name', matchType: 'equals', url: '/scope/path' }]);
|
await cookieStore.subscribeToChanges([
|
||||||
|
{ name: 'cookie-name', matchType: 'equals', url: '/scope/path' }]);
|
||||||
|
|
||||||
|
// If the worker enters the "redundant" state, the UA may terminate it
|
||||||
|
// before all tests have been reported to the client. Stifle errors in
|
||||||
|
// order to avoid this and ensure all tests are consistently reported.
|
||||||
|
} catch (err) {}
|
||||||
})());
|
})());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,14 @@ importScripts("/resources/testharness.js");
|
||||||
|
|
||||||
self.addEventListener('install', (event) => {
|
self.addEventListener('install', (event) => {
|
||||||
event.waitUntil((async () => {
|
event.waitUntil((async () => {
|
||||||
await cookieStore.subscribeToChanges([
|
try {
|
||||||
{ name: 'cookie-name', matchType: 'equals', url: '/scope/path' }]);
|
await cookieStore.subscribeToChanges([
|
||||||
|
{ name: 'cookie-name', matchType: 'equals', url: '/scope/path' }]);
|
||||||
|
|
||||||
|
// If the worker enters the "redundant" state, the UA may terminate it
|
||||||
|
// before all tests have been reported to the client. Stifle errors in
|
||||||
|
// order to avoid this and ensure all tests are consistently reported.
|
||||||
|
} catch (err) {}
|
||||||
})());
|
})());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<link rel="help" href="https://crbug.com/972904">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
|
||||||
|
<div style="margin-top:-100000000px;">
|
||||||
|
<div style="margin-bottom:-100000000px; padding-top: 1px;"></div>
|
||||||
|
text <!-- "text" is placed at the highest possible location due to saturated margin top values. -->
|
||||||
|
<div style="float: left; width: 60px; height: 20px;"></div>
|
||||||
|
<div style="margin-top: 10px;">
|
||||||
|
<div style="float: left; width: 10px;"></div>
|
||||||
|
<div style="float: left; width: 100px; height: 100px;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
test(() => { }, 'test passes if it does not crash');
|
||||||
|
</script>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<title>List item taller than the first opportunity should not crash</title>
|
||||||
|
<link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org">
|
||||||
|
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#float-position" title="9.5.1 Positioning the float: the 'float' property">
|
||||||
|
<link rel="help" href="http://crbug.com/967997">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<body>
|
||||||
|
<div style="float: left; width: 5px; height: 5px;"></div>
|
||||||
|
<div style="clear: left; float: left; width: 10px; height: 5px;"></div>
|
||||||
|
<ul>
|
||||||
|
<li></li>
|
||||||
|
</ul>
|
||||||
|
<script>
|
||||||
|
test(() => {}, "Layout should not crash");
|
||||||
|
</script>
|
||||||
|
</body>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<link rel="author" title="Google LLC" href="http://www.google.com" />
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#line-sizing" />
|
||||||
|
<title>css-flexbox: Tests that we use the aspect ratio, clamped by min/max, to compute the main size</title>
|
||||||
|
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.flex {
|
||||||
|
display: flex;
|
||||||
|
width: 100px;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
width: 500px;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||||
|
|
||||||
|
<div class="flex">
|
||||||
|
<img src="support/100x100-green.png">
|
||||||
|
</div>
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<title>CSS Flexbox: min-height: auto with nested flexboxes and percentages</title>
|
||||||
|
<link rel="author" title="Google LLC" href="https://www.google.com/" />
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#min-size-auto" />
|
||||||
|
<link rel="issue" href="https://bugs.chromium.org/p/chromium/issues/detail?id=973924" />
|
||||||
|
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.overlapped-green {
|
||||||
|
position: absolute;
|
||||||
|
background-color: green;
|
||||||
|
width: 100px;
|
||||||
|
height: 80px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
.outer {
|
||||||
|
display: flex;
|
||||||
|
width: 100px;
|
||||||
|
background: green;
|
||||||
|
}
|
||||||
|
.inner {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
.flex-item {
|
||||||
|
height: 100%;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
background: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inside-of-item {
|
||||||
|
height: 100%;
|
||||||
|
width: 100px;
|
||||||
|
min-height: 80px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||||
|
|
||||||
|
<div class="overlapped-green"></div>
|
||||||
|
<div class="outer">
|
||||||
|
<div class="inner">
|
||||||
|
<a class="flex-item">
|
||||||
|
<div class="inside-of-item"></div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,2 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<div style="width: 100px; height: 100px; background: green"></div>
|
|
@ -0,0 +1,31 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-multicol">
|
||||||
|
<link rel="match" href="composited-under-clip-under-multicol-ref.html">
|
||||||
|
<meta name="assert" content="Test that clip under multicol is correctly applied on composited child">
|
||||||
|
<style>
|
||||||
|
.columns {
|
||||||
|
columns: 2;
|
||||||
|
column-gap: 20px;
|
||||||
|
width: 220px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
.clip {
|
||||||
|
height: 100px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.composited {
|
||||||
|
will-change: transform;
|
||||||
|
margin-top: -20px;
|
||||||
|
margin-left: -20px;
|
||||||
|
border: 20px solid red;
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
background: green;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="columns">
|
||||||
|
<div class="clip">
|
||||||
|
<div class="composited"></div>
|
||||||
|
</div>
|
||||||
|
<div class="clip"></div>
|
||||||
|
</div>
|
|
@ -0,0 +1,37 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<link rel="help" href="https://crbug.com/974760">
|
||||||
|
<meta name="assert" content="fixed children inside inline container do not crash">
|
||||||
|
<style>
|
||||||
|
#container {
|
||||||
|
position: relative;
|
||||||
|
overflow: auto;
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
#inline-fixed-container {
|
||||||
|
filter:url("");
|
||||||
|
}
|
||||||
|
#fixed-container {
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
|
#target {
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div id="container">
|
||||||
|
<span id="inline-fixed-container">
|
||||||
|
<div id="fixed-container">
|
||||||
|
<div id="target"></div>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
test(() => {
|
||||||
|
document.body.offsetTop;
|
||||||
|
document.querySelector("#target").appendChild(
|
||||||
|
document.createTextNode("foo"));
|
||||||
|
document.body.offsetTop;
|
||||||
|
}, 'this test passes if it does not crash');
|
||||||
|
</script>
|
|
@ -0,0 +1,30 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<title>CSS Test: Check computing min-/max-content does not cause crash</title>
|
||||||
|
<link rel="help" href="https://crbug.com/976859">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#sizing-values">
|
||||||
|
<link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
width: fit-content;
|
||||||
|
}
|
||||||
|
#target {
|
||||||
|
display: block;
|
||||||
|
writing-mode: vertical-lr;
|
||||||
|
columns: 2;
|
||||||
|
}
|
||||||
|
.after #target {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
<div id="target"></div>
|
||||||
|
<script>
|
||||||
|
test(() => {
|
||||||
|
const body = document.body;
|
||||||
|
body.offsetTop;
|
||||||
|
body.classList.add("after");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
|
@ -0,0 +1,43 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Parsing of `appearance`</title>
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#appearance-switching">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
test(function() {
|
||||||
|
var input = document.createElement('input');
|
||||||
|
input.setAttribute('style', 'appearance: none;');
|
||||||
|
|
||||||
|
assert_equals(input.style.getPropertyValue('appearance'), 'none');
|
||||||
|
}, 'parsing via attribute change steps of CSS declaration block\'s owner node');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var input = document.createElement('input');
|
||||||
|
input.style.cssText = 'appearance: none;';
|
||||||
|
|
||||||
|
assert_equals(input.style.getPropertyValue('appearance'), 'none');
|
||||||
|
}, 'parsing via modification of cssText');
|
||||||
|
|
||||||
|
test(function(t) {
|
||||||
|
var style = document.createElement('style');
|
||||||
|
style.appendChild(
|
||||||
|
document.createTextNode('#foo { appearance: none; }')
|
||||||
|
);
|
||||||
|
document.body.appendChild(style);
|
||||||
|
t.add_cleanup(function() {
|
||||||
|
document.body.removeChild(style);
|
||||||
|
});
|
||||||
|
|
||||||
|
assert_equals(style.sheet.cssRules.length, 1);
|
||||||
|
assert_equals(
|
||||||
|
style.sheet.cssRules[0].style.getPropertyValue('appearance'),
|
||||||
|
'none'
|
||||||
|
);
|
||||||
|
}, 'parsing via creation of CSS declaration block');
|
||||||
|
</script>
|
||||||
|
</body>
|
|
@ -0,0 +1,56 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Property references to `appearance`</title>
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#appearance-switching">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
function create(initialValue) {
|
||||||
|
var style = document.createElement('input').style;
|
||||||
|
|
||||||
|
style.setProperty('appearance', initialValue);
|
||||||
|
|
||||||
|
return style;
|
||||||
|
}
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('');
|
||||||
|
|
||||||
|
style.setProperty('appearance', 'none');
|
||||||
|
|
||||||
|
assert_equals(style.appearance, 'none');
|
||||||
|
}, 'setProperty');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('none');
|
||||||
|
|
||||||
|
style.removeProperty('appearance');
|
||||||
|
|
||||||
|
assert_equals(style.appearance, '');
|
||||||
|
}, 'removeProperty');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('');
|
||||||
|
|
||||||
|
style['appearance'] = 'none';
|
||||||
|
|
||||||
|
assert_equals(style.appearance, 'none');
|
||||||
|
}, 'property assignment');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('none');
|
||||||
|
|
||||||
|
assert_equals(style.getPropertyValue('appearance'), 'none');
|
||||||
|
}, 'getPropertyValue');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('none');
|
||||||
|
|
||||||
|
assert_equals(style['appearance'], 'none');
|
||||||
|
}, 'property access');
|
||||||
|
</script>
|
||||||
|
</body>
|
|
@ -0,0 +1,48 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Serialization of `appearance`</title>
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#appearance-switching">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
test(function() {
|
||||||
|
var input = document.createElement('input');
|
||||||
|
input.style.setProperty('appearance', 'none');
|
||||||
|
|
||||||
|
assert_equals(input.style.cssText, 'appearance: none;');
|
||||||
|
}, 'serialization via CSSStyleDeclaration');
|
||||||
|
|
||||||
|
test(function(t) {
|
||||||
|
var style = document.createElement('style');
|
||||||
|
document.body.appendChild(style);
|
||||||
|
t.add_cleanup(function() {
|
||||||
|
document.body.removeChild(style);
|
||||||
|
});
|
||||||
|
style.sheet.insertRule('#foo {}', 0);
|
||||||
|
style.sheet.cssRules[0].style.setProperty('appearance', 'none');
|
||||||
|
|
||||||
|
assert_equals(
|
||||||
|
style.sheet.cssRules[0].cssText, '#foo { appearance: none; }'
|
||||||
|
);
|
||||||
|
}, 'serialization via CSSStyleRule');
|
||||||
|
|
||||||
|
test(function(t) {
|
||||||
|
var style = document.createElement('style');
|
||||||
|
document.body.appendChild(style);
|
||||||
|
t.add_cleanup(function() {
|
||||||
|
document.body.removeChild(style);
|
||||||
|
});
|
||||||
|
style.sheet.insertRule('@media print { #foo {} }', 0);
|
||||||
|
style.sheet.cssRules[0].cssRules[0].style.setProperty('appearance', 'none');
|
||||||
|
|
||||||
|
assert_equals(
|
||||||
|
style.sheet.cssRules[0].cssText,
|
||||||
|
'@media print {\n #foo { appearance: none; }\n}'
|
||||||
|
);
|
||||||
|
}, 'serialization via CSSMediaRule');
|
||||||
|
</script>
|
||||||
|
</body>
|
|
@ -0,0 +1,43 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Parsing of `-webkit-appearance`</title>
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#appearance-switching">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
test(function() {
|
||||||
|
var input = document.createElement('input');
|
||||||
|
input.setAttribute('style', '-webkit-appearance: none;');
|
||||||
|
|
||||||
|
assert_equals(input.style.getPropertyValue('appearance'), 'none');
|
||||||
|
}, 'parsing via attribute change steps of CSS declaration block\'s owner node');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var input = document.createElement('input');
|
||||||
|
input.style.cssText = '-webkit-appearance: none;';
|
||||||
|
|
||||||
|
assert_equals(input.style.getPropertyValue('appearance'), 'none');
|
||||||
|
}, 'parsing via modification of cssText');
|
||||||
|
|
||||||
|
test(function(t) {
|
||||||
|
var style = document.createElement('style');
|
||||||
|
style.appendChild(
|
||||||
|
document.createTextNode('#foo { -webkit-appearance: none; }')
|
||||||
|
);
|
||||||
|
document.body.appendChild(style);
|
||||||
|
t.add_cleanup(function() {
|
||||||
|
document.body.removeChild(style);
|
||||||
|
});
|
||||||
|
|
||||||
|
assert_equals(style.sheet.cssRules.length, 1);
|
||||||
|
assert_equals(
|
||||||
|
style.sheet.cssRules[0].style.getPropertyValue('appearance'),
|
||||||
|
'none'
|
||||||
|
);
|
||||||
|
}, 'parsing via creation of CSS declaration block');
|
||||||
|
</script>
|
||||||
|
</body>
|
|
@ -0,0 +1,128 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Property references to `-webkit-appearance`</title>
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#appearance-switching">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
function create(initialValue) {
|
||||||
|
var style = document.createElement('input').style;
|
||||||
|
|
||||||
|
style.setProperty('appearance', initialValue);
|
||||||
|
|
||||||
|
return style;
|
||||||
|
}
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('');
|
||||||
|
|
||||||
|
style.setProperty('-webkit-appearance', 'none');
|
||||||
|
|
||||||
|
assert_equals(style.appearance, 'none');
|
||||||
|
}, 'setProperty - CSS property name');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('');
|
||||||
|
|
||||||
|
style.setProperty('WebkitAppearance', 'none');
|
||||||
|
|
||||||
|
assert_equals(style.appearance, '');
|
||||||
|
}, 'setProperty - camel-cased property name (ignored)');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('');
|
||||||
|
|
||||||
|
style.setProperty('webkitAppearance', 'none');
|
||||||
|
|
||||||
|
assert_equals(style.appearance, '');
|
||||||
|
}, 'setProperty - webkit-cased property name (ignored)');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('none');
|
||||||
|
|
||||||
|
style.removeProperty('-webkit-appearance');
|
||||||
|
|
||||||
|
assert_equals(style.appearance, '');
|
||||||
|
}, 'removeProperty - CSS property name');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('none');
|
||||||
|
|
||||||
|
style.removeProperty('WebkitAppearance');
|
||||||
|
|
||||||
|
assert_equals(style.appearance, 'none');
|
||||||
|
}, 'removeProperty - camel-cased property name (ignored)');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('none');
|
||||||
|
|
||||||
|
style.removeProperty('webkitAppearance');
|
||||||
|
|
||||||
|
assert_equals(style.appearance, 'none');
|
||||||
|
}, 'removeProperty - webkit-cased property name (ignored)');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('');
|
||||||
|
|
||||||
|
style['-webkit-appearance'] = 'none';
|
||||||
|
|
||||||
|
assert_equals(style.appearance, 'none');
|
||||||
|
}, 'property assignment - CSS property name');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('');
|
||||||
|
|
||||||
|
style['WebkitAppearance'] = 'none';
|
||||||
|
|
||||||
|
assert_equals(style.appearance, 'none');
|
||||||
|
}, 'property assignment - camel-cased property name');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('');
|
||||||
|
|
||||||
|
style['webkitAppearance'] = 'none';
|
||||||
|
|
||||||
|
assert_equals(style.appearance, 'none');
|
||||||
|
}, 'property assignment - webkit-cased property name');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('none');
|
||||||
|
|
||||||
|
assert_equals(style.getPropertyValue('-webkit-appearance'), 'none');
|
||||||
|
}, 'getPropertyValue - CSS property name');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('none');
|
||||||
|
|
||||||
|
assert_equals(style.getPropertyValue('WebkitAppearance'), '');
|
||||||
|
}, 'getPropertyValue - camel-cased property name (ignored)');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('none');
|
||||||
|
|
||||||
|
assert_equals(style.getPropertyValue('webkitAppearance'), '');
|
||||||
|
}, 'getPropertyValue - webkit-cased property name (ignored)');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('none');
|
||||||
|
|
||||||
|
assert_equals(style['-webkit-appearance'], 'none');
|
||||||
|
}, 'property access - CSS property name');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('none');
|
||||||
|
|
||||||
|
assert_equals(style['WebkitAppearance'], 'none');
|
||||||
|
}, 'property access - camel-cased property name');
|
||||||
|
|
||||||
|
test(function() {
|
||||||
|
var style = create('none');
|
||||||
|
|
||||||
|
assert_equals(style['webkitAppearance'], 'none');
|
||||||
|
}, 'property access - webkit-cased property name');
|
||||||
|
</script>
|
||||||
|
</body>
|
|
@ -0,0 +1,48 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Serialization of `-webkit-appearance`</title>
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#appearance-switching">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
test(function() {
|
||||||
|
var input = document.createElement('input');
|
||||||
|
input.style.setProperty('-webkit-appearance', 'none');
|
||||||
|
|
||||||
|
assert_equals(input.style.cssText, 'appearance: none;');
|
||||||
|
}, 'serialization via CSSStyleDeclaration');
|
||||||
|
|
||||||
|
test(function(t) {
|
||||||
|
var style = document.createElement('style');
|
||||||
|
document.body.appendChild(style);
|
||||||
|
t.add_cleanup(function() {
|
||||||
|
document.body.removeChild(style);
|
||||||
|
});
|
||||||
|
style.sheet.insertRule('#foo {}', 0);
|
||||||
|
style.sheet.cssRules[0].style.setProperty('-webkit-appearance', 'none');
|
||||||
|
|
||||||
|
assert_equals(
|
||||||
|
style.sheet.cssRules[0].cssText, '#foo { appearance: none; }'
|
||||||
|
);
|
||||||
|
}, 'serialization via CSSStyleRule');
|
||||||
|
|
||||||
|
test(function(t) {
|
||||||
|
var style = document.createElement('style');
|
||||||
|
document.body.appendChild(style);
|
||||||
|
t.add_cleanup(function() {
|
||||||
|
document.body.removeChild(style);
|
||||||
|
});
|
||||||
|
style.sheet.insertRule('@media print { #foo {} }', 0);
|
||||||
|
style.sheet.cssRules[0].cssRules[0].style.setProperty('-webkit-appearance', 'none');
|
||||||
|
|
||||||
|
assert_equals(
|
||||||
|
style.sheet.cssRules[0].cssText,
|
||||||
|
'@media print {\n #foo { appearance: none; }\n}'
|
||||||
|
);
|
||||||
|
}, 'serialization via CSSMediaRule');
|
||||||
|
</script>
|
||||||
|
</body>
|
|
@ -0,0 +1,36 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<title>Verify that colors with var() references apply in visited link context</title>
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-variables/#using-variables">
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
min-height: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.color { color: green; }
|
||||||
|
.background_color { background-color: green; }
|
||||||
|
.border { border: medium solid green; }
|
||||||
|
.outline { outline: medium solid green; }
|
||||||
|
.text_decoration { text-decoration: solid underline green; }
|
||||||
|
.column_rule { columns: 2; column-rule: medium solid green; }
|
||||||
|
.stroke { stroke: green; fill: white; }
|
||||||
|
.fill { fill: green; }
|
||||||
|
</style>
|
||||||
|
<a href="">
|
||||||
|
<div class="color">Text should be green</div>
|
||||||
|
<div class="background_color"></div>
|
||||||
|
<div class="border"></div>
|
||||||
|
<div class="border"></div>
|
||||||
|
<div class="border"></div>
|
||||||
|
<div class="border"></div>
|
||||||
|
<div class="outline"></div>
|
||||||
|
<div class="outline"></div>
|
||||||
|
<div class="text_decoration">Underline should be green</div>
|
||||||
|
<div class="text_decoration">Underline should be green</div>
|
||||||
|
<div class="column_rule"><div style="height: 20px"></div></div>
|
||||||
|
<div class="column_rule"><div style="height: 20px"></div></div>
|
||||||
|
<svg width="20" height="50">
|
||||||
|
<rect class="stroke" x="5" y="5" width="10" height="10" />
|
||||||
|
<rect class="fill" x="5" y="20" width="10" height="10" />
|
||||||
|
</svg>
|
||||||
|
</a>
|
|
@ -0,0 +1,93 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<title>Verify that colors with var() references apply in visited link context</title>
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-variables/#using-variables">
|
||||||
|
<link rel="match" href="variable-reference-visited-ref.html">
|
||||||
|
<style>
|
||||||
|
:root { --color: green; }
|
||||||
|
|
||||||
|
div {
|
||||||
|
min-height: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.color {
|
||||||
|
color: var(--color);
|
||||||
|
}
|
||||||
|
.background_color {
|
||||||
|
background-color: var(--color);
|
||||||
|
}
|
||||||
|
.border_color_longhand{
|
||||||
|
border-style: solid;
|
||||||
|
border-width: medium;
|
||||||
|
border-left-color: var(--color);
|
||||||
|
border-top-color: var(--color);
|
||||||
|
border-right-color: var(--color);
|
||||||
|
border-bottom-color: var(--color);
|
||||||
|
}
|
||||||
|
.border_shorthand {
|
||||||
|
border: medium solid var(--color);
|
||||||
|
}
|
||||||
|
.border_color_longhand_logical {
|
||||||
|
border-style: solid;
|
||||||
|
border-width: medium;
|
||||||
|
border-inline-start-color: var(--color);
|
||||||
|
border-inline-end-color: var(--color);
|
||||||
|
border-block-start-color: var(--color);
|
||||||
|
border-block-end-color: var(--color);
|
||||||
|
}
|
||||||
|
.border_shorthand_logical {
|
||||||
|
border-inline: medium solid var(--color);
|
||||||
|
border-block: medium solid var(--color);
|
||||||
|
}
|
||||||
|
.outline_color_longhand {
|
||||||
|
outline-color: var(--color);
|
||||||
|
outline-style: solid;
|
||||||
|
outline-width: medium;
|
||||||
|
}
|
||||||
|
.outline_shorthand {
|
||||||
|
outline: medium solid var(--color);
|
||||||
|
}
|
||||||
|
.text_decoration_color_longhand {
|
||||||
|
text-decoration-line: underline;
|
||||||
|
text-decoration-style: solid;
|
||||||
|
text-decoration-color: var(--color);
|
||||||
|
}
|
||||||
|
.text_decoration_shorthand {
|
||||||
|
text-decoration: solid underline var(--color);
|
||||||
|
}
|
||||||
|
.column_rule_color_longhand {
|
||||||
|
columns: 2;
|
||||||
|
column-rule-width: medium;
|
||||||
|
column-rule-style: solid;
|
||||||
|
column-rule-color: var(--color);
|
||||||
|
}
|
||||||
|
.column_rule_shorthand {
|
||||||
|
columns: 2;
|
||||||
|
column-rule: medium solid var(--color);
|
||||||
|
}
|
||||||
|
.stroke {
|
||||||
|
stroke: var(--color);
|
||||||
|
fill: white;
|
||||||
|
}
|
||||||
|
.fill {
|
||||||
|
fill: var(--color);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<a href="">
|
||||||
|
<div class="color">Text should be green</div>
|
||||||
|
<div class="background_color"></div>
|
||||||
|
<div class="border_color_longhand"></div>
|
||||||
|
<div class="border_shorthand"></div>
|
||||||
|
<div class="border_color_longhand_logical"></div>
|
||||||
|
<div class="border_shorthand_logical"></div>
|
||||||
|
<div class="outline_color_longhand"></div>
|
||||||
|
<div class="outline_shorthand"></div>
|
||||||
|
<div class="text_decoration_color_longhand">Underline should be green</div>
|
||||||
|
<div class="text_decoration_shorthand">Underline should be green</div>
|
||||||
|
<div class="column_rule_color_longhand"><div style="height: 20px"></div></div>
|
||||||
|
<div class="column_rule_shorthand"><div style="height: 20px"></div></div>
|
||||||
|
<svg width="20" height="50">
|
||||||
|
<rect class="stroke" x="5" y="5" width="10" height="10" />
|
||||||
|
<rect class="fill" x="5" y="20" width="10" height="10" />
|
||||||
|
</svg>
|
||||||
|
</a>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>backdrop-filter: Correctly apply masks/clips to backdrop-filter content</title>
|
||||||
|
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p>Expected: A black circle.</p>
|
||||||
|
|
||||||
|
<div></div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
position: absolute;
|
||||||
|
top: 100px;
|
||||||
|
left: 50px;
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
background: black;
|
||||||
|
border-radius: 100px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>backdrop-filter: Correctly apply masks/clips to backdrop-filter content</title>
|
||||||
|
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||||
|
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||||
|
<link rel="match" href="backdrop-filter-plus-mask-ref.html">
|
||||||
|
|
||||||
|
<p>Expected: A black circle.</p>
|
||||||
|
|
||||||
|
<div></div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
position: absolute;
|
||||||
|
top: 100px;
|
||||||
|
left: 50px;
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
backdrop-filter: invert(1);
|
||||||
|
clip-path: circle(100px at center);
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -90,6 +90,23 @@ test(function () {
|
||||||
assert_attribute_log_entry(logEntries.last(), {name: 'r', oldValue: '100', newValue: null, namespace: 'http://www.w3.org/2000/svg'});
|
assert_attribute_log_entry(logEntries.last(), {name: 'r', oldValue: '100', newValue: null, namespace: 'http://www.w3.org/2000/svg'});
|
||||||
}, 'setAttributeNode and removeAttributeNS must enqueue and invoke attributeChangedCallback for an SVG attribute');
|
}, 'setAttributeNode and removeAttributeNS must enqueue and invoke attributeChangedCallback for an SVG attribute');
|
||||||
|
|
||||||
|
test(function () {
|
||||||
|
const instance = document.createElement(customElement.name);
|
||||||
|
assert_array_equals(customElement.takeLog().types(), ['constructed']);
|
||||||
|
|
||||||
|
instance.toggleAttribute('title', true);
|
||||||
|
assert_equals(instance.hasAttribute('title'), true);
|
||||||
|
var logEntries = customElement.takeLog();
|
||||||
|
assert_array_equals(logEntries.types(), ['attributeChanged']);
|
||||||
|
assert_attribute_log_entry(logEntries.last(), {name: 'title', oldValue: null, newValue: '', namespace: null});
|
||||||
|
|
||||||
|
instance.toggleAttribute('title');
|
||||||
|
assert_equals(instance.hasAttribute('title'), false);
|
||||||
|
var logEntries = customElement.takeLog();
|
||||||
|
assert_array_equals(logEntries.types(), ['attributeChanged']);
|
||||||
|
assert_attribute_log_entry(logEntries.last(), {name: 'title', oldValue: '', newValue: null, namespace: null});
|
||||||
|
}, 'toggleAttribute must enqueue and invoke attributeChangedCallback');
|
||||||
|
|
||||||
test(function () {
|
test(function () {
|
||||||
const callsToOld = [];
|
const callsToOld = [];
|
||||||
const callsToNew = [];
|
const callsToNew = [];
|
||||||
|
|
|
@ -47,6 +47,31 @@ test(function () {
|
||||||
|
|
||||||
}, 'setAttribute and removeAttribute must enqueue and invoke attributeChangedCallback');
|
}, 'setAttribute and removeAttribute must enqueue and invoke attributeChangedCallback');
|
||||||
|
|
||||||
|
test(function () {
|
||||||
|
var instance = document.createElement('my-custom-element');
|
||||||
|
var anotherInstance = document.createElement('my-custom-element');
|
||||||
|
|
||||||
|
var callbackOrder = [];
|
||||||
|
instance.handler = function () {
|
||||||
|
callbackOrder.push([this, 'begin']);
|
||||||
|
anotherInstance.toggleAttribute('data-title');
|
||||||
|
callbackOrder.push([this, 'end']);
|
||||||
|
}
|
||||||
|
anotherInstance.handler = function () {
|
||||||
|
callbackOrder.push([this, 'begin']);
|
||||||
|
callbackOrder.push([this, 'end']);
|
||||||
|
}
|
||||||
|
|
||||||
|
instance.toggleAttribute('title');
|
||||||
|
assert_equals(callbackOrder.length, 4);
|
||||||
|
|
||||||
|
assert_array_equals(callbackOrder[0], [instance, 'begin']);
|
||||||
|
assert_array_equals(callbackOrder[1], [anotherInstance, 'begin']);
|
||||||
|
assert_array_equals(callbackOrder[2], [anotherInstance, 'end']);
|
||||||
|
assert_array_equals(callbackOrder[3], [instance, 'end']);
|
||||||
|
|
||||||
|
}, 'toggleAttribute must enqueue and invoke attributeChangedCallback');
|
||||||
|
|
||||||
test(function () {
|
test(function () {
|
||||||
var shouldCloneAnotherInstance = false;
|
var shouldCloneAnotherInstance = false;
|
||||||
var anotherInstanceClone;
|
var anotherInstanceClone;
|
||||||
|
|
|
@ -35,6 +35,15 @@ testAttributeRemover(function (element, name) {
|
||||||
element.removeAttributeNS(null, name);
|
element.removeAttributeNS(null, name);
|
||||||
}, 'removeAttributeNS on Element');
|
}, 'removeAttributeNS on Element');
|
||||||
|
|
||||||
|
testAttributeRemover(function (element, name, value) {
|
||||||
|
if (element.hasAttribute(name))
|
||||||
|
element.toggleAttribute(name);
|
||||||
|
}, 'toggleAttribute (only removes) on Element');
|
||||||
|
|
||||||
|
testAttributeRemover(function (element, name, value) {
|
||||||
|
element.toggleAttribute(name, false);
|
||||||
|
}, 'toggleAttribute (force false) on Element');
|
||||||
|
|
||||||
testAttributeAdder(function (element, name, value) {
|
testAttributeAdder(function (element, name, value) {
|
||||||
var attr = document.createAttribute(name);
|
var attr = document.createAttribute(name);
|
||||||
attr.value = value;
|
attr.value = value;
|
||||||
|
|
3
tests/wpt/web-platform-tests/docs/.gitignore
vendored
3
tests/wpt/web-platform-tests/docs/.gitignore
vendored
|
@ -1 +1,4 @@
|
||||||
_build/
|
_build/
|
||||||
|
|
||||||
|
# This directory is created to store symbolic links to additional input
|
||||||
|
tools/
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# You can set these variables from the command line.
|
# You can set these variables from the command line.
|
||||||
SPHINXOPTS =
|
SPHINXOPTS = -W -n
|
||||||
SPHINXBUILD = sphinx-build
|
SPHINXBUILD = sphinx-build
|
||||||
SOURCEDIR = .
|
SOURCEDIR = .
|
||||||
BUILDDIR = _build
|
BUILDDIR = _build
|
||||||
|
@ -13,7 +13,11 @@ help:
|
||||||
|
|
||||||
.PHONY: help Makefile
|
.PHONY: help Makefile
|
||||||
|
|
||||||
|
tools/wptserve:
|
||||||
|
mkdir -p $(shell dirname $@)
|
||||||
|
ln -s ../../tools/wptserve $@
|
||||||
|
|
||||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||||
%: Makefile
|
%: Makefile tools/wptserve
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# WPT documentation
|
# Project documentation tooling
|
||||||
|
|
||||||
The documentation for the web-platform-tests project is built using [the Sphinx
|
The documentation for the web-platform-tests project is built using [the Sphinx
|
||||||
documentation generator](http://www.sphinx-doc.org). [The GitHub Actions
|
documentation generator](http://www.sphinx-doc.org). [The GitHub Actions
|
||||||
|
|
|
@ -3,6 +3,21 @@
|
||||||
This section documents all the information necessary to administer the
|
This section documents all the information necessary to administer the
|
||||||
infrastructure which makes the project possible.
|
infrastructure which makes the project possible.
|
||||||
|
|
||||||
|
## Tooling
|
||||||
|
|
||||||
|
```eval_rst
|
||||||
|
.. toctree::
|
||||||
|
:titlesonly:
|
||||||
|
|
||||||
|
../README
|
||||||
|
../tools/wptserve/docs/index.rst
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:hidden:
|
||||||
|
|
||||||
|
../tools/wptserve/README
|
||||||
|
```
|
||||||
|
|
||||||
## Secrets
|
## Secrets
|
||||||
|
|
||||||
Some aspects of the infrastructure are only accessible to administrators.
|
Some aspects of the infrastructure are only accessible to administrators.
|
||||||
|
|
|
@ -42,9 +42,10 @@ If you are a first-time GitHub user, read on for more details of the workflow.
|
||||||
|
|
||||||
## Fork the test repository
|
## Fork the test repository
|
||||||
|
|
||||||
Now that you have Git set up, you will need to fork the test repository. This
|
Now that you have Git set up, you will need to "fork" the test repository. Your
|
||||||
will enable you to [submit](#submit) your tests using a pull request (more on this
|
fork will be a completely independent version of the repository, hosted on
|
||||||
[below](#submit)).
|
GitHub.com. This will enable you to [submit](#submit) your tests using a pull
|
||||||
|
request (more on this [below](#submit)).
|
||||||
|
|
||||||
1. In the browser, go to [web-platform-tests on GitHub][main-repo].
|
1. In the browser, go to [web-platform-tests on GitHub][main-repo].
|
||||||
|
|
||||||
|
@ -61,22 +62,26 @@ will enable you to [submit](#submit) your tests using a pull request (more on th
|
||||||
|
|
||||||
If your [fork](#fork) was successful, the next step is to clone (download a copy of the files).
|
If your [fork](#fork) was successful, the next step is to clone (download a copy of the files).
|
||||||
|
|
||||||
### Clone the test repo
|
### Clone the test repository
|
||||||
At the command prompt, cd into the directory where you want to keep the tests.
|
|
||||||
|
|
||||||
$ git clone https://github.com/username/wpt.git
|
Open a command prompt in the directory where you want to keep the tests. Then
|
||||||
|
execute the following command:
|
||||||
|
|
||||||
_This will download the tests into a directory named for the repo:_ `wpt/`.
|
$ git clone https://github.com/username/wpt.git
|
||||||
|
|
||||||
* You should now have a full copy of the test repository on your local
|
This will download the tests into a directory named for the repository: `wpt/`.
|
||||||
machine. Feel free to browse the directories on your hard drive. You can also
|
|
||||||
browse them on [github.com][github-w3c] and see the full history of contributions
|
You should now have a full copy of the test repository on your local
|
||||||
there.
|
machine. Feel free to browse the directories on your hard drive. You can also
|
||||||
|
[browse them on github.com][main-repo] and see the full history of
|
||||||
|
contributions there.
|
||||||
|
|
||||||
## Configure Remote / Upstream
|
## Configure Remote / Upstream
|
||||||
Synchronizing your forked repository with the W3C repository will enable you to
|
|
||||||
keep your forked local copy up-to-date with the latest commits in the W3C
|
Your forked repository is completely independent of the canonical repository,
|
||||||
repository.
|
which is commonly referred to as the "upstream" repository. Synchronizing your
|
||||||
|
forked repository with the upstream repository will keep your forked local copy
|
||||||
|
up-to-date with the latest commits.
|
||||||
|
|
||||||
1. On the command line, navigate to to the directory where your forked copy of
|
1. On the command line, navigate to to the directory where your forked copy of
|
||||||
the repository is located.
|
the repository is located.
|
||||||
|
@ -127,8 +132,7 @@ At the command line:
|
||||||
This will create a branch named `topic` and immediately
|
This will create a branch named `topic` and immediately
|
||||||
switch this to be your active working branch.
|
switch this to be your active working branch.
|
||||||
|
|
||||||
_The branch name should describe specifically what you are testing.
|
The branch name should describe specifically what you are testing. For example:
|
||||||
For Example:_
|
|
||||||
|
|
||||||
$ git checkout -b flexbox-flex-direction-prop
|
$ git checkout -b flexbox-flex-direction-prop
|
||||||
|
|
||||||
|
@ -139,13 +143,13 @@ You're ready to start writing tests! Come back to this page you're ready to
|
||||||
## Commit
|
## Commit
|
||||||
|
|
||||||
Before you submit your tests for review and contribution to the main test
|
Before you submit your tests for review and contribution to the main test
|
||||||
repo, you'll need to first commit them locally, where you now have your own
|
repository, you'll need to first commit them locally, where you now have your
|
||||||
personal version control system with git. In fact, as you are writing your
|
own personal version control system with git. In fact, as you are writing your
|
||||||
tests, you may want to save versions of your work as you go before you submit
|
tests, you may want to save versions of your work as you go before you submit
|
||||||
them to be reviewed and merged.
|
them to be reviewed and merged.
|
||||||
|
|
||||||
1. When you're ready to save a version of your work, go to the command
|
1. When you're ready to save a version of your work, open a command
|
||||||
prompt and cd to the directory where your files are.
|
prompt and change to the directory where your files are.
|
||||||
|
|
||||||
2. First, ask git what new or modified files you have:
|
2. First, ask git what new or modified files you have:
|
||||||
|
|
||||||
|
@ -163,17 +167,16 @@ them to be reviewed and merged.
|
||||||
$ git add [directory_of_files]
|
$ git add [directory_of_files]
|
||||||
|
|
||||||
4. Run `git status` again to see what you have on the 'Changes to be
|
4. Run `git status` again to see what you have on the 'Changes to be
|
||||||
committed' list. These files are now 'staged'.
|
committed' list. These files are now 'staged'. Alternatively, you can run
|
||||||
|
`git diff --staged` to see a visual representation of the changes to be
|
||||||
|
committed.
|
||||||
|
|
||||||
5. Alternatively, you can run `git diff --staged`, which will show you the
|
5. Once you've added everything, you can commit and add a message to this
|
||||||
diff of things to be committed.
|
|
||||||
|
|
||||||
6. Once you've added everything, you can commit and add a message to this
|
|
||||||
set of changes:
|
set of changes:
|
||||||
|
|
||||||
$ git commit -m "Tests for indexed getters in the HTMLExampleInterface"
|
$ git commit -m "Tests for indexed getters in the HTMLExampleInterface"
|
||||||
|
|
||||||
7. Repeat these steps as many times as you'd like before you submit.
|
6. Repeat these steps as many times as you'd like before you submit.
|
||||||
|
|
||||||
## Verify
|
## Verify
|
||||||
|
|
||||||
|
@ -181,10 +184,8 @@ The Web Platform Test project has an automated tool
|
||||||
to verify that coding conventions have been followed,
|
to verify that coding conventions have been followed,
|
||||||
and to catch a number of common mistakes.
|
and to catch a number of common mistakes.
|
||||||
|
|
||||||
You can and should run this tool locally.
|
We recommend running this tool locally. That will help you discover and fix
|
||||||
It will be run on your submissions anyway,
|
issues that would make it hard for us to accept your contribution.
|
||||||
and any failure will be grounds for rejection,
|
|
||||||
so you might as well fix them first.
|
|
||||||
|
|
||||||
1. On the command line, navigate to to the directory where your clone
|
1. On the command line, navigate to to the directory where your clone
|
||||||
of the repository is located.
|
of the repository is located.
|
||||||
|
@ -201,21 +202,21 @@ If you're here now looking for more instructions, that means you've written
|
||||||
some awesome tests and are ready to submit them. Congratulations and welcome
|
some awesome tests and are ready to submit them. Congratulations and welcome
|
||||||
back!
|
back!
|
||||||
|
|
||||||
1. The first thing you do before submitting them to the W3C repo is to push
|
1. The first thing you do before submitting them to the web-platform-tests
|
||||||
them back up to the server:
|
repository is to push them back up to your fork:
|
||||||
|
|
||||||
$ git push origin topic
|
$ git push origin topic
|
||||||
|
|
||||||
_Note: Here,_ `origin` _refers to remote repo from which you cloned
|
_Note: Here,_ `origin` _refers to remote repository from which you cloned
|
||||||
(downloaded) the files after you forked, referred to as
|
(downloaded) the files after you forked, referred to as
|
||||||
web-platform-tests.git in the previous example;_
|
web-platform-tests.git in the previous example;_
|
||||||
`topic` _refers to the name of your local branch that
|
`topic` _refers to the name of your local branch that
|
||||||
you want to push_.
|
you want to share_.
|
||||||
|
|
||||||
2. Now you can send a message that you have changes or additions you'd like
|
2. Now you can send a message that you have changes or additions you'd like
|
||||||
to be reviewed and merged into the main (original) test repository. You do
|
to be reviewed and merged into the main (original) test repository. You do
|
||||||
this by using a pull request. In a browser, open the GitHub page for your
|
this by creating a pull request. In a browser, open the GitHub page for
|
||||||
forked repository: **https://github.com/username/wpt**.
|
your forked repository: **https://github.com/username/wpt**.
|
||||||
|
|
||||||
3. Now create the pull request. There are several ways to create a PR in the
|
3. Now create the pull request. There are several ways to create a PR in the
|
||||||
GitHub UI. Below is one method and others can be found on
|
GitHub UI. Below is one method and others can be found on
|
||||||
|
@ -223,17 +224,16 @@ GitHub UI. Below is one method and others can be found on
|
||||||
|
|
||||||
1. Click the  button.
|
1. Click the  button.
|
||||||
|
|
||||||
2. On the left, you should see the base repo is the
|
2. On the left, you should see the base repository is the
|
||||||
web-platform-tests/wpt. On the right, you should see your fork of that
|
web-platform-tests/wpt. On the right, you should see your fork of that
|
||||||
repo. In the branch menu of your forked repo, switch to `topic`
|
repository. In the branch menu of your forked repository, switch to `topic`
|
||||||
|
|
||||||
**Note:** If you see _'There isn't anything to compare'_,
|
If you see "There isn't anything to compare", make sure your fork and
|
||||||
make sure your fork and your `topic`
|
your `topic` branch is selected on the right side.
|
||||||
branch is selected on the right side.
|
|
||||||
|
|
||||||
3. Select the  button at the top.
|
3. Select the  button at the top.
|
||||||
|
|
||||||
4. Scroll down and review the diff
|
4. Scroll down and review the summary of changes.
|
||||||
|
|
||||||
5. Scroll back up and in the Title field, enter a brief description for
|
5. Scroll back up and in the Title field, enter a brief description for
|
||||||
your submission.
|
your submission.
|
||||||
|
@ -251,12 +251,11 @@ accepted, delete your branch (see '[When Pull Request is Accepted](#cleanup)').
|
||||||
|
|
||||||
That's it! Your pull request will go into a queue and will be reviewed soon.
|
That's it! Your pull request will go into a queue and will be reviewed soon.
|
||||||
|
|
||||||
## Modify
|
## Refine
|
||||||
|
|
||||||
Once you submit your pull request, a reviewer will check your proposed changes
|
Once you submit your pull request, a reviewer will check your proposed changes
|
||||||
for correctness and style. It is likely that this process will lead to some
|
for correctness and style. They may ask you to modify your code. When you are
|
||||||
comments asking for modifications to your code. When you are ready to make the
|
ready to make the changes, follow these steps:
|
||||||
changes, follow these steps:
|
|
||||||
|
|
||||||
1. Check out the branch corresponding to your changes e.g. if your branch was
|
1. Check out the branch corresponding to your changes e.g. if your branch was
|
||||||
called `topic`
|
called `topic`
|
||||||
|
@ -280,11 +279,11 @@ platform.
|
||||||
|
|
||||||
## Cleanup
|
## Cleanup
|
||||||
Once your pull request has been accepted, you will be notified in the GitHub
|
Once your pull request has been accepted, you will be notified in the GitHub
|
||||||
UI and you may get an email. At this point, your changes have been merged
|
user interface, and you may get an email. At this point, your changes have been merged
|
||||||
into the main test repository. You do not need to take any further action
|
into the main test repository. You do not need to take any further action
|
||||||
on the test but you should delete your branch. This can easily be done in
|
on the test but you should delete your branch. This can easily be done in
|
||||||
the GitHub UI by navigating to the pull requests and clicking the
|
the GitHub user interface by navigating to the pull request and clicking the
|
||||||
'Delete Branch' button.
|
"Delete Branch" button.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -391,7 +390,6 @@ you may also discard your connection to their repo:
|
||||||
[git]: https://git-scm.com/downloads
|
[git]: https://git-scm.com/downloads
|
||||||
[git-book]: https://git-scm.com/book
|
[git-book]: https://git-scm.com/book
|
||||||
[github]: https://github.com/
|
[github]: https://github.com/
|
||||||
[github-w3c]: https://github.com/w3c
|
|
||||||
[github-fork-docs]: https://help.github.com/articles/fork-a-repo
|
[github-fork-docs]: https://help.github.com/articles/fork-a-repo
|
||||||
[github-createpr]: https://help.github.com/articles/creating-a-pull-request
|
[github-createpr]: https://help.github.com/articles/creating-a-pull-request
|
||||||
[help]: https://help.github.com/
|
[help]: https://help.github.com/
|
||||||
|
|
|
@ -11,7 +11,12 @@ delimit text to be replaced and `#` represents a digit.
|
||||||
|
|
||||||
### Test
|
### Test
|
||||||
|
|
||||||
``` html
|
<!--
|
||||||
|
Syntax highlighting cannot be enabled for the following template because it
|
||||||
|
contains invalid CSS.
|
||||||
|
-->
|
||||||
|
|
||||||
|
```
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>${1:Test title}</title>
|
<title>${1:Test title}</title>
|
||||||
|
@ -28,7 +33,12 @@ Filename: `{test-topic}-###.html`
|
||||||
|
|
||||||
### Reference:
|
### Reference:
|
||||||
|
|
||||||
``` html
|
<!--
|
||||||
|
Syntax highlighting cannot be enabled for the following template because it
|
||||||
|
contains invalid CSS.
|
||||||
|
-->
|
||||||
|
|
||||||
|
```
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>${1:Reference title}</title>
|
<title>${1:Reference title}</title>
|
||||||
|
|
|
@ -58,6 +58,11 @@ source_suffix = '.rst'
|
||||||
# The master toctree document.
|
# The master toctree document.
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
|
# These values are used in the documentation of wptserve but are not recognized
|
||||||
|
# by Sphinx.
|
||||||
|
# https://stackoverflow.com/questions/51824453/how-to-document-parameter-of-type-function-in-sphinx
|
||||||
|
nitpick_ignore = [('py:class', 'Callable'), ('py:obj', 'None')]
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
#
|
#
|
||||||
|
@ -71,10 +76,7 @@ language = None
|
||||||
exclude_patterns = [
|
exclude_patterns = [
|
||||||
'_build',
|
'_build',
|
||||||
'Thumbs.db',
|
'Thumbs.db',
|
||||||
'.DS_Store',
|
'.DS_Store'
|
||||||
'tools/.tox',
|
|
||||||
'tools/third_party',
|
|
||||||
'_venv'
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# Enable inline reStructured Text within Markdown-formatted files
|
# Enable inline reStructured Text within Markdown-formatted files
|
||||||
|
|
|
@ -76,7 +76,7 @@ expectations:
|
||||||
expected. They get their name from the JavaScript harness that's used to
|
expected. They get their name from the JavaScript harness that's used to
|
||||||
execute them.
|
execute them.
|
||||||
|
|
||||||
* [wdspec]() tests are written in Python and test [the WebDriver browser
|
* [wdspec][] tests are written in Python and test [the WebDriver browser
|
||||||
automation protocol](https://w3c.github.io/webdriver/)
|
automation protocol](https://w3c.github.io/webdriver/)
|
||||||
|
|
||||||
* [Manual tests][manual] rely on a human to run them and determine their
|
* [Manual tests][manual] rely on a human to run them and determine their
|
||||||
|
|
|
@ -25,6 +25,10 @@ if errorlevel 9009 (
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not exist tools\ ( mkdir tools )
|
||||||
|
|
||||||
|
if not exist tools\wptserve\ ( mklink /d tools\wptserve ..\..\tools\wptserve )
|
||||||
|
|
||||||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
||||||
goto end
|
goto end
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,16 @@ python wpt make-hosts-file | Out-File %SystemRoot%\System32\drivers\etc\hosts -E
|
||||||
If you are behind a proxy, you also need to make sure the domains above are
|
If you are behind a proxy, you also need to make sure the domains above are
|
||||||
excluded from your proxy lookups.
|
excluded from your proxy lookups.
|
||||||
|
|
||||||
|
[The Ahem font](../writing-tests/ahem) is used to test precise rendering
|
||||||
|
behavior. [Download the font][download-ahem] and install it using the
|
||||||
|
appropriate steps for your platform:
|
||||||
|
|
||||||
|
- On Windows, right-click the downloaded file in File Explorer/Windows Explorer
|
||||||
|
(depending on Windows version) and select "Install" from the menu.
|
||||||
|
- On macOS, open the downloaded file in Font Book (the default application for
|
||||||
|
font files) and then click install.
|
||||||
|
- On Linux, copy the file to `~/.local/share/fonts` and then run `fc-cache`.
|
||||||
|
|
||||||
### Windows Notes
|
### Windows Notes
|
||||||
|
|
||||||
Generally Windows Subsystem for Linux will provide the smoothest user
|
Generally Windows Subsystem for Linux will provide the smoothest user
|
||||||
|
@ -115,6 +125,13 @@ customising the test run:
|
||||||
[A complete listing of the command-line arguments is available
|
[A complete listing of the command-line arguments is available
|
||||||
here](command-line-arguments).
|
here](command-line-arguments).
|
||||||
|
|
||||||
|
```eval_rst
|
||||||
|
.. toctree::
|
||||||
|
:hidden:
|
||||||
|
|
||||||
|
command-line-arguments
|
||||||
|
```
|
||||||
|
|
||||||
Additional browser-specific documentation:
|
Additional browser-specific documentation:
|
||||||
|
|
||||||
```eval_rst
|
```eval_rst
|
||||||
|
@ -124,3 +141,5 @@ Additional browser-specific documentation:
|
||||||
chrome_android
|
chrome_android
|
||||||
safari
|
safari
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[download-ahem]: https://github.com/web-platform-tests/wpt/raw/master/fonts/Ahem.ttf
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
A font called [Ahem][ahem-readme] has been developed which consists of
|
A font called [Ahem][ahem-readme] has been developed which consists of
|
||||||
some very well defined glyphs of precise sizes and shapes; it is
|
some very well defined glyphs of precise sizes and shapes; it is
|
||||||
especially useful for testing font and text properties.
|
especially useful for testing font and text properties. Installation
|
||||||
|
instructions are available in [Running Tests from the Local
|
||||||
|
System](../running-tests/from-local-system).
|
||||||
|
|
||||||
The font's em-square is exactly square. Its ascent and descent
|
The font's em-square is exactly square. Its ascent and descent
|
||||||
combined is exactly the size of the em square; this means that the
|
combined is exactly the size of the em square; this means that the
|
||||||
|
@ -73,20 +75,4 @@ div {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Installing Ahem
|
|
||||||
|
|
||||||
After [downloading][download-ahem] the font, installation instructions
|
|
||||||
vary between platforms:
|
|
||||||
|
|
||||||
On Windows, right-click the downloaded file in File Explorer/Windows
|
|
||||||
Explorer (depending on Windows version) and select "Install" from the
|
|
||||||
menu.
|
|
||||||
|
|
||||||
On macOS, open the downloaded file in Font Book (the default
|
|
||||||
application for font files) and then click install.
|
|
||||||
|
|
||||||
On Linux, copy the file to `~/.local/share/fonts` and then run
|
|
||||||
`fc-cache`.
|
|
||||||
|
|
||||||
[ahem-readme]: https://www.w3.org/Style/CSS/Test/Fonts/Ahem/README
|
[ahem-readme]: https://www.w3.org/Style/CSS/Test/Fonts/Ahem/README
|
||||||
[download-ahem]: https://github.com/web-platform-tests/wpt/raw/master/fonts/Ahem.ttf
|
|
||||||
|
|
|
@ -51,36 +51,15 @@ href="https://www.w3.org/TR/CSS21/colors.html#background-properties" />
|
||||||
<th>Token</th>
|
<th>Token</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>animated</td>
|
|
||||||
<td>Test is animated in final state. (Cannot be verified using
|
|
||||||
reftests/screenshots.)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>asis</td>
|
<td>asis</td>
|
||||||
<td>The test has particular markup formatting requirements and
|
<td>The test has particular markup formatting requirements and
|
||||||
cannot be re-serialized.</td>
|
cannot be re-serialized.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>font</td>
|
|
||||||
<td>Requires a specific font to be installed at the OS level. (A link to the
|
|
||||||
font to be installed must be provided; this is not needed if only web
|
|
||||||
fonts are used.)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>history</td>
|
|
||||||
<td>User agent session history is required. Testing :visited is a
|
|
||||||
good example where this may be used.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>HTMLonly</td>
|
<td>HTMLonly</td>
|
||||||
<td>Test case is only valid for HTML</td>
|
<td>Test case is only valid for HTML</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>interact</td>
|
|
||||||
<td>Requires human interaction (such as for testing scrolling
|
|
||||||
behavior)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>invalid</td>
|
<td>invalid</td>
|
||||||
<td>Tests handling of invalid CSS. Note: This case contains CSS
|
<td>Tests handling of invalid CSS. Note: This case contains CSS
|
||||||
|
@ -109,6 +88,38 @@ href="https://www.w3.org/TR/CSS21/colors.html#background-properties" />
|
||||||
<td>Behavior tested is RECOMMENDED, but not REQUIRED. <a
|
<td>Behavior tested is RECOMMENDED, but not REQUIRED. <a
|
||||||
href="https://www.ietf.org/rfc/rfc2119.txt">[RFC2119]</a></td>
|
href="https://www.ietf.org/rfc/rfc2119.txt">[RFC2119]</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
The following flags are **deprecated** and should not be declared by new tests.
|
||||||
|
Tests which satisfy the described criteria should simply be designated as
|
||||||
|
"manual" using [the `-manual` file name flag][file-name-flags].
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Token</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>animated</td>
|
||||||
|
<td>Test is animated in final state. (Cannot be verified using
|
||||||
|
reftests/screenshots.)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>font</td>
|
||||||
|
<td>Requires a specific font to be installed at the OS level. (A link to the
|
||||||
|
font to be installed must be provided; this is not needed if only web
|
||||||
|
fonts are used.)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>history</td>
|
||||||
|
<td>User agent session history is required. Testing :visited is a
|
||||||
|
good example where this may be used.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>interact</td>
|
||||||
|
<td>Requires human interaction (such as for testing scrolling
|
||||||
|
behavior)</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>speech</td>
|
<td>speech</td>
|
||||||
<td>Device supports audio output. Text-to-speech (TTS) engine
|
<td>Device supports audio output. Text-to-speech (TTS) engine
|
||||||
|
@ -130,7 +141,7 @@ Example 1 (one token applies):
|
||||||
Example 2 (multiple tokens apply):
|
Example 2 (multiple tokens apply):
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
<meta name="flags" content="ahem image scroll" />
|
<meta name="flags" content="asis HTMLonly may" />
|
||||||
```
|
```
|
||||||
|
|
||||||
Example 3 (no tokens apply):
|
Example 3 (no tokens apply):
|
||||||
|
@ -178,3 +189,5 @@ Examples of good test assertions:
|
||||||
* "This test checks that 'text-indent' affects only the first line
|
* "This test checks that 'text-indent' affects only the first line
|
||||||
of a block container if that line is also the first formatted line
|
of a block container if that line is also the first formatted line
|
||||||
of an element."
|
of an element."
|
||||||
|
|
||||||
|
[file-name-flags]: {{ site.baseurl }}{% link _writing-tests/file-names.md %}
|
||||||
|
|
|
@ -16,7 +16,7 @@ The wptserver implements a number of Python APIs for controlling traffic.
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
request
|
/tools/wptserve/docs/request
|
||||||
response
|
/tools/wptserve/docs/response
|
||||||
stash
|
/tools/wptserve/docs/stash
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
```eval_rst
|
|
||||||
.. include:: ../../../tools/wptserve/docs/request.rst
|
|
||||||
```
|
|
|
@ -1,3 +0,0 @@
|
||||||
```eval_rst
|
|
||||||
.. include:: ../../../tools/wptserve/docs/response.rst
|
|
||||||
```
|
|
|
@ -1,3 +0,0 @@
|
||||||
```eval_rst
|
|
||||||
.. include:: ../../../tools/wptserve/docs/stash.rst
|
|
||||||
```
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title>Element Timing: observe generated CSS text</title>
|
||||||
|
<style>
|
||||||
|
p::before {
|
||||||
|
content: "Generated text prefix";
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
margin: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="resources/element-timing-helpers.js"></script>
|
||||||
|
<p elementtiming='my_text' id='text_id'></p>
|
||||||
|
<script>
|
||||||
|
async_test(function (t) {
|
||||||
|
const beforeRender = performance.now();
|
||||||
|
if (!window.PerformanceElementTiming) {
|
||||||
|
assert_unreached("PerformanceElementTiming is not implemented");
|
||||||
|
}
|
||||||
|
const observer = new PerformanceObserver(
|
||||||
|
t.step_func_done(function(entryList) {
|
||||||
|
assert_equals(entryList.getEntries().length, 1);
|
||||||
|
const entry = entryList.getEntries()[0];
|
||||||
|
checkTextElement(entry, 'my_text', 'text_id', beforeRender, document.getElementById('text_id'));
|
||||||
|
assert_equals(entry.intersectionRect.left, 20, 'left should be 20.');
|
||||||
|
assert_equals(entry.intersectionRect.top, 20, 'top should be 20.');
|
||||||
|
// Try a lower bound of height=10, width=80 for the generated text.
|
||||||
|
assert_greater_than_equal(entry.intersectionRect.right, 100);
|
||||||
|
assert_greater_than_equal(entry.intersectionRect.bottom, 30);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
observer.observe({type: 'element', buffered: true});
|
||||||
|
}, 'Generated text content is observable.');
|
||||||
|
</script>
|
||||||
|
</body>
|
|
@ -1,50 +0,0 @@
|
||||||
<!DOCTYPE HTML>
|
|
||||||
<meta charset=utf-8>
|
|
||||||
<title>Element Timing: observe large elements</title>
|
|
||||||
<body>
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script src="/resources/testharness.js"></script>
|
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
|
||||||
<script src="resources/element-timing-helpers.js"></script>
|
|
||||||
<script>
|
|
||||||
let beforeRender;
|
|
||||||
let img;
|
|
||||||
async_test(function (t) {
|
|
||||||
if (!window.PerformanceElementTiming) {
|
|
||||||
assert_unreached("PerformanceElementTiming is not implemented");
|
|
||||||
}
|
|
||||||
const observer = new PerformanceObserver(
|
|
||||||
t.step_func_done(function(entryList) {
|
|
||||||
assert_equals(entryList.getEntries().length, 1);
|
|
||||||
const entry = entryList.getEntries()[0];
|
|
||||||
const index = window.location.href.lastIndexOf('/');
|
|
||||||
const pathname = window.location.href.substring(0, index) +
|
|
||||||
'/resources/square20.jpg';
|
|
||||||
checkElement(entry, pathname, '', 'large_one', beforeRender, img);
|
|
||||||
// Assume viewport hasn't changed, so the element occupies all of it.
|
|
||||||
checkRect(entry,
|
|
||||||
[0, document.documentElement.clientWidth, 0, document.documentElement.clientHeight]);
|
|
||||||
checkNaturalSize(entry, 20, 20);
|
|
||||||
})
|
|
||||||
);
|
|
||||||
observer.observe({entryTypes: ['element']});
|
|
||||||
// We add the image during onload to be sure that the observer is registered
|
|
||||||
// in time for it to observe the element timing.
|
|
||||||
window.onload = () => {
|
|
||||||
// Add an image setting width and height equal to viewport.
|
|
||||||
img = document.createElement('img');
|
|
||||||
img.src = 'resources/square20.jpg';
|
|
||||||
img.width = document.documentElement.clientWidth;
|
|
||||||
img.height = document.documentElement.clientHeight;
|
|
||||||
img.setAttribute('id', 'large_one');
|
|
||||||
document.body.appendChild(img);
|
|
||||||
beforeRender = performance.now();
|
|
||||||
};
|
|
||||||
}, 'Large img element is observable.');
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
|
@ -11,8 +11,6 @@ body {
|
||||||
<script src="resources/element-timing-helpers.js"></script>
|
<script src="resources/element-timing-helpers.js"></script>
|
||||||
<div id='target'></div>
|
<div id='target'></div>
|
||||||
<script>
|
<script>
|
||||||
let beforeRender;
|
|
||||||
let img;
|
|
||||||
async_test(function (t) {
|
async_test(function (t) {
|
||||||
if (!window.PerformanceElementTiming) {
|
if (!window.PerformanceElementTiming) {
|
||||||
assert_unreached("PerformanceElementTiming is not implemented");
|
assert_unreached("PerformanceElementTiming is not implemented");
|
||||||
|
@ -27,13 +25,12 @@ body {
|
||||||
// in time for it to observe the element timing.
|
// in time for it to observe the element timing.
|
||||||
window.onload = () => {
|
window.onload = () => {
|
||||||
// Add image of width equal to 100 and height equal to 100.
|
// Add image of width equal to 100 and height equal to 100.
|
||||||
img = document.createElement('img');
|
const img = document.createElement('img');
|
||||||
img.src = 'resources/square100.png';
|
img.src = 'resources/square100.png';
|
||||||
img.setAttribute('elementtiming', 'my_image');
|
img.setAttribute('elementtiming', 'my_image');
|
||||||
img.setAttribute('id', 'my_id');
|
img.setAttribute('id', 'my_id');
|
||||||
const shadowRoot = document.getElementById('target').attachShadow({mode: 'closed'});
|
const shadowRoot = document.getElementById('target').attachShadow({mode: 'open'});
|
||||||
shadowRoot.appendChild(img);
|
shadowRoot.appendChild(img);
|
||||||
beforeRender = performance.now();
|
|
||||||
t.step_timeout(() => {
|
t.step_timeout(() => {
|
||||||
// Assume entry was not dispatched, so test passes.
|
// Assume entry was not dispatched, so test passes.
|
||||||
t.done();
|
t.done();
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title>Element Timing: do not observe text in shadow tree</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="resources/element-timing-helpers.js"></script>
|
||||||
|
<div id='target'></div>
|
||||||
|
<script>
|
||||||
|
async_test(function (t) {
|
||||||
|
if (!window.PerformanceElementTiming) {
|
||||||
|
assert_unreached("PerformanceElementTiming is not implemented");
|
||||||
|
}
|
||||||
|
const observer = new PerformanceObserver(
|
||||||
|
t.step_func_done(function(entryList) {
|
||||||
|
assert_unreached('Should not observe text elements in shadow trees!');
|
||||||
|
})
|
||||||
|
);
|
||||||
|
observer.observe({entryTypes: ['element']});
|
||||||
|
// We add the text during onload to be sure that the observer is registered
|
||||||
|
// in time for it to observe the element timing.
|
||||||
|
window.onload = () => {
|
||||||
|
// Add text of width equal to 100 and height equal to 100.
|
||||||
|
const text = document.createElement('p');
|
||||||
|
text.innerHTML = 'Text';
|
||||||
|
text.setAttribute('elementtiming', 'my_text');
|
||||||
|
const shadowRoot = document.getElementById('target').attachShadow({mode: 'open'});
|
||||||
|
shadowRoot.appendChild(text);
|
||||||
|
t.step_timeout(() => {
|
||||||
|
// Assume entry was not dispatched, so test passes.
|
||||||
|
t.done();
|
||||||
|
}, 500);
|
||||||
|
};
|
||||||
|
}, 'Text in shadow tree with elementtiming attribute is not observable.');
|
||||||
|
</script>
|
|
@ -25,11 +25,11 @@ p {
|
||||||
assert_equals(entryList.getEntries().length, 1);
|
assert_equals(entryList.getEntries().length, 1);
|
||||||
const entry = entryList.getEntries()[0];
|
const entry = entryList.getEntries()[0];
|
||||||
checkTextElement(entry, 'my_text', 'text_id', beforeRender, paragraph);
|
checkTextElement(entry, 'my_text', 'text_id', beforeRender, paragraph);
|
||||||
assert_equals(entry.intersectionRect.left, 20);
|
assert_equals(entry.intersectionRect.left, 20, 'left should be 20.');
|
||||||
// Text box size will vary from device to device, so try lower bounding height by 12, width by 100.
|
// Text box size will vary from device to device, so try lower bounding height by 12, width by 100.
|
||||||
assert_greater_than_equal(entry.intersectionRect.right, 120);
|
assert_greater_than_equal(entry.intersectionRect.right, 120);
|
||||||
|
|
||||||
assert_equals(entry.intersectionRect.top, 20);
|
assert_equals(entry.intersectionRect.top, 20, 'top should be 20.');
|
||||||
assert_greater_than_equal(entry.intersectionRect.bottom, 32);
|
assert_greater_than_equal(entry.intersectionRect.bottom, 32);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
<script src=/fetch/sec-metadata/resources/helper.js></script>
|
||||||
|
<script src=/fetch/sec-metadata/resources/redirectTestHelper.sub.js></script>
|
||||||
|
<script src=/common/security-features/resources/common.js></script>
|
||||||
|
<script src=/common/utils.js></script>
|
||||||
|
<style>
|
||||||
|
@font-face {
|
||||||
|
font-family: myDowngradeUpgradeFont;
|
||||||
|
src: url(https://{{host}}:{{ports[https][0]}}/fetch/api/resources/redirect.py?location=http%3A%2F%2F{{host}}%3A{{ports[http][0]}}%2Ffetch%2Fapi%2Fresources%2Fredirect.py%3Flocation%3Dhttps%253A%252F%252F{{host}}%253A{{ports[https][0]}}%252Ffetch%252Fsec-metadata%252Fresources%252Frecord-header.py%253Ffile%253Dfont-https-downgrade-upgrade);
|
||||||
|
}
|
||||||
|
#fontTest {
|
||||||
|
font-family: myDowngradeUpgradeFont;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
<div id="fontTest">Downgraded then upgraded font</div>
|
||||||
|
<script>
|
||||||
|
let nonce = token();
|
||||||
|
let expected = { "dest": "", "site": "same-site", "user": "", "mode": "" };
|
||||||
|
|
||||||
|
// Validate various scenarios handle a request that redirects from https => http
|
||||||
|
// correctly and avoids disclosure of any Sec- headers.
|
||||||
|
RunCommonRedirectTests("Https downgrade-upgrade", MultipleRedirectTo, expected);
|
||||||
|
|
||||||
|
document.fonts.ready.then(function () {
|
||||||
|
promise_test(t => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let key = "font-https-downgrade-upgrade";
|
||||||
|
fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(text => assert_header_equals(text, expected))
|
||||||
|
.then(_ => resolve())
|
||||||
|
.catch(e => reject(e));
|
||||||
|
});
|
||||||
|
}, "Https downgrade-upgrade font => No headers");
|
||||||
|
});
|
||||||
|
|
||||||
|
promise_test(() =>
|
||||||
|
requestViaImage(secureRedirectURL + encodeURIComponent(insecureRedirectURL + encodeURIComponent("https://{{host}}:{{ports[https][0]}}/common/security-features/subresource/image.py")))
|
||||||
|
.then(result => {
|
||||||
|
headers = result.headers;
|
||||||
|
got = {
|
||||||
|
"dest": headers["sec-fetch-dest"],
|
||||||
|
"mode": headers["sec-fetch-mode"],
|
||||||
|
"site": headers["sec-fetch-site"],
|
||||||
|
"user": headers["sec-fetch-user"]
|
||||||
|
};
|
||||||
|
assert_header_equals(got, {
|
||||||
|
// Note that we're using `undefined` here, as opposed to "" elsewhere because of the way
|
||||||
|
// that `image.py` encodes data.
|
||||||
|
"dest": undefined,
|
||||||
|
"site": "same-site",
|
||||||
|
"user": undefined,
|
||||||
|
"mode": undefined,
|
||||||
|
});
|
||||||
|
}), "Https downgrade-upgrade image => No headers");
|
||||||
|
</script>
|
||||||
|
<script src="https://{{host}}:{{ports[https][0]}}/fetch/api/resources/redirect.py?location=http%3A%2F%2F{{host}}%3A{{ports[http][0]}}%2Ffetch%2Fapi%2Fresources%2Fredirect.py%3Flocation%3Dhttps%253A%252F%252F{{host}}%253A{{ports[https][0]}}%252Ffetch%252Fsec-metadata%252Fresources%252Fecho-as-script.py"></script>
|
||||||
|
<script>
|
||||||
|
test(t => {
|
||||||
|
t.add_cleanup(_ => { header = null; });
|
||||||
|
assert_header_equals(header, expected);
|
||||||
|
}, "Https downgrade-upgrade script => No headers");
|
||||||
|
</script>
|
||||||
|
</body>
|
|
@ -0,0 +1,67 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
<script src=/fetch/sec-metadata/resources/helper.js></script>
|
||||||
|
<script src=/fetch/sec-metadata/resources/redirectTestHelper.sub.js></script>
|
||||||
|
<script src=/common/security-features/resources/common.js></script>
|
||||||
|
<script src=/common/utils.js></script>
|
||||||
|
<style>
|
||||||
|
@font-face {
|
||||||
|
font-family: myUpgradedFont;
|
||||||
|
src: url(http://{{host}}:{{ports[http][0]}}/fetch/api/resources/redirect.py?location=https%3A%2F%2F{{host}}%3A{{ports[https][0]}}%2Ffetch%2Fsec-metadata%2Fresources%2Frecord-header.py%3Ffile%3Dfont-https-upgrade);
|
||||||
|
}
|
||||||
|
#fontTest {
|
||||||
|
font-family: myUpgradedFont;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
<div id="fontTest">Upgraded font</div>
|
||||||
|
<script>
|
||||||
|
let nonce = token();
|
||||||
|
let expected = { "dest": "", "site": "same-site", "user": "", "mode": "" };
|
||||||
|
|
||||||
|
// Validate various scenarios handle a request that redirects from http => https correctly and add the proper Sec- headers.
|
||||||
|
RunCommonRedirectTests("Http upgrade", upgradeRedirectTo, expected);
|
||||||
|
|
||||||
|
document.fonts.ready.then(function () {
|
||||||
|
promise_test(t => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let key = "font-https-upgrade";
|
||||||
|
fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(text => assert_header_equals(text, expected))
|
||||||
|
.then(_ => resolve())
|
||||||
|
.catch(e => reject(e));
|
||||||
|
});
|
||||||
|
}, "Http upgrade font => No headers");
|
||||||
|
});
|
||||||
|
|
||||||
|
promise_test(() =>
|
||||||
|
requestViaImage(insecureRedirectURL + encodeURIComponent("https://{{host}}:{{ports[https][0]}}/common/security-features/subresource/image.py"))
|
||||||
|
.then(result => {
|
||||||
|
headers = result.headers;
|
||||||
|
got = {
|
||||||
|
"dest": headers["sec-fetch-dest"],
|
||||||
|
"mode": headers["sec-fetch-mode"],
|
||||||
|
"site": headers["sec-fetch-site"],
|
||||||
|
"user": headers["sec-fetch-user"]
|
||||||
|
};
|
||||||
|
assert_header_equals(got, {
|
||||||
|
// Note that we're using `undefined` here, as opposed to "" elsewhere because of the way
|
||||||
|
// that `image.py` encodes data.
|
||||||
|
"dest": undefined,
|
||||||
|
"site": "same-site",
|
||||||
|
"user": undefined,
|
||||||
|
"mode": undefined,
|
||||||
|
});
|
||||||
|
}), "Http upgrade image => No headers");
|
||||||
|
</script>
|
||||||
|
<script src="http://{{host}}:{{ports[http][0]}}/fetch/api/resources/redirect.py?location=https%3A%2F%2F{{host}}%3A{{ports[https][0]}}%2Ffetch%2Fsec-metadata%2Fresources%2Fecho-as-script.py"></script>
|
||||||
|
<script>
|
||||||
|
test(t => {
|
||||||
|
t.add_cleanup(_ => { header = null; });
|
||||||
|
assert_header_equals(header, expected);
|
||||||
|
}, "Http upgrade script => No headers");
|
||||||
|
</script>
|
||||||
|
</body>
|
|
@ -0,0 +1,68 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
<script src=/fetch/sec-metadata/resources/helper.js></script>
|
||||||
|
<script src=/fetch/sec-metadata/resources/redirectTestHelper.sub.js></script>
|
||||||
|
<script src=/common/security-features/resources/common.js></script>
|
||||||
|
<script src=/common/utils.js></script>
|
||||||
|
<style>
|
||||||
|
@font-face {
|
||||||
|
font-family: myDowngradedFont;
|
||||||
|
src: url(https://{{host}}:{{ports[https][0]}}/fetch/api/resources/redirect.py?location=http%3A%2F%2F{{host}}%3A{{ports[http][0]}}%2Ffetch%2Fsec-metadata%2Fresources%2Frecord-header.py%3Ffile%3Dfont-https-downgrade);
|
||||||
|
}
|
||||||
|
#fontTest {
|
||||||
|
font-family: myDowngradedFont;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
<div id="fontTest">Downgraded font</div>
|
||||||
|
<script>
|
||||||
|
let nonce = token();
|
||||||
|
let expected = { "dest": "", "site": "", "user": "", "mode": "" };
|
||||||
|
|
||||||
|
// Validate various scenarios handle a request that redirects from https => http correctly and avoids disclosure of any Sec- headers.
|
||||||
|
RunCommonRedirectTests("Https downgrade", downgradeRedirectTo, expected);
|
||||||
|
|
||||||
|
document.fonts.ready.then(function () {
|
||||||
|
promise_test(t => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let key = "font-https-downgrade";
|
||||||
|
fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(text => assert_header_equals(text, expected))
|
||||||
|
.then(_ => resolve())
|
||||||
|
.catch(e => reject(e));
|
||||||
|
});
|
||||||
|
}, "Https downgrade font => No headers");
|
||||||
|
});
|
||||||
|
|
||||||
|
promise_test(() =>
|
||||||
|
requestViaImage(secureRedirectURL + encodeURIComponent("http://{{host}}:{{ports[http][0]}}/common/security-features/subresource/image.py"))
|
||||||
|
.then(result => {
|
||||||
|
headers = result.headers;
|
||||||
|
got = {
|
||||||
|
"dest": headers["sec-fetch-dest"],
|
||||||
|
"mode": headers["sec-fetch-mode"],
|
||||||
|
"site": headers["sec-fetch-site"],
|
||||||
|
"user": headers["sec-fetch-user"]
|
||||||
|
};
|
||||||
|
assert_header_equals(got, {
|
||||||
|
// Note that we're using `undefined` here, as opposed to "" elsewhere because of the way
|
||||||
|
// that `image.py` encodes data.
|
||||||
|
"dest": undefined,
|
||||||
|
"site": undefined,
|
||||||
|
"user": undefined,
|
||||||
|
"mode": undefined,
|
||||||
|
});
|
||||||
|
}), "Https downgrade image => No headers");
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script src="https://{{host}}:{{ports[https][0]}}/fetch/api/resources/redirect.py?location=http%3A%2F%2F{{host}}%3A{{ports[http][0]}}%2Ffetch%2Fsec-metadata%2Fresources%2Fecho-as-script.py"></script>
|
||||||
|
<script>
|
||||||
|
test(t => {
|
||||||
|
t.add_cleanup(_ => { header = null; });
|
||||||
|
assert_header_equals(header, expected);
|
||||||
|
}, "Https downgrade script => No headers");
|
||||||
|
</script>
|
||||||
|
</body>
|
|
@ -0,0 +1,181 @@
|
||||||
|
function createVideoElement() {
|
||||||
|
let el = document.createElement('video');
|
||||||
|
el.src = "/media/movie_5.mp4";
|
||||||
|
el.setAttribute("controls", "");
|
||||||
|
el.setAttribute("crossorigin", "");
|
||||||
|
return el;
|
||||||
|
}
|
||||||
|
|
||||||
|
function createTrack() {
|
||||||
|
let el = document.createElement("track");
|
||||||
|
el.setAttribute("default", "");
|
||||||
|
el.setAttribute("kind", "captions");
|
||||||
|
el.setAttribute("srclang", "en");
|
||||||
|
return el;
|
||||||
|
}
|
||||||
|
|
||||||
|
let secureRedirectURL = "https://{{host}}:{{ports[https][0]}}/fetch/api/resources/redirect.py?location=";
|
||||||
|
let insecureRedirectURL = "http://{{host}}:{{ports[http][0]}}/fetch/api/resources/redirect.py?location=";
|
||||||
|
let secureTestURL = "https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/";
|
||||||
|
let insecureTestURL = "http://{{host}}:{{ports[http][0]}}/fetch/sec-metadata/";
|
||||||
|
|
||||||
|
// Helper to craft an URL that will go from HTTPS => HTTP => HTTPS to
|
||||||
|
// simulate us downgrading then upgrading again during the same redirect chain.
|
||||||
|
function MultipleRedirectTo(partialPath) {
|
||||||
|
let finalURL = insecureRedirectURL + encodeURIComponent(secureTestURL + partialPath);
|
||||||
|
return insecureRedirectURL + encodeURIComponent(finalURL);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Helper to craft an URL that will go from HTTP => HTTPS to simulate upgrading a
|
||||||
|
// given request.
|
||||||
|
function upgradeRedirectTo(partialPath) {
|
||||||
|
return insecureRedirectURL + encodeURIComponent(secureTestURL + partialPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Helper to craft an URL that will go from HTTPS => HTTP to simulate downgrading a
|
||||||
|
// given request.
|
||||||
|
function downgradeRedirectTo(partialPath) {
|
||||||
|
return secureRedirectURL + encodeURIComponent(insecureTestURL + partialPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Helper to run common redirect test cases that don't require special setup on
|
||||||
|
// the test page itself.
|
||||||
|
function RunCommonRedirectTests(testNamePrefix, urlHelperMethod, expectedResults) {
|
||||||
|
async_test(t => {
|
||||||
|
let i = document.createElement('iframe');
|
||||||
|
i.src = urlHelperMethod("resources/post-to-owner.py");
|
||||||
|
window.addEventListener('message', t.step_func(e => {
|
||||||
|
if (e.source != i.contentWindow) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
assert_header_equals(e.data, expectedResults);
|
||||||
|
t.done();
|
||||||
|
}));
|
||||||
|
|
||||||
|
document.body.appendChild(i);
|
||||||
|
}, testNamePrefix + " iframe => No headers");
|
||||||
|
|
||||||
|
async_test(t => {
|
||||||
|
let testWindow = window.open(urlHelperMethod("resources/post-to-owner.py"));
|
||||||
|
t.add_cleanup(_ => testWindow.close());
|
||||||
|
window.addEventListener('message', t.step_func(e => {
|
||||||
|
if (e.source != testWindow) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
assert_header_equals(e.data, expectedResults);
|
||||||
|
t.done();
|
||||||
|
}));
|
||||||
|
}, testNamePrefix + " top level navigation => No headers");
|
||||||
|
|
||||||
|
promise_test(t => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let key = "embed-redirect-redirect" + nonce;
|
||||||
|
|
||||||
|
let e = document.createElement('embed');
|
||||||
|
e.src = urlHelperMethod("resources/record-header.py?file=" + key);
|
||||||
|
e.onload = e => {
|
||||||
|
fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(text => assert_header_equals(text, expectedResults))
|
||||||
|
.then(_ => resolve())
|
||||||
|
.catch(e => reject(e));
|
||||||
|
};
|
||||||
|
|
||||||
|
document.body.appendChild(e);
|
||||||
|
});
|
||||||
|
}, testNamePrefix + " embed => No headers");
|
||||||
|
|
||||||
|
promise_test(t => {
|
||||||
|
let key = "fetch-redirect" + nonce;
|
||||||
|
return fetch(urlHelperMethod("resources/echo-as-json.py?" + key))
|
||||||
|
.then(r => r.json())
|
||||||
|
.then(j => {assert_header_equals(j, expectedResults);});
|
||||||
|
}, testNamePrefix + " fetch() api => No headers");
|
||||||
|
|
||||||
|
promise_test(t => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let key = "object-https-redirect" + nonce;
|
||||||
|
let e = document.createElement('object');
|
||||||
|
e.data = urlHelperMethod("resources/record-header.py?file=" + key);
|
||||||
|
e.onload = e => {
|
||||||
|
fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(text => assert_header_equals(text, expectedResults))
|
||||||
|
.then(_ => resolve())
|
||||||
|
.catch(e => reject(e));
|
||||||
|
};
|
||||||
|
document.body.appendChild(e);
|
||||||
|
});
|
||||||
|
}, testNamePrefix + " object => No headers");
|
||||||
|
|
||||||
|
if (document.createElement('link').relList.supports('prefetch')) {
|
||||||
|
async_test(t => {
|
||||||
|
let key = "prefetch" + nonce;
|
||||||
|
let e = document.createElement('link');
|
||||||
|
e.rel = "prefetch";
|
||||||
|
e.href = urlHelperMethod("resources/record-header.py?file=" + key) + "&simple=true";
|
||||||
|
e.onload = t.step_func(e => {
|
||||||
|
fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
|
||||||
|
.then(t.step_func(response => response.text()))
|
||||||
|
.then(t.step_func_done(text => assert_header_equals(text, expectedResults)))
|
||||||
|
.catch(t.unreached_func("Fetching and verifying the results should succeed."));
|
||||||
|
});
|
||||||
|
e.onerror = t.unreached_func();
|
||||||
|
document.head.appendChild(e);
|
||||||
|
}, testNamePrefix + " prefetch => No headers");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (document.createElement('link').relList.supports('preload')) {
|
||||||
|
async_test(t => {
|
||||||
|
let key = "preload" + nonce;
|
||||||
|
let e = document.createElement('link');
|
||||||
|
e.rel = "preload";
|
||||||
|
e.href = urlHelperMethod("resources/record-header.py?file=" + key);
|
||||||
|
e.setAttribute("as", "track");
|
||||||
|
e.onload = e.onerror = t.step_func_done(e => {
|
||||||
|
fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
|
||||||
|
.then(t.step_func(response => response.text()))
|
||||||
|
.then(t.step_func(text => assert_header_equals(text, expectedResults)))
|
||||||
|
.then(t.step_func_done(_ => resolve()))
|
||||||
|
.catch(t.unreached_func());
|
||||||
|
});
|
||||||
|
document.head.appendChild(e);
|
||||||
|
}, testNamePrefix + " preload => No headers");
|
||||||
|
}
|
||||||
|
|
||||||
|
promise_test(t => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let key = "style-https-redirect" + nonce;
|
||||||
|
let e = document.createElement('link');
|
||||||
|
e.rel = "stylesheet";
|
||||||
|
e.href = urlHelperMethod("resources/record-header.py?file=" + key);
|
||||||
|
e.onload = e => {
|
||||||
|
fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(text => assert_header_equals(text, expectedResults))
|
||||||
|
.then(_ => resolve())
|
||||||
|
.catch(e => reject(e));
|
||||||
|
};
|
||||||
|
document.body.appendChild(e);
|
||||||
|
});
|
||||||
|
}, testNamePrefix + " stylesheet => No headers");
|
||||||
|
|
||||||
|
promise_test(t => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let key = "track-https-redirect" + nonce;
|
||||||
|
let video = createVideoElement();
|
||||||
|
let el = createTrack();
|
||||||
|
el.src = urlHelperMethod("resources/record-header.py?file=" + key);
|
||||||
|
el.onload = t.step_func(_ => {
|
||||||
|
fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(text => assert_header_equals(text, expectedResults))
|
||||||
|
.then(_ => resolve());
|
||||||
|
});
|
||||||
|
video.appendChild(el);
|
||||||
|
document.body.appendChild(video);
|
||||||
|
});
|
||||||
|
}, testNamePrefix + " track => No headers");
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
<!doctype html>
|
||||||
|
<title>API availability following history traversal</title>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
<p>Test requires popup blocker disabled</p>
|
||||||
|
<div id=log></div>
|
||||||
|
<script>
|
||||||
|
var t = async_test();
|
||||||
|
var hasNavigated = false;
|
||||||
|
var child;
|
||||||
|
t.step(function() {
|
||||||
|
child = window.open("resources/api-availability-1.html");
|
||||||
|
t.add_cleanup(function() {
|
||||||
|
child.close();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
navigate = t.step_func(function() {
|
||||||
|
hasNavigated = true;
|
||||||
|
child.location = child.location.href.replace("api-availability-1.html", "api-availability-2.html");
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -0,0 +1,31 @@
|
||||||
|
<!doctype html>
|
||||||
|
<title>API availability following history traversal - 1</title>
|
||||||
|
<script>
|
||||||
|
var controller = opener;
|
||||||
|
var t = controller.t;
|
||||||
|
var assert_not_equals = controller.assert_not_equals;
|
||||||
|
|
||||||
|
t.step(function() {
|
||||||
|
// If this document is discarded as a result of navigation, then this script
|
||||||
|
// will be executed a second time. The semantics this test intends to verify
|
||||||
|
// cannot be observed under these conditions, the discarding is not itself a
|
||||||
|
// violation. Silently pass the test in that case.
|
||||||
|
if (controller.hasNavigated) {
|
||||||
|
t.done();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
t.step_timeout(function() {
|
||||||
|
assert_not_equals(window.history, null, 'history');
|
||||||
|
assert_not_equals(window.localStorage, null, 'localStorage');
|
||||||
|
assert_not_equals(window.location, null, 'location');
|
||||||
|
assert_not_equals(window.navigator, null, 'navigator');
|
||||||
|
assert_not_equals(window.opener, null, 'opener');
|
||||||
|
assert_not_equals(window.sessionStorage, null, 'sessionStorage');
|
||||||
|
|
||||||
|
t.done();
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
controller.navigate();
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<!doctype html>
|
||||||
|
<title>API availability following history traversal - 2</title>
|
||||||
|
<body onload="history.back()"></body>
|
|
@ -23,6 +23,8 @@
|
||||||
var frameWin = document.getElementById("srcdoc-iframe").contentWindow;
|
var frameWin = document.getElementById("srcdoc-iframe").contentWindow;
|
||||||
assert_equals(frameWin.location.href, "about:srcdoc");
|
assert_equals(frameWin.location.href, "about:srcdoc");
|
||||||
assert_equals(frameWin.scrollY, 0, "Should not have scrolled yet");
|
assert_equals(frameWin.scrollY, 0, "Should not have scrolled yet");
|
||||||
|
frameWin.location.hash = "";
|
||||||
|
assert_equals(frameWin.location.href, "about:srcdoc#", "Setting an empty hash should result in an empty fragment, not no fragment.");
|
||||||
frameWin.location.hash = "test";
|
frameWin.location.hash = "test";
|
||||||
assert_equals(frameWin.location.href, "about:srcdoc#test");
|
assert_equals(frameWin.location.href, "about:srcdoc#test");
|
||||||
assert_true(frameWin.scrollY > frameWin.innerHeight,
|
assert_true(frameWin.scrollY > frameWin.innerHeight,
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
const SAME_ORIGIN = {origin: get_host_info().HTTP_ORIGIN, name: "SAME_ORIGIN"};
|
||||||
|
const SAME_SITE = {origin: get_host_info().HTTP_REMOTE_ORIGIN, name: "SAME_SITE"};
|
||||||
|
const CROSS_ORIGIN = {origin: get_host_info().HTTP_NOTSAMESITE_ORIGIN, name: "CROSS_ORIGIN"}
|
||||||
|
|
||||||
|
function coop_test(t, host, coop, channelName, hasOpener) {
|
||||||
|
let bc = new BroadcastChannel(channelName);
|
||||||
|
bc.onmessage = t.step_func_done((event) => {
|
||||||
|
let payload = event.data;
|
||||||
|
assert_equals(payload.name, hasOpener ? channelName : "");
|
||||||
|
assert_equals(payload.opener, hasOpener);
|
||||||
|
});
|
||||||
|
|
||||||
|
let w = window.open(`${host.origin}/html/cross-origin-opener/resources/coop_window.py?path=window.sub.html&coop=${escape(coop)}&channel=${channelName}`, channelName);
|
||||||
|
|
||||||
|
// w will be closed by its postback iframe. When out of process,
|
||||||
|
// window.close() does not work.
|
||||||
|
t.add_cleanup(() => w.close());
|
||||||
|
}
|
||||||
|
|
||||||
|
function run_coop_tests(mainTest, testArray) {
|
||||||
|
for (let test of tests) {
|
||||||
|
async_test(t => {
|
||||||
|
coop_test(t, test[0], test[1],
|
||||||
|
`${mainTest}_to_${test[0].name}_${test[1].replace(/ /g,"-")}`,
|
||||||
|
test[2]);
|
||||||
|
}, `${mainTest} document opening popup to ${test[0].origin} with COOP: "${test[1]}"`);
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue