Auto merge of #25966 - servo-wpt-sync:wpt_update_15-03-2020, r=jdm

Sync WPT with upstream (15-03-2020)

Automated downstream sync of changes from upstream as of 15-03-2020.
[no-wpt-sync]
r? @servo-wpt-sync
This commit is contained in:
bors-servo 2020-03-15 22:31:24 -04:00 committed by GitHub
commit e8e0b70266
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
103 changed files with 2182 additions and 901 deletions

View file

@ -24102,6 +24102,19 @@
{}
]
],
"webkit-box-clamp-bottom-border.html": [
"f133335e79683d5808324e4b2f3559480312f644",
[
null,
[
[
"/compat/webkit-box-clamp-bottom-border-ref.html",
"=="
]
],
{}
]
],
"webkit-box-clamp-visibility-change.html": [
"115fa4366523dd64adf5bd14de661eb8ac8f9214",
[
@ -122738,6 +122751,34 @@
]
]
},
"css-borders": {
"subpixel-borders-with-child-border-box-sizing.html": [
"0f469e4eb42a8bb9708897a7829c92403b92196d",
[
null,
[
[
"/css/css-borders/reference/subpixel-borders-with-child-border-box-sizing-ref.html",
"=="
]
],
{}
]
],
"subpixel-borders-with-child.html": [
"4257983259f721041668178b41eda7161d385282",
[
null,
[
[
"/css/css-borders/reference/subpixel-borders-with-child-ref.html",
"=="
]
],
{}
]
]
},
"css-break": {
"avoid-border-break.html": [
"56f47e83c57f0914b87910870d67d5490d9e4eb3",
@ -124762,8 +124803,34 @@
"css-color-adjust": {
"rendering": {
"dark-color-scheme": {
"color-scheme-iframe-background-mismatch-alpha.html": [
"26c58198c46b0ed2b1c6037aa0ca50ea2e059241",
[
null,
[
[
"/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-alpha.html",
"=="
]
],
{}
]
],
"color-scheme-iframe-background-mismatch-opaque.html": [
"9e39c0b82769964dce205448775ae4c2c01dc51d",
[
null,
[
[
"/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-opaque.html",
"=="
]
],
{}
]
],
"color-scheme-iframe-background.html": [
"ee0f006b5b25702f0b2c485c46e7b8ef6788147c",
"591044f61803be793e15987a15d1561f5a3088f9",
[
null,
[
@ -136475,6 +136542,19 @@
{}
]
],
"percentage-max-height-001.html": [
"8e6dd227a038c8f237c769dad8e92976fe9ca832",
[
null,
[
[
"/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
"percentage-size-subitems-001.html": [
"70f3953052a3a770c6cd15ee169607a00fc452b0",
[
@ -155287,6 +155367,32 @@
{}
]
],
"position-sticky-fixed-ancestor-iframe.html": [
"d442931663f09a0bedd587e28e253941e2a003ce",
[
null,
[
[
"/css/css-position/position-sticky-fixed-ancestor-iframe-ref.html",
"=="
]
],
{}
]
],
"position-sticky-fixed-ancestor.html": [
"3cf332abb37a6175fa0cf28a9276fd5d47962086",
[
null,
[
[
"/css/css-position/position-sticky-fixed-ancestor-ref.html",
"=="
]
],
{}
]
],
"position-sticky-flexbox.html": [
"cf4e8cbcdaad83ba9ef45ade2ec147f8e0698c2b",
[
@ -237762,6 +237868,12 @@
[]
],
"ecmascript-binding": {
"legacy-platform-object": {
"helper.js": [
"01c1d00694eb9beb02b0c9d1d9c6ae1a2cc689c5",
[]
]
},
"support": {
"constructors-support.html": [
"3b2616170b1d4f48f9dab114e4135222ed10a6ea",
@ -240721,6 +240833,10 @@
"d1f183874c09d7984d461e577151008e5b363b2c",
[]
],
"webkit-box-clamp-bottom-border-ref.html": [
"c759c4c7d7095a56f0f6b0c81868dd46268012c7",
[]
],
"webkit-box-clamp-visibility-change-ref.html": [
"20ec3bfaf8bf92f426d6dc7b6dc56a59dd568b1d",
[]
@ -281361,6 +281477,18 @@
[]
]
},
"css-borders": {
"reference": {
"subpixel-borders-with-child-border-box-sizing-ref.html": [
"b2311d5ba083cf7760af5d57003b7777b472ded1",
[]
],
"subpixel-borders-with-child-ref.html": [
"b8ce0e834856b0a53545ccd2cf5046a83a0a8fb4",
[]
]
}
},
"css-box": {
"META.yml": [
"dde409360faf79a301c3ae3ea34a995d154d7bb4",
@ -281729,6 +281857,14 @@
"73671b8a819ed81958b4359a1a3904f86cc98ec6",
[]
],
"dark-frame-alpha.html": [
"cb5e6d66917e4ca061e14a6539e333fb44b2e51a",
[]
],
"dark-frame-opaque.html": [
"ca845ea13ce1f3835c5629295adbc1fec35bfb56",
[]
],
"dark-frame-ref.html": [
"0975119f56eee163041d58b96b80bd57173c44a9",
[]
@ -293910,6 +294046,14 @@
"c44f9f43eb51df8a8499a53db3d7c47d76f38829",
[]
],
"position-sticky-fixed-ancestor-iframe-ref.html": [
"37372ceca115e8c641623abb2fb8238b7eaf11db",
[]
],
"position-sticky-fixed-ancestor-ref.html": [
"f0eadaa4f59174fe9ecdcb65eab6064350ae1222",
[]
],
"position-sticky-flexbox-ref.html": [
"554ffa6d6bc9a7d76087b45649c1a69824eb2e59",
[]
@ -293999,6 +294143,10 @@
[]
],
"resources": {
"position-sticky-fixed-ancestor-iframe-child.html": [
"ee91178ff6fb1c9f6b56008a4ebf008786c5fe88",
[]
],
"sticky-util.js": [
"969cededcbe658a8d25c0cf9cabb97d86d965a77",
[]
@ -309915,6 +310063,34 @@
"52a2bf97124f0e6f3ff05fcc693c751f1cd0fca0",
[]
],
"experimental-features": {
"resources": {
"document-policy-image.html": [
"4e5b919bd112f044cc3ec9e57afe05ae20f22ece",
[]
],
"image.jpg": [
"430f5c514a86f110293636b513b396ac1ab5ed80",
[]
],
"image.png": [
"556fa72704084920c07066054bb57adc5a250b27",
[]
],
"image.svg": [
"73ca820915bbdccdf4fd2d3960c795f1cea8e181",
[]
],
"video.ogv": [
"c9ee910fc667632b17420c1f0ad4f7ad2ac7446a",
[]
]
},
"unsized-media.tentative.https.sub.html.headers": [
"d73d2520cb20e4665766e886cafa1b7f41b1a101",
[]
]
},
"font-display": {
"font-display-document-policy-01.tentative-ref.html": [
"78bca05b124963796fa3ad9a291e7723f9f33df6",
@ -309934,6 +310110,10 @@
]
},
"reporting": {
"image.jpg": [
"c059b96d97fc3701ce4325165b79948f69189135",
[]
],
"oversized-images-reporting.html.headers": [
"206db539c1ea12e962b279e4b550e85f12bc50d1",
[]
@ -309953,6 +310133,10 @@
"unoptimized-lossy-images-reporting.html.headers": [
"261d5db13e3c1879ba8a582e84485b717851dbb9",
[]
],
"unsized-media-reporting.html.headers": [
"d73d2520cb20e4665766e886cafa1b7f41b1a101",
[]
]
},
"required-policy": {
@ -312197,26 +312381,10 @@
"633fa85e6acd6c5dd9cfcd1dfd9929abf15214f8",
[]
],
"feature-policy-image.html": [
"a0008eea82455b370f65de5f58b285420c2ba30b",
[]
],
"focus_steal.html": [
"43e8688117d7ae01169793edb9392a03350749e5",
[]
],
"image.jpg": [
"430f5c514a86f110293636b513b396ac1ab5ed80",
[]
],
"image.png": [
"556fa72704084920c07066054bb57adc5a250b27",
[]
],
"image.svg": [
"73ca820915bbdccdf4fd2d3960c795f1cea8e181",
[]
],
"lazyload-contents.html": [
"a6e98c24e6add4976571141ad2409e1cce96d173",
[]
@ -312260,20 +312428,12 @@
"vertical-scroll.js": [
"88835cc6024f2a17c405a1760064e9145fb63d62",
[]
],
"video.ogv": [
"c9ee910fc667632b17420c1f0ad4f7ad2ac7446a",
[]
]
},
"sync-script.tentative.https.sub.html.headers": [
"b468c8b1822d57cbf8c78523397a43813cefe51c",
[]
],
"unsized-media.tentative.https.sub.html.headers": [
"db2dcbc1929b9e1264855e9b80f77dfbda5d4f38",
[]
],
"vertical-scroll-main-frame-manual.tentative.html.headers": [
"44072fce5640c79fcbd804550bfce44dbad37738",
[]
@ -312424,10 +312584,6 @@
"f2b88690fcf182cb0757da947bc6a1295468779f",
[]
],
"image.jpg": [
"c059b96d97fc3701ce4325165b79948f69189135",
[]
],
"microphone-report-only.https.html.headers": [
"5342e71dec8c906fa5d3bf4b3a89317cdeba108c",
[]
@ -312476,10 +312632,6 @@
"21a909e1fb6d84f066f42c09488f1bef032171c9",
[]
],
"unsized-media-reporting.html.headers": [
"db2dcbc1929b9e1264855e9b80f77dfbda5d4f38",
[]
],
"usb-report-only.https.html.headers": [
"2705af70cee8be148be26ef6e407b18c0de236cd",
[]
@ -313764,6 +313916,10 @@
"53fcc13a1603621c0985dd8ea8d956fd01c974f4",
[]
],
"largeop-displayoperatorminheight7000-2AFF-italiccorrection5000.woff": [
"601a424a94b3090c1a1796c18f6557abe716c5d0",
[]
],
"limits-lowerlimitbaselinedropmin3000.woff": [
"76395db141ced4560ed7164c6f09bf50fe771d3d",
[]
@ -325799,7 +325955,7 @@
]
},
"lint.whitelist": [
"99a6309956e807a4459d36b94fe13574688d6c67",
"65494c70cfbf446011b404b5b657564b2ec61e35",
[]
],
"loading": {
@ -326393,7 +326549,7 @@
[]
],
"largeop.py": [
"73d967689bb7dc1101632a883aa08059bf5d7979",
"58ce7aebcf415eed9f5b161dc869dedc0d3e3e61",
[]
],
"limits.py": [
@ -326450,7 +326606,7 @@
[]
],
"mathfont.py": [
"7664c6d2434406090020f20e9ec35e513d0390c6",
"53633c915047413b2a4651ad215f559068bdeb91",
[]
],
"misc.py": [
@ -338144,10 +338300,6 @@
"d82b15a304a2439f5206e5bc86b91c51fcf94bd8",
[]
],
"sms_mock.js": [
"13d12da65dfa80f1b15983fafadeb0423d41607c",
[]
],
"string16.mojom.js": [
"25377e66571b145907a490d17c673a5abd023171",
[]
@ -338201,7 +338353,7 @@
[]
],
"webxr-test.js": [
"ddbfd4c83aa00e8cfadd60b9cbe265bab6939b4a",
"428ca0a5cbc1ece086e5a344f59cf398c3c41924",
[]
],
"webxr-test.js.headers": [
@ -338210,7 +338362,7 @@
]
},
"idlharness.js": [
"ff40847a1fc8d4c8393e03ce34e0643522e182a3",
"4f8ec0d1a663355e38a6425c79383c02342db4ea",
[]
],
"idlharness.js.headers": [
@ -338630,7 +338782,7 @@
[]
],
"testharness.js": [
"ce043a287f758338e1564e86bc6908ce8388638e",
"8d3b3e9dd6bf2a9d50b4e464c82d569370e85496",
[]
],
"testharness.js.headers": [
@ -341538,26 +341690,6 @@
]
}
},
"sms": {
"README.md": [
"1f34178beace0786a347a6b378489b3741c960d9",
[]
],
"resources": {
"helper.js": [
"d34d6db3a2e6c1a744a4193939251dc382691061",
[]
],
"iframe.html": [
"38efb15a748504a455cb5388e5b901392fd695d4",
[]
]
},
"sms_receiver.idl": [
"ca8cfdd798c8e7d85c8251ea08acb063fc25ae77",
[]
]
},
"speech-api": {
"META.yml": [
"88f1837f96f6e140990eb2de9981f7901596a32f",
@ -343221,7 +343353,7 @@
[]
],
"item.py": [
"30dd4572ab695fb23c4627dbadaabc14fd12ea20",
"728027589416624a22f497a4d539b289106a1b6e",
[]
],
"log.py": [
@ -343229,11 +343361,11 @@
[]
],
"manifest.py": [
"74d80209e64f3fdded9f22832cf1977ca4f9204a",
"f79edc8435293faed732243134ab0e4447f6b5d9",
[]
],
"sourcefile.py": [
"580a0ab7884568c271e935d51f239eb821100dc6",
"15dc91512484b6e9e4500947f710f5058db40799",
[]
],
"testpaths.py": [
@ -343258,7 +343390,7 @@
[]
],
"test_sourcefile.py": [
"9738906fa2db1c4cc7f40de5208d12eb4b24a901",
"6ee6e2b3dff0d4bb86bdebebba706874ff0ba9d7",
[]
],
"test_utils.py": [
@ -343267,7 +343399,7 @@
]
},
"typedata.py": [
"4ca8b4d595b7ea9eff5bbe117aa6fe70e181b697",
"13a041e54c3e240e26db83c18a1f589e05cdc851",
[]
],
"update.py": [
@ -343279,7 +343411,7 @@
[]
],
"vcs.py": [
"ce31acbfb66d9b8657b0c8d32fad4c7eda0c44b7",
"05afdf39b227dfc0dff1dfce44f36c7b252a33c7",
[]
]
},
@ -348015,7 +348147,7 @@
[]
],
"requirements.txt": [
"b4500579db51591c31109f42c445ff715801e91f",
"3baefa50ea981974be66b6e226e050e59e034c22",
[]
],
"revlist.py": [
@ -348052,7 +348184,7 @@
[]
],
"test_wpt.py": [
"b3e85fc293c315f960e3781033db25c963258bd9",
"f897b688ad6f682be9d769da98579c788505c09a",
[]
]
},
@ -348113,7 +348245,7 @@
]
},
"requirements.txt": [
"6cd14095d9ba1fcf49b9e403a644008e8fe2ca3b",
"c7ddcd75456a5fd532e84d227ba3daa71accc4d9",
[]
],
"requirements_android_webview.txt": [
@ -348655,7 +348787,7 @@
[]
],
"test_products.py": [
"e64f5ad8945b1297147f33fc6a3e1546024797f1",
"5d2bcf075d0f572e8972eba5fdb4a5bd36b5db75",
[]
],
"test_stability.py": [
@ -355878,6 +356010,10 @@
"5d72e10b24bfd5a36d719940388bb55d44433546",
[]
],
"top.txt": [
"83a3157d14d9081ed01cd799287899822e19523a",
[]
],
"trickle.py": [
"418e2459921743b769fab32041e95b00e7c091bb",
[]
@ -373168,13 +373304,36 @@
{}
]
],
"legacy-platform-object.html": [
"55e3c08addd7cdf91f590524646ff15bfec3dcc6",
[
null,
{}
"legacy-platform-object": {
"DefineOwnProperty.html": [
"8de0bac683268b6f57781dff98c8cb400dff45d7",
[
null,
{}
]
],
"GetOwnProperty.html": [
"d26cdf28094703e5d9d3b7e062bd836dac389d01",
[
null,
{}
]
],
"OwnPropertyKeys.html": [
"da9c6102cd302a8a40bb1d9bcdf8999117d4f3d6",
[
null,
{}
]
],
"Set.html": [
"606fc95c0c0ab9bf8461c84cb9df321bd8919da6",
[
null,
{}
]
]
],
},
"no-regexp-special-casing.any.js": [
"4446dbf69c02ab466ad03fd69d6ed3924d8e84a0",
[
@ -402160,7 +402319,7 @@
]
],
"line-height.html": [
"4e35eaf786a7f81d0d5f6b30eca3360fbbcd653a",
"c09c404617e7fee1cbe37500cf83a0ac1dc41e66",
[
null,
{}
@ -404628,6 +404787,13 @@
{}
]
],
"CSSStyleSheet-constructable-disallow-import.tentative.html": [
"05b73944d669051f80fbd21646148dc709cce798",
[
null,
{}
]
],
"CSSStyleSheet-constructable-duplicate.html": [
"579f5d0fcedc44b38ad98a94610e01850a3fef5d",
[
@ -408284,6 +408450,15 @@
]
},
"document-policy": {
"experimental-features": {
"unsized-media.tentative.https.sub.html": [
"d7bb72524902cbd519d892b8206569d7607a120b",
[
null,
{}
]
]
},
"font-display": {
"font-display-document-policy-report-only.tentative.html": [
"03fa5b68a3ef8a587a72fba5b37fd5145307e1b0",
@ -408321,6 +408496,13 @@
null,
{}
]
],
"unsized-media-reporting.html": [
"47a36436464e031e18f710330106694b7fa0c182",
[
null,
{}
]
]
},
"required-policy": {
@ -424498,13 +424680,6 @@
{}
]
],
"unsized-media.tentative.https.sub.html": [
"172e4c8e4fed765d9c6d37bff298c9cdd299ae9e",
[
null,
{}
]
],
"vertical-scroll-scrollintoview.tentative.html": [
"689685a4977a7ab08c5183fe04e427c25ce6f3cf",
[
@ -424932,13 +425107,6 @@
{}
]
],
"unsized-media-reporting.html": [
"bb81a496ca5b8128b7438e6f1dd4ed0dd574238c",
[
null,
{}
]
],
"usb-report-only.https.html": [
"7933e9eb5f6c15c513d4110a689eae8c3c15a0ab",
[
@ -427948,11 +428116,15 @@
]
],
"fetch.https.any.js": [
"e79b982c2b708aa9601eddaa32209cb374d2f505",
"c9b5b7502f48ac16f654784bcebc6a30f2b785c5",
[
"fetch/cross-origin-resource-policy/fetch.https.any.html",
{
"script_metadata": [
[
"timeout",
"long"
],
[
"global",
"window,worker"
@ -427961,13 +428133,18 @@
"script",
"/common/get-host-info.sub.js"
]
]
],
"timeout": "long"
}
],
[
"fetch/cross-origin-resource-policy/fetch.https.any.serviceworker.html",
{
"script_metadata": [
[
"timeout",
"long"
],
[
"global",
"window,worker"
@ -427976,13 +428153,18 @@
"script",
"/common/get-host-info.sub.js"
]
]
],
"timeout": "long"
}
],
[
"fetch/cross-origin-resource-policy/fetch.https.any.sharedworker.html",
{
"script_metadata": [
[
"timeout",
"long"
],
[
"global",
"window,worker"
@ -427991,13 +428173,18 @@
"script",
"/common/get-host-info.sub.js"
]
]
],
"timeout": "long"
}
],
[
"fetch/cross-origin-resource-policy/fetch.https.any.worker.html",
{
"script_metadata": [
[
"timeout",
"long"
],
[
"global",
"window,worker"
@ -428006,7 +428193,8 @@
"script",
"/common/get-host-info.sub.js"
]
]
],
"timeout": "long"
}
]
],
@ -440425,7 +440613,7 @@
]
],
"form-submission-algorithm.html": [
"d31e24167013aa48bec0d17e462714dc559794e1",
"e355aa20253607fe84b28f8245a291a8abc5e953",
[
null,
{}
@ -451327,7 +451515,7 @@
]
],
"subsup-parameters-2.html": [
"da7574ac4d0db19cd3174f42be161fbf6d7490bb",
"021512f940f97b7d8071b754ec2775a2c9c9868f",
[
null,
{}
@ -451616,7 +451804,7 @@
]
],
"tabindex-001.html": [
"8f8536881416584656277eeaaed4604b7f6def4d",
"9c7c9c2e2ce356f8f87faf90417920c457a55581",
[
null,
{}
@ -472429,6 +472617,22 @@
]
},
"origin-policy": {
"bad-server": {
"manifest-404.https.html": [
"51436be6766423aeade1c1eb3133fc096bc6a103",
[
null,
{}
]
],
"manifest-mimetype.https.html": [
"5231a4387646ae73bb97d116d91ecc854f9260ac",
[
null,
{}
]
]
},
"content-security": {
"comma-in-policy.https.html": [
"07d10811f0bf853503052458ab76e0049969bdd4",
@ -472451,20 +472655,6 @@
{}
]
],
"manifest-404.https.html": [
"be738cc144513cafd3f1baa9c3e85d0a1a904e34",
[
null,
{}
]
],
"manifest-mimetype.https.html": [
"1a45077602245d5859db7c0b28c26cd41f7ffe5d",
[
null,
{}
]
],
"non-array.https.html": [
"c95b5a15b0e6414c90adeda7923d4c06372b76cf",
[
@ -531192,62 +531382,6 @@
]
]
},
"sms": {
"detached-iframe.https.html": [
"bde6e25b80c63ff30ef279bc576e3d993466c3f3",
[
null,
{}
]
],
"idlharness.https.any.js": [
"0c31744937c6dbc9b292586ab8ce5f10b268f3ed",
[
"sms/idlharness.https.any.html",
{
"script_metadata": [
[
"script",
"/resources/WebIDLParser.js"
],
[
"script",
"/resources/idlharness.js"
]
]
}
],
[
"sms/idlharness.https.any.worker.html",
{
"script_metadata": [
[
"script",
"/resources/WebIDLParser.js"
],
[
"script",
"/resources/idlharness.js"
]
]
}
]
],
"interceptor.https.html": [
"6dff790309f5d052ad98fa5644e3596382c9fa28",
[
null,
{}
]
],
"sms-iframe.https.html": [
"0809f2426d96e5be288853a678695fe807cf6b14",
[
null,
{}
]
]
},
"speech-api": {
"SpeechRecognition-basics.https.html": [
"dc5d3f5c1df6e254b05ba1decf353abc3ccbef13",
@ -539978,6 +540112,13 @@
{}
]
],
"HTMLScriptElement-in-xhtml-document.tentative.https.xhtml": [
"6cf49f922ae4d8414d392786da731396f2db80d9",
[
null,
{}
]
],
"HTMLScriptElement-internal-slot.tentative.https.html": [
"4f523bb4e4eec2c048d44b1beeab2a94b9e7bd31",
[
@ -561657,6 +561798,13 @@
null,
{}
]
],
"ar_dom_overlay_hit_test.https.html": [
"406efe8be33808c386c3b676ae9e853381c355e5",
[
null,
{}
]
]
},
"events_input_source_recreation.https.html": [
@ -561785,8 +561933,22 @@
{}
]
],
"ar_hittest_subscription_states.https.html": [
"98947da263703e29588c5ac432137d9eca69d046",
"ar_hittest_subscription_states_regular.https.html": [
"0678ff55cef90620e55bbd893ff2fc16e1a69252",
[
null,
{}
]
],
"ar_hittest_subscription_states_transient.https.html": [
"accd4bbf70f716faf9885ca6e3088ceab48493ef",
[
null,
{}
]
],
"ar_hittest_subscription_transientInputSources.https.html": [
"5d8b0322303b57a3011354f27dd31cccb2ecd313",
[
null,
{}
@ -565945,6 +566107,31 @@
{}
]
],
"cors-expose-star.sub.any.js": [
"9d88046806c764a467b0ad59fec3c73d9f0fa14b",
[
"xhr/cors-expose-star.sub.any.html",
{
"script_metadata": [
[
"script",
"../fetch/api/resources/utils.js"
]
]
}
],
[
"xhr/cors-expose-star.sub.any.worker.html",
{
"script_metadata": [
[
"script",
"../fetch/api/resources/utils.js"
]
]
}
]
],
"data-uri.htm": [
"88a7d78fc5953bc89b45503f1792f3a1d1dfe789",
[

View file

@ -1,8 +1,7 @@
[legacy-platform-object.html]
type: testharness
[Test [[DefineOwnProperty\]\] with no indexed property setter support.]
expected: FAIL
[DefineOwnProperty.html]
[Test [[DefineOwnProperty\]\] with indexed property setter support.]
expected: FAIL
[Test [[DefineOwnProperty\]\] with no indexed property setter support.]
expected: FAIL

View file

@ -0,0 +1,4 @@
[Set.html]
[must throw when assigning to a numeric property on an object which implements a indexed property getter but not a setter in strict mode]
expected: FAIL

View file

@ -1,4 +0,0 @@
[hit-test-floats-002.html]
[Hit test float]
expected: FAIL

View file

@ -1,4 +0,0 @@
[hit-test-floats-005.html]
[Miss clipped float]
expected: FAIL

View file

@ -1,2 +1,2 @@
[no-transition-from-ua-to-blocking-stylesheet.html]
expected: FAIL
expected: TIMEOUT

View file

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

View file

@ -0,0 +1,14 @@
[CSSStyleSheet-constructable-disallow-import.tentative.html]
expected: ERROR
[@import rules are not parsed in CSSStyleSheet.replaceSync]
expected: FAIL
[Inserting an @import rule through insertRule on a constructed stylesheet throws an exception]
expected: FAIL
[@import rules are not parsed in CSSStyleSheet.replace]
expected: FAIL
[@import rules should not trigger any loads.]
expected: TIMEOUT

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,5 @@
[supported-elements.html]
expected: TIMEOUT
[Contenteditable element should support autofocus]
expected: FAIL
@ -6,11 +7,11 @@
expected: FAIL
[Host element with delegatesFocus including no focusable descendants should be skipped]
expected: FAIL
expected: NOTRUN
[Area element should support autofocus]
expected: FAIL
expected: NOTRUN
[Host element with delegatesFocus should support autofocus]
expected: FAIL
expected: TIMEOUT

View file

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

View file

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

View file

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

View file

@ -11,3 +11,6 @@
[firing an event named submit; form.requestSubmit()]
expected: FAIL
[Submission URL should always have a non-null query part]
expected: FAIL

View file

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

View file

@ -59,3 +59,6 @@
[X Rendered audio for channel 5 does not equal [0,0.0626220703125,0.125030517578125,0.18695068359375,0.24810791015625,0.308319091796875,0.3673095703125,0.42486572265625,0.480743408203125,0.53472900390625,0.58660888671875,0.636199951171875,0.68328857421875,0.727691650390625,0.76922607421875,0.8077392578125...\] with an element-wise tolerance of {"absoluteThreshold":0.000030517578125,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t3.6732959747314453e-1\t6.2622070312500000e-2\t3.0470752716064453e-1\t4.8658168859649127e+0\t3.0517578125000000e-5\n\t[2\]\t6.8329977989196777e-1\t1.2503051757812500e-1\t5.5826926231384277e-1\t4.4650639949963384e+0\t3.0517578125000000e-5\n\t[3\]\t9.0373212099075317e-1\t1.8695068359375000e-1\t7.1678143739700317e-1\t3.8340669508039502e+0\t3.0517578125000000e-5\n\t[4\]\t9.9780619144439697e-1\t2.4810791015625000e-1\t7.4969828128814697e-1\t3.0216621502152523e+0\t3.0517578125000000e-5\n\t[5\]\t9.5236867666244507e-1\t3.0831909179687500e-1\t6.4404958486557007e-1\t2.0889059484187866e+0\t3.0517578125000000e-5\n\t...and 35250 more errors.\n\tMax AbsError of 1.9986611604690552e+0 at index of 12875.\n\t[12875\]\t-9.9994289875030518e-1\t9.9871826171875000e-1\t1.9986611604690552e+0\t2.0012262087101997e+0\t3.0517578125000000e-5\n\tMax RelError of Infinity at index of 7056.\n\t[7056\]\t5.8778524398803711e-1\t0.0000000000000000e+0\t5.8778524398803711e-1\tInfinity\t3.0517578125000000e-5\n]
expected: FAIL
[X Rendered audio for channel 5 does not equal [0,0.0626220703125,0.125030517578125,0.18695068359375,0.24810791015625,0.308319091796875,0.3673095703125,0.42486572265625,0.480743408203125,0.53472900390625,0.58660888671875,0.636199951171875,0.68328857421875,0.727691650390625,0.76922607421875,0.8077392578125...\] with an element-wise tolerance of {"absoluteThreshold":0.000030517578125,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t3.6732959747314453e-1\t6.2622070312500000e-2\t3.0470752716064453e-1\t4.8658168859649127e+0\t3.0517578125000000e-5\n\t[2\]\t6.8329977989196777e-1\t1.2503051757812500e-1\t5.5826926231384277e-1\t4.4650639949963384e+0\t3.0517578125000000e-5\n\t[3\]\t9.0373212099075317e-1\t1.8695068359375000e-1\t7.1678143739700317e-1\t3.8340669508039502e+0\t3.0517578125000000e-5\n\t[4\]\t9.9780619144439697e-1\t2.4810791015625000e-1\t7.4969828128814697e-1\t3.0216621502152523e+0\t3.0517578125000000e-5\n\t[5\]\t9.5236867666244507e-1\t3.0831909179687500e-1\t6.4404958486557007e-1\t2.0889059484187866e+0\t3.0517578125000000e-5\n\t...and 42289 more errors.\n\tMax AbsError of 1.9985451102256775e+0 at index of 18588.\n\t[18588\]\t-9.9997943639755249e-1\t9.9856567382812500e-1\t1.9985451102256775e+0\t2.0014157932787811e+0\t3.0517578125000000e-5\n\tMax RelError of Infinity at index of 12348.\n\t[12348\]\t9.5105654001235962e-1\t0.0000000000000000e+0\t9.5105654001235962e-1\tInfinity\t3.0517578125000000e-5\n]
expected: FAIL

View file

@ -218,3 +218,9 @@
[X Stitched sine-wave buffers at sample rate 44100 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.000090957,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[31080\]\t-3.6768964491784573e-5\t5.6332010030746460e-1\t5.6335686927195638e-1\t1.0000652718844432e+0\t9.0957000000000003e-5\n\t[31081\]\t4.5721566293990131e-41\t6.1397600173950195e-1\t6.1397600173950195e-1\t1.0000000000000000e+0\t9.0957000000000003e-5\n\tMax AbsError of 6.1397600173950195e-1 at index of 31081.\n\tMax RelError of 1.0000652718844432e+0 at index of 31080.\n]
expected: FAIL
[X SNR (-156.8632652868983 dB) is not greater than or equal to 85.58. Got -156.8632652868983.]
expected: FAIL
[X Stitched sine-wave buffers at sample rate 44100 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.000090957,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[31080\]\t1.0348265472000000e+10\t5.6332010030746460e-1\t1.0348265471436680e+10\t1.8370133545365261e+10\t9.0957000000000003e-5\n\t[31081\]\t4.5596850730665223e-41\t6.1397600173950195e-1\t6.1397600173950195e-1\t1.0000000000000000e+0\t9.0957000000000003e-5\n\tMax AbsError of 1.0348265471436680e+10 at index of 31080.\n\tMax RelError of 1.8370133545365261e+10 at index of 31080.\n]
expected: FAIL

View file

@ -1,5 +0,0 @@
[018.html]
expected: TIMEOUT
[origin of the script that invoked the method, javascript:]
expected: TIMEOUT

View file

@ -1,5 +0,0 @@
[017.html]
expected: TIMEOUT
[origin of the script that invoked the method, about:blank]
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[ar_dom_overlay_hit_test.https.html]
expected: ERROR

View file

@ -1,4 +1,4 @@
[ar_hittest_subscription_states.https.html]
[ar_hittest_subscription_states_regular.https.html]
[Hit test subscription succeeds if the feature was requested]
expected: FAIL

View file

@ -0,0 +1,10 @@
[ar_hittest_subscription_states_transient.https.html]
[Transient test subscription fails if the feature was requested but the session already ended]
expected: FAIL
[Transient hit test subscription succeeds if the feature was requested]
expected: FAIL
[Transient hit test subscription fails if the feature was not requested]
expected: FAIL

View file

@ -0,0 +1,2 @@
[ar_hittest_subscription_transientInputSources.https.html]
expected: ERROR

View file

@ -1,191 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Legacy platform objects</title>
<link rel="help" href="https://heycam.github.io/webidl/#es-legacy-platform-objects">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
function assert_prop_desc_equals(object, property_key, expected) {
let actual = Object.getOwnPropertyDescriptor(object, property_key);
if (expected === undefined) {
assert_equals(
actual, undefined,
"(assert_prop_desc_equals: no property descriptor expected)");
return;
}
for (p in actual) {
assert_true(
expected.hasOwnProperty(p),
"(assert_prop_desc_equals: property '" + p + "' is not expected)");
assert_equals(
actual[p], expected[p],
"(assert_prop_desc_equals: property '" + p + "')");
}
for (p in expected) {
assert_true(
actual.hasOwnProperty(p),
"(assert_prop_desc_equals: expected property '" + p + "' missing)");
}
}
// https://heycam.github.io/webidl/#legacy-platform-object-getownproperty
// https://heycam.github.io/webidl/#LegacyPlatformObjectGetOwnProperty
test(function() {
// DOMTokenList has an indexed property getter, no indexed property setter
// and no named property handlers.
let div = document.createElement("div");
div.classList.add("baz", "quux");
const domTokenList = div.classList;
assert_prop_desc_equals(
domTokenList, "1",
{value: "quux", writable: false, enumerable: true, configurable: true},
"[[GetOwnProperty]] for indexed properties returns the right descriptor");
assert_prop_desc_equals(
domTokenList, "42", undefined,
"[[GetOwnProperty]] with invalid index returns undefined");
assert_array_equals(Object.keys(domTokenList), ["0", "1"]);
assert_array_equals(Object.values(domTokenList), ["baz", "quux"]);
// getElementsByTagName() returns an HTMLCollection.
// HTMLCollection has indexed and named property getters, no setters. Its IDL
// interface declaration has [LegacyUnenumerableNamedProperties] so its named
// properties are not enumerable.
let span1 = document.createElement("span");
span1.id = "foo";
let span2 = document.createElement("span");
span2.id = "bar";
document.head.appendChild(span1);
document.head.appendChild(span2);
const elementList = document.getElementsByTagName("span");
assert_prop_desc_equals(
elementList, "foo",
{value: span1, writable: false, enumerable: false, configurable: true},
"[[GetOwnProperty]] for named properties returns the right descriptor");
assert_prop_desc_equals(
elementList, "1",
{value: span2, writable: false, enumerable: true, configurable: true},
"[[GetOwnProperty]] for indexed properties returns the right descriptor");
assert_prop_desc_equals(
elementList, "unknown", undefined,
"[[GetOwnProperty]] with invalid property name returns undefined");
assert_array_equals(Object.keys(elementList), ["0", "1"]);
assert_array_equals(Object.values(elementList), [span1, span2]);
}, "[[GetOwnProperty]] with getters and no setters");
test(function() {
// DOMStringMap supports named property getters and setters, but not indexed
// properties.
let span = document.createElement("span");
span.dataset.foo = "bar";
assert_prop_desc_equals(
span.dataset, "foo",
{value: "bar", writable: true, enumerable: true, configurable: true},
"[[GetOwnProperty]] for named properties returns the right descriptor");
assert_prop_desc_equals(
span.dataset, "unknown", undefined,
"[[GetOwnProperty]] with invalid property name returns undefined");
assert_array_equals(Object.keys(span.dataset), ["foo"]);
assert_array_equals(Object.values(span.dataset), ["bar"]);
}, "[[GetOwnProperty]] with named property getters and setters");
test(function() {
// HTMLSelectElement has indexed property getters and setters, but no support
// for named properties.
let selectElement = document.createElement("select");
assert_prop_desc_equals(
selectElement, "0", undefined,
"[[GetOwnProperty]] with invalid property index returns undefined");
let optionElement = document.createElement("option");
selectElement.appendChild(optionElement);
assert_prop_desc_equals(
selectElement, "0",
{value: optionElement, writable: true, enumerable: true, configurable: true},
"[[GetOwnProperty]] for indexed properties returns the right descriptor");
assert_array_equals(Object.keys(selectElement), ["0"]);
assert_array_equals(Object.values(selectElement), [optionElement]);
}, "[[GetOwnProperty]] with indexed property getters and setters");
// https://heycam.github.io/webidl/#legacy-platform-object-defineownproperty
// 3.9.3. [[DefineOwnProperty]]
test(function() {
let span = document.createElement("span");
span.className = "foo";
// DOMTokenList supports an indexed property getter but not a setter.
let domTokenList = span.classList;
// Confirm the test settings.
assert_equals(domTokenList.length, 1);
assert_prop_desc_equals(domTokenList, "0",
{value: "foo", writable: false, enumerable: true,
configurable: true});
assert_prop_desc_equals(domTokenList, "1", undefined);
// Actual test
assert_throws_js(TypeError, () =>
Object.defineProperty(domTokenList, "0", {value: true, writable: true}));
assert_throws_js(TypeError, () =>
Object.defineProperty(domTokenList, "1", {value: true, writable: true}));
assert_throws_js(TypeError, () =>
Object.defineProperty(domTokenList, "0", {get: () => {}}));
assert_throws_js(TypeError, () =>
Object.defineProperty(domTokenList, "0", {set: () => {}}));
assert_throws_js(TypeError, () =>
Object.defineProperty(domTokenList, "1", {get: () => {}}));
assert_throws_js(TypeError, () =>
Object.defineProperty(domTokenList, "1", {set: () => {}}));
assert_equals(domTokenList[0], "foo");
assert_equals(domTokenList[1], undefined);
domTokenList[0] = "bar";
domTokenList[1] = "bar";
assert_equals(domTokenList[0], "foo");
assert_equals(domTokenList[1], undefined);
assert_throws_js(TypeError, () => {
"use strict";
domTokenList[0] = "bar";
});
assert_throws_js(TypeError, () => {
"use strict";
domTokenList[1] = "bar";
});
// Nothing must change after all.
assert_equals(domTokenList.length, 1);
assert_prop_desc_equals(domTokenList, "0",
{value: "foo", writable: false, enumerable: true,
configurable: true});
assert_prop_desc_equals(domTokenList, "1", undefined);
}, "Test [[DefineOwnProperty]] with no indexed property setter support.");
test(function() {
// HTMLSelectElement supports an indexed property setter.
let select = document.createElement("select");
let option0 = document.createElement("option");
let option1 = document.createElement("option");
// Confirm the test settings.
assert_equals(select.length, 0);
assert_prop_desc_equals(select, "0", undefined);
// Try to define an accessor property with non supported property index.
assert_throws_js(TypeError, () =>
Object.defineProperty(select, "0", {get: () => {}}));
assert_throws_js(TypeError, () =>
Object.defineProperty(select, "0", {set: () => {}}));
assert_prop_desc_equals(select, "0", undefined);
// writable, enumerable, configurable will be ignored.
Object.defineProperty(select, "0", {value: option0, writable: false,
enumerable: false, configurable: false});
assert_prop_desc_equals(select, "0",
{value: option0, writable: true, enumerable: true,
configurable: true});
select[1] = option1;
assert_prop_desc_equals(select, "1",
{value: option1, writable: true, enumerable: true,
configurable: true});
// Try to define an accessor property with a supported property index.
assert_throws_js(TypeError, () =>
Object.defineProperty(select, "0", {get: () => {}}));
assert_throws_js(TypeError, () =>
Object.defineProperty(select, "0", {set: () => {}}));
assert_prop_desc_equals(select, "0",
{value: option0, writable: true, enumerable: true,
configurable: true});
}, "Test [[DefineOwnProperty]] with indexed property setter support.");
</script>

View file

@ -0,0 +1,89 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Legacy platform objects [[DefineOwnProperty]] method</title>
<link rel="help" href="https://heycam.github.io/webidl/#legacy-platform-object-defineownproperty">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="./helper.js"></script>
<script>
test(function() {
let span = document.createElement("span");
span.className = "foo";
// DOMTokenList supports an indexed property getter but not a setter.
let domTokenList = span.classList;
// Confirm the test settings.
assert_equals(domTokenList.length, 1);
assert_prop_desc_equals(domTokenList, "0",
{value: "foo", writable: false, enumerable: true,
configurable: true});
assert_prop_desc_equals(domTokenList, "1", undefined);
// Actual test
assert_throws_js(TypeError, () =>
Object.defineProperty(domTokenList, "0", {value: true, writable: true}));
assert_throws_js(TypeError, () =>
Object.defineProperty(domTokenList, "1", {value: true, writable: true}));
assert_throws_js(TypeError, () =>
Object.defineProperty(domTokenList, "0", {get: () => {}}));
assert_throws_js(TypeError, () =>
Object.defineProperty(domTokenList, "0", {set: () => {}}));
assert_throws_js(TypeError, () =>
Object.defineProperty(domTokenList, "1", {get: () => {}}));
assert_throws_js(TypeError, () =>
Object.defineProperty(domTokenList, "1", {set: () => {}}));
assert_equals(domTokenList[0], "foo");
assert_equals(domTokenList[1], undefined);
domTokenList[0] = "bar";
domTokenList[1] = "bar";
assert_equals(domTokenList[0], "foo");
assert_equals(domTokenList[1], undefined);
assert_throws_js(TypeError, () => {
"use strict";
domTokenList[0] = "bar";
});
assert_throws_js(TypeError, () => {
"use strict";
domTokenList[1] = "bar";
});
// Nothing must change after all.
assert_equals(domTokenList.length, 1);
assert_prop_desc_equals(domTokenList, "0",
{value: "foo", writable: false, enumerable: true,
configurable: true});
assert_prop_desc_equals(domTokenList, "1", undefined);
}, "Test [[DefineOwnProperty]] with no indexed property setter support.");
test(function() {
// HTMLSelectElement supports an indexed property setter.
let select = document.createElement("select");
let option0 = document.createElement("option");
let option1 = document.createElement("option");
// Confirm the test settings.
assert_equals(select.length, 0);
assert_prop_desc_equals(select, "0", undefined);
// Try to define an accessor property with non supported property index.
assert_throws_js(TypeError, () =>
Object.defineProperty(select, "0", {get: () => {}}));
assert_throws_js(TypeError, () =>
Object.defineProperty(select, "0", {set: () => {}}));
assert_prop_desc_equals(select, "0", undefined);
// writable, enumerable, configurable will be ignored.
Object.defineProperty(select, "0", {value: option0, writable: false,
enumerable: false, configurable: false});
assert_prop_desc_equals(select, "0",
{value: option0, writable: true, enumerable: true,
configurable: true});
select[1] = option1;
assert_prop_desc_equals(select, "1",
{value: option1, writable: true, enumerable: true,
configurable: true});
// Try to define an accessor property with a supported property index.
assert_throws_js(TypeError, () =>
Object.defineProperty(select, "0", {get: () => {}}));
assert_throws_js(TypeError, () =>
Object.defineProperty(select, "0", {set: () => {}}));
assert_prop_desc_equals(select, "0",
{value: option0, writable: true, enumerable: true,
configurable: true});
}, "Test [[DefineOwnProperty]] with indexed property setter support.");
</script>

View file

@ -0,0 +1,84 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Legacy platform objects [[GetOwnProperty]] method</title>
<link rel="help" href="https://heycam.github.io/webidl/#legacy-platform-object-getownproperty">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="./helper.js"></script>
<script>
test(function() {
// DOMTokenList has an indexed property getter, no indexed property setter
// and no named property handlers.
let div = document.createElement("div");
div.classList.add("baz", "quux");
const domTokenList = div.classList;
assert_prop_desc_equals(
domTokenList, "1",
{value: "quux", writable: false, enumerable: true, configurable: true},
"[[GetOwnProperty]] for indexed properties returns the right descriptor");
assert_prop_desc_equals(
domTokenList, "42", undefined,
"[[GetOwnProperty]] with invalid index returns undefined");
assert_array_equals(Object.keys(domTokenList), ["0", "1"]);
assert_array_equals(Object.values(domTokenList), ["baz", "quux"]);
// getElementsByTagName() returns an HTMLCollection.
// HTMLCollection has indexed and named property getters, no setters. Its IDL
// interface declaration has [LegacyUnenumerableNamedProperties] so its named
// properties are not enumerable.
let span1 = document.createElement("span");
span1.id = "foo";
let span2 = document.createElement("span");
span2.id = "bar";
document.head.appendChild(span1);
document.head.appendChild(span2);
const elementList = document.getElementsByTagName("span");
assert_prop_desc_equals(
elementList, "foo",
{value: span1, writable: false, enumerable: false, configurable: true},
"[[GetOwnProperty]] for named properties returns the right descriptor");
assert_prop_desc_equals(
elementList, "1",
{value: span2, writable: false, enumerable: true, configurable: true},
"[[GetOwnProperty]] for indexed properties returns the right descriptor");
assert_prop_desc_equals(
elementList, "unknown", undefined,
"[[GetOwnProperty]] with invalid property name returns undefined");
assert_array_equals(Object.keys(elementList), ["0", "1"]);
assert_array_equals(Object.values(elementList), [span1, span2]);
}, "[[GetOwnProperty]] with getters and no setters");
test(function() {
// DOMStringMap supports named property getters and setters, but not indexed
// properties.
let span = document.createElement("span");
span.dataset.foo = "bar";
assert_prop_desc_equals(
span.dataset, "foo",
{value: "bar", writable: true, enumerable: true, configurable: true},
"[[GetOwnProperty]] for named properties returns the right descriptor");
assert_prop_desc_equals(
span.dataset, "unknown", undefined,
"[[GetOwnProperty]] with invalid property name returns undefined");
assert_array_equals(Object.keys(span.dataset), ["foo"]);
assert_array_equals(Object.values(span.dataset), ["bar"]);
}, "[[GetOwnProperty]] with named property getters and setters");
test(function() {
// HTMLSelectElement has indexed property getters and setters, but no support
// for named properties.
let selectElement = document.createElement("select");
assert_prop_desc_equals(
selectElement, "0", undefined,
"[[GetOwnProperty]] with invalid property index returns undefined");
let optionElement = document.createElement("option");
selectElement.appendChild(optionElement);
assert_prop_desc_equals(
selectElement, "0",
{value: optionElement, writable: true, enumerable: true, configurable: true},
"[[GetOwnProperty]] for indexed properties returns the right descriptor");
assert_array_equals(Object.keys(selectElement), ["0"]);
assert_array_equals(Object.values(selectElement), [optionElement]);
}, "[[GetOwnProperty]] with indexed property getters and setters");
</script>

View file

@ -0,0 +1,65 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Legacy platform objects [[OwnPropertyKeys]] method</title>
<link rel="help" href="https://heycam.github.io/webidl/#legacy-platform-object-ownpropertykeys">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
function custom_assert_array_equals(actual, expected, msg) {
function replacer(k, v) {
if (typeof v === "symbol") {
return v.toString();
}
return v;
}
assert_array_equals(actual, expected, " actual " + JSON.stringify(actual, replacer) + " expected " + JSON.stringify(expected, replacer));
}
test(function() {
var element = document.createElement("div");
element.appendChild(document.createElement("div"));
element.appendChild(document.createElement("div"));
element.appendChild(document.createElement("div"));
custom_assert_array_equals(Reflect.ownKeys(element.childNodes), ["0", "1", "2"]);
}, "must enumerate property indices in ascending numerical order");
test(function() {
var element = document.createElement("div");
element.setAttribute("data-foo", "foo content");
element.setAttribute("data-bar", "bar content");
element.setAttribute("data-baz", "baz content");
custom_assert_array_equals(Reflect.ownKeys(element.dataset), ["foo", "bar", "baz"]);
}, "must enumerate property names in list order");
test(function() {
var element = document.createElement("div");
element.setAttribute("id", "foo");
element.setAttribute("class", "bar");
custom_assert_array_equals(Reflect.ownKeys(element.attributes), ["0", "1", "id", "class"]);
}, "must first enumerate property indices in ascending numerical order, then named properties in list order");
test(function() {
var element = document.createElement("div");
element.attributes.foo = "some value";
element.attributes.bar = "and another";
element.setAttribute("id", "foo");
element.setAttribute("class", "bar");
custom_assert_array_equals(Reflect.ownKeys(element.attributes), ["0", "1", "id", "class", "foo", "bar"]);
}, "must enumerate own properties after indexed and named properties even when they're added first");
test(function() {
var symb1 = Symbol();
var symb2 = Symbol();
var element = document.createElement("div");
element.attributes.foo = "some value";
element.attributes[symb1] = "symb1";
element.attributes[symb2] = "symb2";
element.attributes.bar = "and another";
element.setAttribute("id", "foo");
element.setAttribute("class", "bar");
custom_assert_array_equals(Reflect.ownKeys(element.attributes),
["0", "1", "id", "class", "foo", "bar", symb1, symb2]);
}, "must enumerate symbols after strings, regardless of which ones got added first");
</script>

View file

@ -0,0 +1,79 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Legacy platform objects [[Set]] method</title>
<link rel="help" href="https://heycam.github.io/webidl/#legacy-platform-object-set">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(function() {
var element = document.createElement("div");
element.appendChild(document.createElement("div"));
element.childNodes["5"] = "foo";
assert_equals(element.childNodes["5"], undefined);
}, "must not set the property value when assigning to a numeric property on an object which implements an indexed property getter but not a setter when not in strict mode");
test(function() {
"use strict";
var element = document.createElement("div");
element.appendChild(document.createElement("div"));
assert_throws_js(TypeError, function() { element.childNodes["5"] = "foo"; });
}, "must throw when assigning to a numeric property on an object which implements a indexed property getter but not a setter in strict mode");
test(function() {
var element = document.createElement("div");
element.attributes.foo = "foo";
assert_equals(element.attributes.foo, "foo");
}, "must allow assigning to a named property on an object which implements a named property getter but not a setter when not in strict mode");
test(function() {
"use strict";
var element = document.createElement("div");
element.attributes.foo = "foo";
assert_equals(element.attributes.foo, "foo");
}, "must allow assigning to a named property on an object which implements a named property getter but not a setter in strict mode");
var symbol = Symbol();
test(function() {
var element = document.createElement("div");
element.appendChild(document.createElement("div"));
element.childNodes[symbol] = "foo";
assert_equals(element.childNodes[symbol], "foo");
}, "must allow assigning to a symbol property on an object which implements an indexed property getter but not a setter when not in strict mode");
test(function() {
"use strict";
var element = document.createElement("div");
element.appendChild(document.createElement("div"));
element.childNodes[symbol] = "foo";
assert_equals(element.childNodes[symbol], "foo");
}, "must allow assigning to a symbol property on an object which implements an indexed property getter but not a setter in strict mode");
test(function() {
var element = document.createElement("div");
element.attributes[symbol] = "foo";
assert_equals(element.attributes[symbol], "foo");
}, "must allow assigning to a symbol property on an object which implements indexed and named property getters but no setters when not in strict mode");
test(function() {
"use strict";
var element = document.createElement("div");
element.attributes[symbol] = "foo";
assert_equals(element.attributes[symbol], "foo");
}, "must allow assigning to a symbol property on an object which implements indexed and named property getters but no setters in strict mode");
test(function() {
sessionStorage.clear();
this.add_cleanup(function() { sessionStorage.clear(); });
sessionStorage[symbol] = "foo";
assert_equals(sessionStorage[symbol], "foo");
}, "must allow assigning to a symbol property on an object which implements indexed and named property getters and setters when not in strict mode");
test(function() {
"use strict";
sessionStorage.clear();
this.add_cleanup(function() { sessionStorage.clear(); });
sessionStorage[symbol] = "foo";
assert_equals(sessionStorage[symbol], "foo");
}, "must allow assigning to a symbol property on an object which implements indexed and named property getters and setters in strict mode");
</script>

View file

@ -0,0 +1,22 @@
function assert_prop_desc_equals(object, property_key, expected) {
let actual = Object.getOwnPropertyDescriptor(object, property_key);
if (expected === undefined) {
assert_equals(
actual, undefined,
"(assert_prop_desc_equals: no property descriptor expected)");
return;
}
for (p in actual) {
assert_true(
expected.hasOwnProperty(p),
"(assert_prop_desc_equals: property '" + p + "' is not expected)");
assert_equals(
actual[p], expected[p],
"(assert_prop_desc_equals: property '" + p + "')");
}
for (p in expected) {
assert_true(
actual.hasOwnProperty(p),
"(assert_prop_desc_equals: expected property '" + p + "' missing)");
}
}

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<style>
#wb {
white-space: pre;
border-bottom: red 14px solid;
}
</style>
<p>Line-clamp should respect bottom-border.
<p id="wb">Line 1
Line 2
Line 3&#x2026;
</p>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<link rel="match" href="webkit-box-clamp-bottom-border-ref.html">
<style>
#wb {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
white-space: pre;
border-bottom: red 14px solid;
}
</style>
<p>Line-clamp should respect bottom-border.
<div id="wb">Line 1
Line 2
Line 3
Line 4
</div>

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<link rel="author" title="Stephen Chenney" href="mailto:schenney@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#border-width">
<head>
<style>
.outer {
border: solid 1px black;
background: red;
width: 101px;
height: 101px;
margin: 5px;
padding: 0px;
box-sizing: border-box;
}
.inner {
background: lightgreen;
box-sizing: border-box;
padding: 0px;
}
#inner1 {
width: 99px;
height: 99px;
}
#inner2 {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner" id="inner1"></div>
</div>
<div class="outer">
<div class="inner" id="inner2"></div>
</div>
</body>

View file

@ -0,0 +1,34 @@
<!DOCTYPE html>
<link rel="author" title="Stephen Chenney" href="mailto:schenney@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#border-width">
<head>
<style>
.outer {
border: solid 1px black;
background: red;
width: 100px;
height: 100px;
margin: 5px;
}
.inner {
background: lightgreen
}
#inner1 {
width: 100px;
height: 100px;
}
#inner2 {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner" id="inner1"></div>
</div>
<div class="outer">
<div class="inner" id="inner2"></div>
</div>
</body>

View file

@ -0,0 +1,42 @@
<!DOCTYPE html>
<link rel="author" title="Stephen Chenney" href="mailto:schenney@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#border-width">
<link rel="match" href="reference/subpixel-borders-with-child-border-box-sizing-ref.html">
<meta name="assert" content="Sub-pixel borders should always appear, and not be
overdrawn by child content with box-sizing: border-box." />
<head>
<style>
body { }
.outer {
border: solid .5px black;
background: red;
width: 101px;
height: 101px;
margin: 5px;
padding: 0px;
box-sizing: border-box;
}
.inner {
background: lightgreen;
padding: 0px;
box-sizing: border-box;
}
#inner1 {
width: 99px;
height: 99px;
}
#inner2 {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner" id="inner1"></div>
</div>
<div class="outer">
<div class="inner" id="inner2"></div>
</div>
</body>

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<link rel="author" title="Stephen Chenney" href="mailto:schenney@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#border-width">
<link rel="match" href="reference/subpixel-borders-with-child-ref.html">
<meta name="assert" content="Sub-pixel borders should always appear, and not be
overdrawn by child content." />
<head>
<style>
.outer {
border: solid .5px black;
background: red;
width: 100px;
height: 100px;
margin: 5px;
}
.inner {
background: lightgreen
}
#inner1 {
width: 100px;
height: 100px;
}
#inner2 {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner" id="inner1"></div>
</div>
<div class="outer">
<div class="inner" id="inner2"></div>
</div>
</body>

View file

@ -0,0 +1,20 @@
<!doctype html>
<title>CSS Color Adjustment Test: iframe element with light color-scheme, frame document with dark color-scheme, :root background with alpha</title>
<link rel="help" href="https://drafts.csswg.org/css-color-adjust/#color-scheme-effect">
<link rel="match" href="support/dark-frame-alpha.html">
<link rel="stylesheet" href="support/assert-preferred-dark.css">
<style>
html, body {
margin: 0;
height: 100%;
}
iframe {
margin: 0;
border: 0;
padding: 0;
width: 100%;
height: 100%;
display: block;
}
</style>
<iframe src="support/dark-frame-alpha.html"></iframe>

View file

@ -0,0 +1,20 @@
<!doctype html>
<title>CSS Color Adjustment Test: Frames with a dark color-scheme should get an opaque background when embedding element and embedded root color-schemes do not match</title>
<link rel="help" href="https://drafts.csswg.org/css-color-adjust/#color-scheme-effect">
<link rel="match" href="support/dark-frame-opaque.html">
<link rel="stylesheet" href="support/assert-preferred-dark.css">
<style>
html, body {
margin: 0;
height: 100%;
}
iframe {
margin: 0;
border: 0;
padding: 0;
width: 100%;
height: 100%;
display: block;
}
</style>
<iframe src="support/dark-frame-opaque.html"></iframe>

View file

@ -1,6 +1,6 @@
<!doctype html>
<title>CSS Color Adjustment Test: Frames with a dark color-scheme should still be transparent</title>
<link rel="help" href="https://drafts.csswg.org/css-color-adjust/#color-scheme-processing">
<title>CSS Color Adjustment Test: Frames with a dark color-scheme should still be transparent when embedding element and embedded root color-schemes match</title>
<link rel="help" href="https://drafts.csswg.org/css-color-adjust/#color-scheme-effect">
<link rel="match" href="color-scheme-iframe-background-ref.html">
<link rel="stylesheet" href="support/assert-preferred-dark.css">
<iframe width="600" height="400" src="support/dark-frame.html"></iframe>
<iframe width="600" height="400" style="color-scheme:dark" src="support/dark-frame.html"></iframe>

View file

@ -0,0 +1,9 @@
<!doctype html>
<style>
:root {
color-scheme: dark;
background-color: rgba(0, 128, 0, 0.5);
}
p { color: lime }
</style>
<p>This text should be lime and the background should be green blended with a dark canvas.</p>

View file

@ -0,0 +1,6 @@
<!doctype html>
<style>
:root { color-scheme: dark }
p { color: green }
</style>
<p>This text should be green and the background should be dark opaque.</p>

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<style>
.flexbox {
height: 100px;
width: 100px;
display: flex;
flex-direction: column;
background-color: red;
}
.flexbox img {
max-height: 100%;
min-height: 0;
}
</style>
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#layout-algorithm" title="9. Flex Layout Algorithm">
<link rel="author" title="Google LLC" href="https://www.google.com/">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div class="flexbox">
<img src="support/100x100-green.png">
</div>

View file

@ -0,0 +1,93 @@
<!DOCTYPE html>
<title>Sticky elements inside fixed ancestors and iframe shouldn't account for scroll</title>
<style>
body,html {
margin: 0;
width: 100%;
height: 100%;
}
iframe {
margin: 10px;
width: 90%;
height: 90%;
border: 1px solid black;
}
.spacer {
height: 120vh;
}
</style>
<div class="spacer"></div>
<iframe srcdoc="
<!DOCTYPE html>
<title>Reference for sticky elements inside fixed ancestors shouldn't account for scroll</title>
<style>
body,html {
margin: 0;
width: 100%;
height: 100%;
}
.sticky {
background: green;
width: 100px;
height: 10%;
}
.spacer {
height: calc(25vh - 10%);
}
.long {
height: 600vh;
}
.position-parent {
position: absolute;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
top: 100vh;
background-color: lightgrey;
}
.container {
width: 100px;
height: 100%;
background-color: grey;
}
button {
position: fixed;
left: 20px;
top: 20px;
}
.fixed {
position: fixed;
top: 25vh;
}
</style>
<div class='position-parent fixed'>
<div class='container'>
<div class='spacer'></div>
<div class='sticky'></div>
</div>
</div>
<div class='long'></div>
<button id='button'>Toggle Fixed</button>
<script>
window.scrollTo(0, document.querySelector('.long').clientHeight);
</script>
"></iframe>
<div class="spacer"></div>
<script>
const child = document.querySelector('iframe');
child.scrollIntoView();
</script>

View file

@ -0,0 +1,54 @@
<!DOCTYPE html>
<html class='reftest-wait'>
<title>Sticky elements inside fixed ancestors and iframe shouldn't account for scroll</title>
<link rel="match" href="position-sticky-fixed-ancestor-iframe-ref.html" />
<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
<link rel="help" href="https://crbug.com/1019142">
<meta name="assert" content="This test checks that a sticky element inside a fixed subtree and iframe doesn't scroll with the viewport "/>
<script src="/common/reftest-wait.js"></script>
<style>
body,html {
margin: 0;
width: 100%;
height: 100%;
}
iframe {
margin: 10px;
width: 90%;
height: 90%;
border: 1px solid black;
}
.spacer {
height: 120vh;
}
</style>
<div class="spacer"></div>
<iframe src="resources/position-sticky-fixed-ancestor-iframe-child.html"></iframe>
<div class="spacer"></div>
<script>
const child = document.querySelector('iframe');
child.scrollIntoView();
window.onload = () => {
const childDoc = child.contentDocument;
function toggleFixed() {
childDoc.querySelector('.position-parent').classList.toggle('fixed');
}
childDoc.getElementById('button').addEventListener('click', toggleFixed);
requestAnimationFrame(() => {
childDoc.scrollingElement.scrollTop = childDoc.querySelector('.long').clientHeight;
requestAnimationFrame(() => {
toggleFixed();
takeScreenshot();
});
});
};
</script>
</html>

View file

@ -0,0 +1,63 @@
<!DOCTYPE html>
<title>Reference for sticky elements inside fixed ancestors shouldn't account for scroll</title>
<style>
body,html {
margin: 0;
width: 100%;
height: 100%;
}
.sticky {
background: green;
width: 100px;
height: 10%;
}
.spacer {
height: calc(25vh - 10%);
}
.long {
height: 600vh;
}
.position-parent {
position: absolute;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
top: 100vh;
background-color: lightgrey;
}
.container {
width: 100px;
height: 100%;
background-color: grey;
}
button {
position: fixed;
left: 20px;
top: 20px;
}
.fixed {
position: fixed;
top: 25vh;
}
</style>
<div class="position-parent fixed">
<div class="container">
<div class="spacer"></div>
<div class="sticky"></div>
</div>
</div>
<div class="long"></div>
<button id="button">Toggle Fixed</button>
<script>
window.scrollTo(0, document.querySelector('.long').clientHeight);
</script>

View file

@ -0,0 +1,86 @@
<!DOCTYPE html>
<html class='reftest-wait'>
<title>Sticky elements inside fixed ancestors shouldn't account for scroll</title>
<link rel="match" href="position-sticky-fixed-ancestor-ref.html" />
<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
<link rel="help" href="https://crbug.com/1019142">
<meta name="assert" content="This test checks that a sticky element inside a fixed subtree doesn't scroll with the viewport "/>
<script src="/common/reftest-wait.js"></script>
<style>
body,html {
margin: 0;
width: 100%;
height: 100%;
}
.sticky {
background: green;
position: sticky;
bottom: 50vh;
width: 100px;
height: 10%;
}
.spacer {
height: 90%;
}
.long {
height: 600vh;
}
.position-parent {
position: absolute;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
top: 100vh;
background-color: lightgrey;
}
.container {
width: 100px;
height: 100%;
background-color: grey;
}
button {
position: fixed;
left: 20px;
top: 20px;
}
.fixed {
position: fixed;
top: 25vh;
}
</style>
<div class="position-parent">
<div class="container">
<div class="spacer"></div>
<div class="sticky"></div>
</div>
</div>
<div class="long"></div>
<button id="button">Toggle Fixed</button>
<script>
function toggleFixed() {
document.querySelector('.position-parent').classList.toggle('fixed');
}
document.getElementById('button').addEventListener('click', toggleFixed);
requestAnimationFrame(() => {
window.scrollTo(0, document.querySelector('.long').clientHeight);
requestAnimationFrame(() => {
toggleFixed();
takeScreenshot();
});
});
</script>
</html>

View file

@ -0,0 +1,61 @@
<!DOCTYPE html>
<style>
body,html {
margin: 0;
width: 100%;
height: 100%;
}
.sticky {
background: green;
position: sticky;
bottom: 50vh;
width: 100px;
height: 10%;
}
.spacer {
height: 90%;
}
.long {
height: 600vh;
}
.position-parent {
position: absolute;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
top: 100vh;
background-color: lightgrey;
}
.container {
width: 100px;
height: 100%;
background-color: grey;
}
button {
position: fixed;
left: 20px;
top: 20px;
}
.fixed {
position: fixed;
top: 25vh;
}
</style>
<div class="position-parent">
<div class="container">
<div class="spacer"></div>
<div class="sticky"></div>
</div>
</div>
<div class="long"></div>
<button id="button">Toggle Fixed</button>
</html>

View file

@ -23,7 +23,7 @@ runPropertyTests('line-height', [
{
syntax: '<number>',
specified: assert_is_equal_with_range_handling,
computed: (_, result) => assert_is_unit('px', result)
computed: (_, result) => assert_is_unit('number', result)
},
{
syntax: '<percentage>',

View file

@ -0,0 +1,81 @@
<!DOCTYPE html>
<title>CSSStyleSheet Disallow Import Rules</title>
<link rel="author" title="Erik Nordin" href="mailto:enordin@mozilla.com">
<link rel="help" href="https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-597733392">
<div id="target"></div>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script>
const greenStyleText = ".green { color: green; }";
const import_text = '@import url("support/constructable-import.css");';
function attachShadowDiv(host) {
const shadowRoot = host.attachShadow({mode: 'open'});
const shadowDiv = document.createElement("div");
shadowRoot.appendChild(shadowDiv);
return shadowDiv;
}
test(() => {
assert_throws_dom("SyntaxError", () => { (new CSSStyleSheet).insertRule(import_text) });
}, 'Inserting an @import rule through insertRule on a constructed stylesheet throws an exception');
async_test(async t => {
const importUrl = "support/constructable-import.css";
const sheet = new CSSStyleSheet();
sheet.replaceSync(import_text);
await sheet.replace(import_text);
assert_throws_dom("SyntaxError", () => { sheet.insertRule(import_text) });
const timeAfterImportsInvoked = performance.now();
let link = document.createElement("link");
link.rel = "stylesheet";
link.href = importUrl;
link.addEventListener("error", t.unreached_func("Load shouldn't fail"));
link.addEventListener("load", t.step_func_done(event => {
let entries = window.performance.getEntriesByType('resource').filter(entry => entry.name.includes(importUrl));
assert_equals(entries.length, 1, "There should be only one entry for the import URL");
assert_greater_than_equal(entries[0].startTime, timeAfterImportsInvoked, "The entry's start time should be after all throws");
link.remove();
}));
document.body.appendChild(link);
}, "@import rules should not trigger any loads.")
promise_test(() => {
const span = document.createElement("span");
target.appendChild(span);
const shadowDiv = attachShadowDiv(span);
shadowDiv.classList.add("green");
const sheet = new CSSStyleSheet();
span.shadowRoot.adoptedStyleSheets = [sheet];
assert_equals(getComputedStyle(shadowDiv).color, "rgb(0, 0, 0)");
const sheet_promise = sheet.replace(`${import_text} ${greenStyleText}`);
return sheet_promise.then((sheet) => {
assert_equals(sheet.cssRules.length, 1);
assert_equals(sheet.cssRules[0].cssText, greenStyleText);
assert_equals(getComputedStyle(shadowDiv).color, "rgb(0, 128, 0)");
}).catch((reason) => {
assert_unreached(`Promise was rejected (${reason}) when it should have been resolved`);
});
}, '@import rules are not parsed in CSSStyleSheet.replace');
test(() => {
const span = document.createElement("span");
target.appendChild(span);
const shadowDiv = attachShadowDiv(span);
shadowDiv.classList.add("green");
const sheet = new CSSStyleSheet();
span.shadowRoot.adoptedStyleSheets = [sheet];
assert_equals(getComputedStyle(shadowDiv).color, "rgb(0, 0, 0)");
// Replace and assert that the imported rule is applied.
const sheet_promise = sheet.replaceSync(`${import_text} ${greenStyleText}`);
assert_equals(sheet.cssRules.length, 1);
assert_equals(sheet.cssRules[0].cssText, greenStyleText);
assert_equals(getComputedStyle(shadowDiv).color, "rgb(0, 128, 0)");
}, '@import rules are not parsed in CSSStyleSheet.replaceSync');
</script>

View file

@ -3,7 +3,7 @@
<script>
window.addEventListener('load', function() {
var img = document.createElement('IMG');
img.setAttribute("src", "/feature-policy/experimental-features/resources/image.jpg");
img.setAttribute("src", "/document-policy/experimental-features/resources/image.jpg");
img.addEventListener('load', function() {
parent.postMessage({width: img.width, height: img.height}, '*');
});

View file

@ -8,9 +8,9 @@
const default_width = 300;
const default_height = 150;
const srcs = [
"/feature-policy/experimental-features/resources/image.jpg",
"/feature-policy/experimental-features/resources/image.png",
"/feature-policy/experimental-features/resources/image.svg"
"/document-policy/experimental-features/resources/image.jpg",
"/document-policy/experimental-features/resources/image.png",
"/document-policy/experimental-features/resources/image.svg"
];
const test_cases = [
// Test when no size is specified, img/video is laid out by the default size.
@ -60,7 +60,7 @@ for (var test of test_cases) {
}));
var expected_width = test.expected_width;
var expected_height = test.expected_height;
video.setAttribute("src", "/feature-policy/experimental-features/resources/video.ogv");
video.setAttribute("src", "/document-policy/experimental-features/resources/video.ogv");
if (typeof test.attribute !== "undefined") {
video.setAttribute(test.attribute, test.value);
}
@ -72,11 +72,12 @@ for (var test of test_cases) {
' and attribute ' + test.attribute1 + '=' + test.value1);
}
// Test unsized-image works in local and remote iframes.
// Subframes do not inherit document policy from parent frame.
// Unsized-Media should not work in subframes.
var iframe = document.querySelector('iframe');
var iframe_srcs = [
"/feature-policy/experimental-features/resources/feature-policy-image.html",
"https://{{domains[www]}}:{{ports[https][0]}}/feature-policy/experimental-features/resources/feature-policy-image.html"];
"/document-policy/experimental-features/resources/document-policy-image.html",
"https://{{domains[www]}}:{{ports[https][0]}}/document-policy/experimental-features/resources/document-policy-image.html"];
for (var src of iframe_srcs) {
promise_test(function() {
iframe.src = src;
@ -85,8 +86,8 @@ for (var src of iframe_srcs) {
resolve(e.data);
});
}).then(function(data) {
assert_equals(data.width, default_width, 'width');
assert_equals(data.height, default_height, 'height');
assert_not_equals(data.width, default_width, 'width');
assert_not_equals(data.height, default_height, 'height');
});
}, 'Test image size is correctly rendered in iframe of src ' + src);
}

View file

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Before After
Before After

View file

@ -9,7 +9,7 @@
<script>
var check_report_format = (reports, observer) => {
let report = reports[0];
assert_equals(report.type, "feature-policy-violation");
assert_equals(report.type, "document-policy-violation");
assert_equals(report.url, document.location.href);
assert_equals(report.body.featureId, "unsized-media");
assert_equals(report.body.disposition, "enforce");
@ -17,7 +17,7 @@ var check_report_format = (reports, observer) => {
async_test(t => {
new ReportingObserver(t.step_func_done(check_report_format),
{types: ['feature-policy-violation'], buffered: true}).observe();
{types: ['document-policy-violation'], buffered: true}).observe();
}, "Unsized-media Report Format");
</script>
</body>

View file

@ -0,0 +1 @@
Document-Policy: no-unsized-media

View file

@ -1 +0,0 @@
Feature-Policy: unsized-media 'none'

View file

@ -1,3 +1,4 @@
// META: timeout=long
// META: global=window,worker
// META: script=/common/get-host-info.sub.js

View file

@ -143,5 +143,14 @@ async_test(t => {
assert_false(wasLoaded, 'Make sure the first loading is ongoing.');
form.submit();
}, 'Cannot navigate (after constructing the entry list)');
promise_test(async () => {
let form = populateForm('<input type=submit>');
let iframe = form.previousSibling;
let event;
form.submit();
await loadPromise(iframe);
assert_true(iframe.contentWindow.location.href.includes("?"));
}, 'Submission URL should always have a non-null query part');
</script>
</body>

View file

@ -667,7 +667,6 @@ MISSING-LINK: css/geometry/*.worker.js
MISSING-LINK: css/filter-effects/*.any.js
# Tests that use WebKit/Blink testing APIs
LAYOUTTESTS APIS: import-maps/resources/jest-test-helper.js
LAYOUTTESTS APIS: import-maps/common/resources/common-test-helper.js
LAYOUTTESTS APIS: resources/chromium/enable-hyperlink-auditing.js
LAYOUTTESTS APIS: resources/chromium/generic_sensor_mocks.js

View file

@ -20,6 +20,10 @@
font-family: largeop-displayoperatorminheight2000-2AFF-italiccorrection3000;
src: url("/fonts/math/largeop-displayoperatorminheight2000-2AFF-italiccorrection3000.woff");
}
@font-face {
font-family: largeop-displayoperatorminheight7000-2AFF-italiccorrection5000;
src: url("/fonts/math/largeop-displayoperatorminheight7000-2AFF-italiccorrection5000.woff");
}
</style>
<script>
function getBox(aId) {
@ -38,6 +42,7 @@
- In mmultiscripts, prescript pairs are vertically aligned.
*/
var epsilon = 1;
var emToPx = 10 / 1000; // font-size: 10px, font.em = 1000
function runTests() {
test(function() {
assert_true(MathMLFeatureDetection.has_mspace());
@ -52,14 +57,23 @@
test(function() {
assert_true(MathMLFeatureDetection.has_mspace());
var emToPx = 10 / 1000; // font-size: 10px, font.em = 1000
var v = 3000 * emToPx;
assert_approx_equals(getBox("base011").right - getBox("sub011").left, v, epsilon, "msub");
assert_approx_equals(getBox("sup012").left, getBox("base012").right, epsilon, "msup");
assert_approx_equals(getBox("sup013").left - getBox("sub013").left, v, epsilon, "msubsup");
assert_approx_equals(getBox("sup014").left - getBox("sub014").left, v, epsilon, "mmultiscripts postscripts");
assert_approx_equals(getBox("sup015").left - getBox("sub015").left, 0, epsilon, "mmultiscripts prescripts");
}, "NonNull Italic Correction");
}, "NonNull Italic Correction (MathGlyphVariantRecord)");
test(function() {
assert_true(MathMLFeatureDetection.has_mspace());
var v = 5000 * emToPx;
assert_approx_equals(getBox("base021").right - getBox("sub021").left, v, epsilon, "msub");
assert_approx_equals(getBox("sup022").left, getBox("base022").right, epsilon, "msup");
assert_approx_equals(getBox("sup023").left - getBox("sub023").left, v, epsilon, "msubsup");
assert_approx_equals(getBox("sup024").left - getBox("sub024").left, v, epsilon, "mmultiscripts postscripts");
assert_approx_equals(getBox("sup025").left - getBox("sub025").left, 0, epsilon, "mmultiscripts prescripts");
}, "NonNull Italic Correction (GlyphAssembly)");
done();
}
</script>
@ -98,7 +112,7 @@
</mmultiscripts>
</math>
</p>
<h2>NonNull Italic Correction</h2>
<h2>NonNull Italic Correction (MathGlyphVariantRecord)</h2>
<p>
<math displaystyle="true" style="font-family: largeop-displayoperatorminheight2000-2AFF-italiccorrection3000;">
<msub>
@ -130,5 +144,37 @@
</mmultiscripts>
</math>
</p>
<h2>NonNull Italic Correction (GlyphAssembly)</h2>
<p>
<math displaystyle="true" style="font-family: largeop-displayoperatorminheight7000-2AFF-italiccorrection5000;">
<msub>
<mo id="base021" lspace="0px" rspace="0px">&#x2AFF;</mo>
<mspace id="sub021" height="1em" width="1em" style="background: blue"/>
</msub>
</math>
<math displaystyle="true" style="font-family: largeop-displayoperatorminheight7000-2AFF-italiccorrection5000;">
<msup>
<mo id="base022" lspace="0px" rspace="0px">&#x2AFF;</mo>
<mspace id="sup022" height="1em" width="1em" style="background: blue"/>
</msup>
</math>
<math displaystyle="true" style="font-family: largeop-displayoperatorminheight7000-2AFF-italiccorrection5000;">
<msubsup>
<mo lspace="0px" rspace="0px">&#x2AFF;</mo>
<mspace id="sub023" height="1em" width="1em" style="background: blue"/>
<mspace id="sup023" height="1em" width="1em" style="background: green"/>
</msubsup>
</math>
<math displaystyle="true" style="font-family: largeop-displayoperatorminheight7000-2AFF-italiccorrection5000;">
<mmultiscripts>
<mo lspace="0px" rspace="0px">&#x2AFF;</mo>
<mspace id="sub024" height="1em" width="1em" style="background: blue"/>
<mspace id="sup024" height="1em" width="1em" style="background: green"/>
<mprescripts/>
<mspace id="sub025" height="1em" width="1em" style="background: magenta"/>
<mspace id="sup025" height="1em" width="1em" style="background: cyan"/>
</mmultiscripts>
</math>
</p>
</body>
</html>

View file

@ -12,13 +12,13 @@
window.addEventListener("load", function() {
test(() => {
const mrow = document.getElementById('mrow');
assert_equals(mrow.tabIndex, -1, "no attribute");
assert_equals(mrow.tabIndex, 0, "no attribute");
mrow.setAttribute("tabindex", "invalid");
assert_equals(mrow.getAttribute("tabindex"), "invalid");
assert_equals(mrow.tabIndex, -1, "invalid");
assert_equals(mrow.tabIndex, 0, "invalid");
mrow.setAttribute("tabindex", "9999999999");
assert_equals(mrow.getAttribute("tabindex"), "9999999999");
assert_equals(mrow.tabIndex, -1, "too large integer");
assert_equals(mrow.tabIndex, 0, "too large integer");
}, "default and invalid values on mrow");
test(() => {
const mrowLink = document.getElementById('mrow-link');

View file

@ -30,3 +30,34 @@ g.width = mathfont.em + v2
g.italicCorrection = v2
f[nAryWhiteVerticalBarCodePoint].verticalVariants = "uni2AFF uni2AFF.display"
mathfont.save(f)
v1 = 7 * mathfont.em
v2 = 5 * mathfont.em
f = mathfont.create("largeop-displayoperatorminheight%d-2AFF-italiccorrection%d" % (v1, v2))
f.copyright = "Copyright (c) 2020 Igalia S.L."
f.math.DisplayOperatorMinHeight = v1
f.math.MinConnectorOverlap = 0
mathfont.createSquareGlyph(f, nAryWhiteVerticalBarCodePoint)
g = f.createChar(-1, "uni2AFF.bot")
mathfont.drawRectangleGlyph(g,
width = 2 * mathfont.em,
ascent = mathfont.em)
g = f.createChar(-1, "uni2AFF.ext")
mathfont.drawRectangleGlyph(g,
width = mathfont.em,
ascent = 2 * mathfont.em,
padding_left = mathfont.em)
g = f.createChar(-1, "uni2AFF.top")
mathfont.drawRectangleGlyph(g,
width = v2 + mathfont.em,
ascent = mathfont.em,
padding_left = mathfont.em)
f[nAryWhiteVerticalBarCodePoint].verticalVariants = "uni2AFF"
# Part: (glyphName, isExtender, startConnector, endConnector, fullAdvance)
f[nAryWhiteVerticalBarCodePoint].verticalComponents = \
(("uni2AFF.bot", False, 0, mathfont.em / 2, mathfont.em),
("uni2AFF.ext", True, mathfont.em / 2, mathfont.em / 2, 2 * mathfont.em),
("uni2AFF.top", False, mathfont.em / 2, 0, mathfont.em)
);
f[nAryWhiteVerticalBarCodePoint].verticalComponentItalicCorrection = v2
mathfont.save(f)

View file

@ -27,14 +27,14 @@ def create(aName):
mathFont[ord(" ")].verticalVariants = "space"
return mathFont
def drawRectangleGlyph(aGlyph, aWidth, aAscent, aDescent):
p = aGlyph.glyphPen()
p.moveTo(0, -aDescent)
p.lineTo(0, aAscent)
p.lineTo(aWidth, aAscent)
p.lineTo(aWidth, -aDescent)
def drawRectangleGlyph(glyph, width, ascent, descent = 0, padding_left = 0):
p = glyph.glyphPen()
p.moveTo(padding_left, -descent)
p.lineTo(padding_left, ascent)
p.lineTo(padding_left + width, ascent)
p.lineTo(padding_left + width, -descent)
p.closePath();
aGlyph.width = aWidth
glyph.width = padding_left + width
def createSquareGlyph(aFont, aCodePoint):
g = aFont.createChar(aCodePoint)

View file

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<meta charset="utf-8">
<title>Missing manifest file.</title>
<title>Origin policy manifests delivered with a 404 status code must be ignored</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/origin-policy-test-runner.js"></script>
@ -9,9 +9,9 @@
<script>
"use strict";
<!-- Manifests delivered with 404 status code must be ignored. -->
runTestsInSubframe({
hostname: "op99",
testJS: "resources/allow-unsafe-eval.mjs"
testJS: "../content-security/resources/allow-unsafe-eval.mjs",
expectedIds: []
});
</script>

View file

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<meta charset="utf-8">
<title>Valid "content_security/policies" member must be ignored</title>
<title>Origin policy manifests served with the wrong MIME type must be ignored</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/origin-policy-test-runner.js"></script>
@ -11,6 +11,7 @@
"use strict";
runTestsInSubframe({
hostname: "op100",
testJS: "resources/allow-unsafe-eval.mjs"
testJS: "../content-security/resources/allow-unsafe-eval.mjs",
expectedIds: []
});
</script>

View file

@ -1,52 +0,0 @@
'use strict';
const SmsProvider = (() => {
class MockSmsReceiver {
constructor() {
this.mojoReceiver_ = new blink.mojom.SmsReceiverReceiver(this);
this.interceptor_ =
new MojoInterfaceInterceptor(blink.mojom.SmsReceiver.$interfaceName);
this.interceptor_.oninterfacerequest = (e) => {
this.mojoReceiver_.$.bindHandle(e.handle);
}
this.interceptor_.start();
this.returnValues_ = {};
}
async receive() {
let call = this.returnValues_.receive ?
this.returnValues_.receive.shift() : null;
if (!call)
return;
return call();
}
async abort() {}
pushReturnValuesForTesting(callName, value) {
this.returnValues_[callName] = this.returnValues_[callName] || [];
this.returnValues_[callName].push(value);
return this;
}
}
const mockSmsReceiver = new MockSmsReceiver();
class SmsProviderChromium {
constructor() {
Object.freeze(this); // Make it immutable.
}
pushReturnValuesForTesting(callName, callback) {
mockSmsReceiver.pushReturnValuesForTesting(callName, callback);
}
}
return SmsProviderChromium;
})();

View file

@ -238,6 +238,8 @@ class MockRuntime {
// Currently active hit test subscriptons.
this.hitTestSubscriptions_ = new Map();
// Currently active transient hit test subscriptions.
this.transientHitTestSubscriptions_ = new Map();
// ID of the next subscription to be assigned.
this.next_hit_test_id_ = 1;
@ -687,6 +689,25 @@ class MockRuntime {
});
}
subscribeToHitTestForTransientInput(profileName, entityTypes, ray){
if (!this.supportedModes_.includes(device.mojom.XRSessionMode.kImmersiveAr)) {
// Reject outside of AR.
return Promise.resolve({
result : device.mojom.SubscribeToHitTestResult.FAILURE_GENERIC,
subscriptionId : 0
});
}
// Store the subscription information as-is:
const id = this.next_hit_test_id_++;
this.transientHitTestSubscriptions_.set(id, { profileName, entityTypes, ray });
return Promise.resolve({
result : device.mojom.SubscribeToHitTestResult.SUCCESS,
subscriptionId : id
});
}
// Utility function
requestRuntimeSession(sessionOptions) {
return this.runtimeSupportsSession(sessionOptions).then((result) => {
@ -769,11 +790,10 @@ class MockRuntime {
const mojo_from_native_origin = this._getMojoFromNativeOrigin(subscription.nativeOriginInformation);
if (!mojo_from_native_origin) continue;
const ray_origin = {x: subscription.ray.origin.x, y: subscription.ray.origin.y, z: subscription.ray.origin.z, w: 1};
const ray_direction = {x: subscription.ray.direction.x, y: subscription.ray.direction.y, z: subscription.ray.direction.z, w: 0};
const mojo_ray_origin = XRMathHelper.transform_by_matrix(mojo_from_native_origin, ray_origin);
const mojo_ray_direction = XRMathHelper.transform_by_matrix(mojo_from_native_origin, ray_direction);
const [mojo_ray_origin, mojo_ray_direction] = this._transformRayToMojoSpace(
subscription.ray,
mojo_from_native_origin
);
const results = this._hitTestWorld(mojo_ray_origin, mojo_ray_direction, subscription.entityTypes);
@ -783,6 +803,60 @@ class MockRuntime {
frameData.hitTestSubscriptionResults.results.push(result);
}
// Transient hit test:
const mojo_from_viewer = this._getMojoFromViewer();
for (const [id, subscription] of this.transientHitTestSubscriptions_) {
const result = new device.mojom.XRHitTestTransientInputSubscriptionResultData();
result.subscriptionId = id;
result.inputSourceIdToHitTestResults = new Map();
// Find all input sources that match the profile name:
const matching_input_sources = Array.from(this.input_sources_.values())
.filter(input_source => input_source.profiles_.includes(subscription.profileName));
for (const input_source of matching_input_sources) {
const mojo_from_native_origin = this._getMojoFromInputSource(mojo_from_viewer, input_source);
const [mojo_ray_origin, mojo_ray_direction] = this._transformRayToMojoSpace(
subscription.ray,
mojo_from_native_origin
);
const results = this._hitTestWorld(mojo_ray_origin, mojo_ray_direction, subscription.entityTypes);
result.inputSourceIdToHitTestResults.set(input_source.source_id_, results);
}
frameData.hitTestSubscriptionResults.transientInputResults.push(result);
}
}
// Returns 2-element array [origin, direction] of a ray in mojo space.
// |ray| is expressed relative to native origin.
_transformRayToMojoSpace(ray, mojo_from_native_origin) {
const ray_origin = {
x: ray.origin.x,
y: ray.origin.y,
z: ray.origin.z,
w: 1
};
const ray_direction = {
x: ray.direction.x,
y: ray.direction.y,
z: ray.direction.z,
w: 0
};
const mojo_ray_origin = XRMathHelper.transform_by_matrix(
mojo_from_native_origin,
ray_origin);
const mojo_ray_direction = XRMathHelper.transform_by_matrix(
mojo_from_native_origin,
ray_direction);
return [mojo_ray_origin, mojo_ray_direction];
}
// Hit tests the passed in ray (expressed as origin and direction) against the mocked world data.
@ -933,17 +1007,17 @@ class MockRuntime {
}
_getMojoFromInputSource(mojo_from_viewer, input_source) {
if(input_source.target_ray_mode_ === 'gaze') { // XRTargetRayMode::GAZING
if (input_source.target_ray_mode_ === 'gaze') { // XRTargetRayMode::GAZING
// If the pointer origin is gaze, then the result is
// just mojo_from_viewer.
return mojo_from_viewer;
} else if(input_source.target_ray_mode_ === 'tracked-pointer') { // XRTargetRayMode:::POINTING
} else if (input_source.target_ray_mode_ === 'tracked-pointer') { // XRTargetRayMode:::POINTING
// If the pointer origin is tracked-pointer, the result is just
// mojo_from_input*input_from_pointer.
return XRMathHelper.mul4x4(
input_source.mojo_from_input_.matrix,
input_source.input_from_pointer_.matrix);
} else if(input_source.target_ray_mode_ === 'screen') { // XRTargetRayMode::TAPPING
} else if (input_source.target_ray_mode_ === 'screen') { // XRTargetRayMode::TAPPING
// If the pointer origin is screen, the input_from_pointer is
// equivalent to viewer_from_pointer and the result is
// mojo_from_viewer*viewer_from_pointer.
@ -951,20 +1025,11 @@ class MockRuntime {
mojo_from_viewer,
input_source.input_from_pointer_.matrix);
} else {
return null
return null;
}
}
_getMojoFromNativeOrigin(nativeOriginInformation) {
const identity = function() {
return [
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
];
};
_getMojoFromViewer() {
const transform = {
position: [
this.pose_.position.x,
@ -977,7 +1042,20 @@ class MockRuntime {
this.pose_.orientation.w],
};
const mojo_from_viewer = getMatrixFromTransform(transform)
return getMatrixFromTransform(transform);
}
_getMojoFromNativeOrigin(nativeOriginInformation) {
const identity = function() {
return [
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
];
};
const mojo_from_viewer = this._getMojoFromViewer();
if (nativeOriginInformation.$tag == device.mojom.XRNativeOriginInformation.Tags.inputSourceId) {
if (!this.input_sources_.has(nativeOriginInformation.inputSourceId)) {
@ -1026,7 +1104,7 @@ class MockXRInputSource {
this.handedness_ = fakeInputSourceInit.handedness;
this.target_ray_mode_ = fakeInputSourceInit.targetRayMode;
if(fakeInputSourceInit.pointerOrigin == null) {
if (fakeInputSourceInit.pointerOrigin == null) {
throw new TypeError("FakeXRInputSourceInit.pointerOrigin is required.");
}

View file

@ -2746,10 +2746,19 @@ IdlInterface.prototype.test_object = function(desc)
exception = e;
}
var expected_typeof =
this.members.some(function(member) { return member.legacycaller; })
? "function"
: "object";
var expected_typeof;
if (this.name == "HTMLAllCollection")
{
// Willful violation of JS. :(
expected_typeof = "undefined";
} else if (this.members.some(function(member) { return member.legacycaller; }))
{
expected_typeof = "function";
}
else
{
expected_typeof = "object";
}
this.test_primary_interface_of(desc, obj, exception, expected_typeof);
@ -2911,7 +2920,15 @@ IdlInterface.prototype.test_interface_of = function(desc, obj, exception, expect
}
if (!thrown)
{
this.array.assert_type_is(property, member.idlType);
if (this.name == "Document" && member.name == "all")
{
// Willful violation of JS :(
assert_equals(typeof property, "undefined");
}
else
{
this.array.assert_type_is(property, member.idlType);
}
}
}
if (member.type == "operation")

View file

@ -1483,7 +1483,9 @@ policies and contribution forms [3].
function _assert_inherits(name) {
return function (object, property_name, description)
{
assert(typeof object === "object" || typeof object === "function",
assert(typeof object === "object" || typeof object === "function" ||
// Willful violation of JS. :(
String(object) === "[object HTMLAllCollection]",
name, description,
"provided value is not an object");

View file

@ -1,3 +0,0 @@
# SMS Receiver API
This directory contains tests for the SMS Receiver API. For more details, refer to [this README file](https://cs.chromium.org/chromium/src/content/browser/sms/README.md).

View file

@ -1,24 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>sms on DOMWindow of detached iframe</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src="/common/get-host-info.sub.js"></script>
<iframe id="iframe"></iframe>
<script>
'use strict';
promise_test(async t => {
const iframe = document.getElementById('iframe');
const smsReceiver = iframe.contentWindow.navigator.sms;
iframe.parentNode.removeChild(iframe);
try {
await smsReceiver.receive();
assert_unreached('Expected NotSupportedError to be thrown.');
} catch (error) {
assert_equals(error.name, 'NotSupportedError');
}
}, 'Return error when frame is inaccessible');
</script>

View file

@ -1,30 +0,0 @@
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// https://github.com/samuelgoto/sms-receiver
'use strict';
promise_test(async (t) => {
const srcs = ['./sms_receiver.idl',
'/interfaces/dom.idl',
'/interfaces/html.idl'];
const [sms, dom, html] = await Promise.all(
srcs.map(i => fetch(i).then(r => r.text()))
);
const idl_array = new IdlArray();
idl_array.add_idls(sms);
idl_array.add_dependency_idls(dom);
idl_array.add_dependency_idls(html);
idl_array.add_objects({
SmsReceiver: ['navigator.sms'],
});
idl_array.add_objects({ Navigator: ['navigator'] })
idl_array.test();
}, 'Test IDL implementation of the SMS Receiver API');

View file

@ -1,134 +0,0 @@
<!DOCTYPE html>
<link rel="help" href="https://github.com/samuelgoto/sms-receiver">
<title>Tests the SMS Receiver API</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!--
sms_provider.js is a testing framework that enables engines to test the sms
receiver API by intercepting the connection between the browser and the
underlying operating system and mock its behavior.
Usage:
1) Include <script src="./resources/helper.js"></script> in your test.
2) Set expectations
await expect(receive).andReturn(() => {
// mock behavior
})
3) Call navigator.sms.receive()
4) Verify results
The mocking API is browser agnostic and is designed such that other engines
could implement it too.
Here are the symbols that are exposed to tests that need to be implemented
per engine:
- function receive(): the main/only function that can be mocked.
- function expect(): the main/only function that enables us to mock it.
- enum State {kSuccess, kTimeout}: allows you to mock success/failures.
-->
<script src="./resources/helper.js"></script>
<script>
'use strict';
promise_test(async t => {
await expect(receive).andReturn(() => {
return Promise.resolve({
status: Status.kSuccess,
message: "hello",
});
});
let sms = await navigator.sms.receive();
assert_equals(sms.content, "hello");
}, 'Basic usage');
promise_test(async t => {
await expect(receive).andReturn(() => {
return Promise.resolve({
status: Status.kSuccess,
message: "hello1",
});
});
await expect(receive).andReturn(() => {
return Promise.resolve({
status: Status.kSuccess,
message: "hello2",
});
});
let sms1 = navigator.sms.receive();
let sms2 = navigator.sms.receive();
let msg2 = await sms2;
let msg1 = await sms1;
assert_equals(msg1.content, "hello1");
assert_equals(msg2.content, "hello2");
}, 'Handle multiple requests in different order.');
promise_test(async t => {
await expect(receive).andReturn(() => {
return Promise.resolve({
status: Status.kCancelled,
});
});
await expect(receive).andReturn(() => {
return Promise.resolve({
status: Status.kSuccess,
message: "success",
});
});
let cancelled_sms = navigator.sms.receive();
let successful_sms = navigator.sms.receive();
let successful_msg = await successful_sms;
assert_equals(successful_msg.content, "success");
try {
await cancelled_sms;
assert_unreached('Expected AbortError to be thrown.');
} catch (error) {
assert_equals(error.name, "AbortError");
assert_equals(error.message, "SMSReceiver was aborted.");
}
}, 'Handle multiple requests with success and error.');
promise_test(async t => {
await expect(receive).andReturn(() => {
return Promise.resolve({
status: Status.kCancelled,
});
});
try {
await navigator.sms.receive();
assert_unreached('Expected CancelledError to be thrown.');
} catch (error) {
assert_equals(error.name, "AbortError");
assert_equals(error.message, "SMSReceiver was aborted.");
}
}, 'Deal with cancelled requests');
promise_test(async t => {
const controller = new AbortController();
const signal = controller.signal;
controller.abort();
await promise_rejects_dom(t, 'AbortError', navigator.sms.receive({signal}));
}, 'Should abort request');
promise_test(async t => {
const controller = new AbortController();
const signal = controller.signal;
let error = navigator.sms.receive({signal});
controller.abort();
await promise_rejects_dom(t, 'AbortError', error);
}, 'Should abort request even while request is in progress.');
</script>

View file

@ -1,66 +0,0 @@
'use strict';
// These tests rely on the User Agent providing an implementation of
// the sms retriever.
//
// In Chromium-based browsers this implementation is provided by a polyfill
// in order to reduce the amount of test-only code shipped to users. To enable
// these tests the browser must be run with these options:
//
// --enable-blink-features=MojoJS,MojoJSTest
const loadChromiumResources = async () => {
if (!window.MojoInterfaceInterceptor) {
// Do nothing on non-Chromium-based browsers or when the Mojo bindings are
// not present in the global namespace.
return;
}
const resources = [
'/gen/layout_test_data/mojo/public/js/mojo_bindings_lite.js',
'/gen/mojo/public/mojom/base/time.mojom-lite.js',
'/gen/third_party/blink/public/mojom/sms/sms_receiver.mojom-lite.js',
'/resources/chromium/sms_mock.js',
];
await Promise.all(resources.map(path => {
const script = document.createElement('script');
script.src = path;
script.async = false;
const promise = new Promise((resolve, reject) => {
script.onload = resolve;
script.onerror = reject;
});
document.head.appendChild(script);
return promise;
}));
Status.kSuccess = blink.mojom.SmsStatus.kSuccess;
Status.kTimeout = blink.mojom.SmsStatus.kTimeout;
Status.kCancelled = blink.mojom.SmsStatus.kCancelled;
};
const Status = {};
async function create_sms_provider() {
if (typeof SmsProvider === 'undefined') {
await loadChromiumResources();
}
if (typeof SmsProvider == 'undefined') {
throw new Error('Mojo testing interface is not available.');
}
return new SmsProvider();
}
function receive() {
throw new Error("expected to be overriden by tests");
}
function expect(call) {
return {
async andReturn(callback) {
const mock = await create_sms_provider();
mock.pushReturnValuesForTesting(call.name, callback);
}
}
}

View file

@ -1,25 +0,0 @@
<script src="./helper.js"></script>
<script>
'use strict';
// Intercept successful calls and return mocked value.
(async function() {
await expect(receive).andReturn(() => {
return Promise.resolve({
status: Status.kSuccess,
message: "hello",
});
});
}());
window.onload = function() {
navigator.sms.receive()
.then(sms => {
window.parent.postMessage({result: "Pass", sms: sms.content}, '*');
})
.catch(error => {
window.parent.postMessage({result: "Fail", errorType: error.name}, '*');
});
}
</script>

View file

@ -1,41 +0,0 @@
<!DOCTYPE html>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src="/common/get-host-info.sub.js"></script>
<body>
<script>
'use strict';
const host = get_host_info();
const remoteBaseURL = host.HTTPS_REMOTE_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
const localBaseURL = host.HTTPS_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
promise_test(async t => {
const messageWatcher = new EventWatcher(t, window, "message");
var iframe = document.createElement("iframe");
iframe.src = localBaseURL + "resources/iframe.html";
document.body.appendChild(iframe);
const message = await messageWatcher.wait_for("message");
assert_equals(message.data.result, "Pass");
assert_equals(message.data.sms, "hello");
}, "Test SMSReceiver API enabled in same origin iframes");
promise_test(async t => {
const messageWatcher = new EventWatcher(t, window, "message");
var iframe = document.createElement("iframe");
iframe.src = remoteBaseURL + "resources/iframe.html"
document.body.appendChild(iframe);
const message = await messageWatcher.wait_for("message");
assert_equals(message.data.result, "Fail");
assert_equals(message.data.errorType, "NotAllowedError");
}, "Test SMSReceiver API disabled in cross origin iframes");
</script>
</body>

View file

@ -1,24 +0,0 @@
[SecureContext]
interface mixin NavigatorSMS {
readonly attribute SMSReceiver sms;
};
Navigator includes NavigatorSMS;
[
SecureContext,
Exposed=(Window,DedicatedWorker)]
interface SMS {
readonly attribute DOMString content;
};
dictionary SMSReceiverOptions {
AbortSignal signal;
};
[
SecureContext,
Exposed=Window
] interface SMSReceiver {
Promise<SMS> receive(optional SMSReceiverOptions options);
};

View file

@ -205,7 +205,7 @@ class TestharnessTest(URLManifestItem):
if self.jsshell:
rv[-1]["jsshell"] = True
if self.script_metadata:
rv[-1]["script_metadata"] = self.script_metadata
rv[-1]["script_metadata"] = [(k.decode('utf8'), v.decode('utf8')) for (k,v) in self.script_metadata]
return rv

View file

@ -391,7 +391,7 @@ def write(manifest, manifest_path):
dir_name = os.path.dirname(manifest_path)
if not os.path.exists(dir_name):
os.makedirs(dir_name)
with open(manifest_path, "wb") as f:
with open(manifest_path, "w") as f:
# Use ',' instead of the default ', ' separator to prevent trailing
# spaces: https://docs.python.org/2/library/json.html#json.dump
json.dump(manifest.to_json(caller_owns_obj=True), f,

View file

@ -2,7 +2,7 @@ import hashlib
import re
import os
from collections import deque
from six import binary_type, PY3, iteritems
from six import binary_type, iteritems, text_type
from six.moves.urllib.parse import urljoin
from fnmatch import fnmatch
@ -308,11 +308,7 @@ class SourceFile(object):
content = f.read()
data = b"".join((b"blob ", b"%d" % len(content), b"\0", content))
hash_str = hashlib.sha1(data).hexdigest() # type: str
if PY3:
self._hash = hash_str.encode("ascii")
else:
self._hash = hash_str
self._hash = text_type(hashlib.sha1(data).hexdigest())
return self._hash

View file

@ -832,4 +832,4 @@ def test_reftest_fuzzy_multi(fuzzy, expected):
def test_hash():
s = SourceFile("/", "foo", "/", contents=b"Hello, World!")
assert b"b45ef6fec89518d314f546fd6c3025367b721684" == s.hash
assert "b45ef6fec89518d314f546fd6c3025367b721684" == s.hash

View file

@ -256,6 +256,18 @@ class TypeData(TypeDataType):
"""
json_rv = self._json_data.copy()
def safe_sorter(element):
# type: (Tuple[str,str]) -> Tuple[str,str]
""" key function to sort lists with None values.
Python3 is more strict typewise. Comparing None and str for example is valid
in python2 but throws an exception in python3.
"""
if element and not element[0]:
return ("", element[1])
else:
return element
stack = [(self._data, json_rv, tuple())] # type: List[Tuple[Dict[Text, Any], Dict[Text, Any], Tuple[Text, ...]]]
while stack:
data_node, json_node, par_full_key = stack.pop()
@ -263,7 +275,8 @@ class TypeData(TypeDataType):
full_key = par_full_key + (k,)
if isinstance(v, set):
assert k not in json_node
json_node[k] = [self._hashes.get(full_key)] + [t for t in sorted(test.to_json() for test in v)]
json_node[k] = [self._hashes.get(
full_key)] + [t for t in sorted((test.to_json() for test in v), key=safe_sorter)]
else:
json_node[k] = json_node.get(k, {}).copy()
stack.append((v, json_node[k], full_key))

View file

@ -63,7 +63,7 @@ class GitHasher(object):
assert self.git is not None
# note that git runs the command with tests_root as the cwd, which may
# not be the root of the git repo (e.g., within a browser repo)
cmd = [b"diff-index", b"--relative", b"--no-renames", b"--name-only", b"-z", b"HEAD"]
cmd = ["diff-index", "--relative", "--no-renames", "--name-only", "-z", "HEAD"]
data = self.git(*cmd)
return set(data.split("\0"))

View file

@ -1 +1,2 @@
requests==2.23.0
mozinfo==1.2.1 # https://bugzilla.mozilla.org/show_bug.cgi?id=1621226

View file

@ -1,5 +1,6 @@
import errno
import os
import platform
import shutil
import socket
import subprocess
@ -43,8 +44,9 @@ def get_persistent_manifest_path():
@pytest.fixture(scope="module", autouse=True)
def init_manifest():
if sys.version_info >= (3,):
pytest.xfail(reason="broken on Py3")
# See https://github.com/pypa/virtualenv/issues/1710
if sys.version_info[0] >= 3 and platform.system() == "Windows":
pytest.xfail(reason="virtualenv activation fails in Windows for python3")
with pytest.raises(SystemExit) as excinfo:
wpt.main(argv=["manifest", "--no-download",
"--path", get_persistent_manifest_path()])

View file

@ -1,5 +1,5 @@
html5lib==1.0.1
mozinfo==1.1.0
mozinfo==1.2.1 # https://bugzilla.mozilla.org/show_bug.cgi?id=1621226
mozlog==6.0
mozdebug==0.2
# Pillow 7 requires Python 3

View file

@ -1,5 +1,3 @@
import sys
from os.path import join, dirname
import mock
@ -20,11 +18,7 @@ def test_load_active_product(product):
# test passes if it doesn't throw
@all_products("product", marks={
"firefox": pytest.mark.xfail(sys.platform.startswith('linux') and
sys.version_info >= (3, 8),
reason="mozinfo doesn't support Linux 3.8+")
})
@all_products("product")
def test_load_all_products(product):
"""test every product either loads or throws ImportError"""
try:

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'"/>
</head>
<body>
<script>
// This this a regresion test that verifies that in-tree script element in
// an xhtml document still works correctly. The test itself doesn't do much.
test(t => {
t.done();
}, "Test whether a script element still executes for XHTML documents.");
</script>
</body>
</html>

View file

@ -0,0 +1,113 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/webxr_util.js"></script>
<script src="../resources/webxr_test_constants.js"></script>
<script src="../resources/webxr_test_constants_fake_world.js"></script>
<script src="../resources/webxr_test_asserts.js"></script>
<style type="text/css">
div {
padding: 10px;
min-width: 10px;
min-height: 10px;
}
iframe {
border: 0;
width: 20px;
height: 20px;
}
</style>
<div id="div_overlay">
<div id="inner_b">
</div>
<!-- This SVG iframe is treated as cross-origin content. -->
<iframe id="iframe" src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><rect height="20" width="20" fill="red" fill-opacity="0.3"/></svg>'>
</iframe>
<canvas>
</canvas>
</div>
<script>
const fakeDeviceInitParams = {
supportedModes: ["immersive-ar"],
views: VALID_VIEWS,
viewerOrigin: IDENTITY_TRANSFORM,
supportedFeatures: ALL_FEATURES,
};
const hitTestOptionsInit = {
profile: "generic-touchscreen",
offsetRay: new XRRay(),
};
const SCREEN_POINTER_TRANSFORM = {
position: [0, 0, 0], // middle of the screen
orientation: [0, 0, 0, 1] // forward-facing
};
const screen_controller_init = {
handedness: "none",
targetRayMode: "screen",
pointerOrigin: SCREEN_POINTER_TRANSFORM, // aka input_from_pointer
profiles: ["generic-touchscreen",]
};
const testCrossOriginContent = function(overlayElement, session, fakeDeviceController, t) {
const iframe = document.getElementById('iframe');
const inner_b = document.getElementById('inner_b');
const input_source =
fakeDeviceController.simulateInputSourceConnection(screen_controller_init);
return session.requestReferenceSpace('viewer').then(function(viewerSpace) {
return session.requestHitTestSourceForTransientInput(hitTestOptionsInit)
.then((hitTestSource) => {
// Press the primary input button and then release it a short time later.
session.requestAnimationFrame((time, xrFrame) => {
input_source.setOverlayPointerPosition(iframe.offsetLeft + 1,
iframe.offsetTop + 1);
input_source.startSelection();
session.requestAnimationFrame((time, xrFrame) => {
input_source.endSelection();
// There should be no results for transient input for cross origin content:
const results = xrFrame.getHitTestResultsForTransientInput(hitTestSource);
t.step(() => {
assert_true(results.length === 0, "Hit test results should be suppressed for cross-origin content");
});
session.requestAnimationFrame((time, xrFrame) => {
// Need to process one more frame to allow select to propagate
session.requestAnimationFrame((time, xrFrame) => {
input_source.setOverlayPointerPosition(inner_b.offsetLeft + 1,
inner_b.offsetTop + 1);
input_source.startSelection();
session.requestAnimationFrame((time, xrFrame) => {
input_source.endSelection();
const results = xrFrame.getHitTestResultsForTransientInput(hitTestSource);
t.step(() => {
assert_true(results.length === 1, "Hit test results should not be for cross-origin content");
});
});
});
});
});
});
});
});
};
xr_session_promise_test(
"Ensures DOM Overlay interactions on cross origin iframe do not cause hit test results to come up",
testCrossOriginContent.bind(this, document.getElementById('div_overlay')),
fakeDeviceInitParams, 'immersive-ar', {
requiredFeatures: ['dom-overlay', 'hit-test'],
domOverlay: { root: document.getElementById('div_overlay') }
});
</script>

View file

@ -15,9 +15,12 @@ const fakeDeviceInitParams = {
supportedFeatures: ALL_FEATURES,
};
// Creates a test method that leverages regular hit test API (as opposed to hit
// test for transient input).
// |shouldSucceed| - true if the hit test request is expected to succeed, false otherwise
// |endSession| - true if the test case should call session.end() prior to requesting hit test
const testFunctionGenerator = function(shouldSucceed, endSession) {
// |expectedError| - expected error name that should be returned in case shouldSucceed is false
const testFunctionGeneratorRegular = function(shouldSucceed, endSession, expectedError) {
const testFunction = function(session, fakeDeviceController, t) {
session.requestReferenceSpace('viewer').then((viewerRefSpace) => {
@ -39,6 +42,8 @@ const testFunctionGenerator = function(shouldSucceed, endSession) {
t.step(() => {
assert_false(shouldSucceed,
"`requestHitTestSource` failed when it was expected to succeed, error: " + error);
assert_equals(error.name, expectedError,
"`requestHitTestSource` failed with unexpected error name");
});
});
});
@ -48,17 +53,17 @@ const testFunctionGenerator = function(shouldSucceed, endSession) {
};
xr_session_promise_test("Hit test subscription succeeds if the feature was requested",
testFunctionGenerator(/*shouldSucceed=*/true, /*endSession=*/false),
testFunctionGeneratorRegular(/*shouldSucceed=*/true, /*endSession=*/false),
fakeDeviceInitParams,
'immersive-ar', { 'requiredFeatures': ['hit-test'] });
xr_session_promise_test("Hit test subscription fails if the feature was not requested",
testFunctionGenerator(/*shouldSucceed=*/false, /*endSession=*/false),
testFunctionGeneratorRegular(/*shouldSucceed=*/false, /*endSession=*/false, "NotSupportedError"),
fakeDeviceInitParams,
'immersive-ar', {});
xr_session_promise_test("Hit test subscription fails if the feature was requested but the session already ended",
testFunctionGenerator(/*shouldSucceed=*/false, /*endSession=*/true),
testFunctionGeneratorRegular(/*shouldSucceed=*/false, /*endSession=*/true, "InvalidStateError"),
fakeDeviceInitParams,
'immersive-ar', { 'requiredFeatures': ['hit-test'] });

View file

@ -0,0 +1,67 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/webxr_util.js"></script>
<script src="../resources/webxr_test_asserts.js"></script>
<script src="../resources/webxr_test_constants.js"></script>
<script src="../resources/webxr_test_constants_fake_world.js"></script>
<canvas />
<script>
const fakeDeviceInitParams = {
supportedModes: ["immersive-ar"],
views: VALID_VIEWS,
supportedFeatures: ALL_FEATURES,
};
// Creates a test method that leverages hit test API for transient input.
// |shouldSucceed| - true if the hit test request is expected to succeed, false otherwise
// |endSession| - true if the test case should call session.end() prior to requesting hit test
// |expectedError| - expected error name that should be returned in case shouldSucceed is false
const testFunctionGeneratorTransient = function(shouldSucceed, endSession, expectedError) {
const testFunction = function(session, fakeDeviceController, t) {
const hitTestOptionsInit = {
profile: "generic-touchscreen",
offsetRay: new XRRay(),
};
if(endSession) {
session.end();
}
return session.requestHitTestSourceForTransientInput(hitTestOptionsInit)
.then((hitTestSource) => {
t.step(() => {
assert_true(shouldSucceed,
"`requestHitTestSourceForTransientInput` succeeded when it was expected to fail");
});
}).catch((error) => {
t.step(() => {
assert_false(shouldSucceed,
"`requestHitTestSourceForTransientInput` failed when it was expected to succeed, error: " + error);
assert_equals(error.name, expectedError,
"`requestHitTestSourceForTransientInput` failed with unexpected error name");
});
});
};
return testFunction;
};
xr_session_promise_test("Transient hit test subscription succeeds if the feature was requested",
testFunctionGeneratorTransient(/*shouldSucceed=*/true, /*endSession=*/false),
fakeDeviceInitParams,
'immersive-ar', { 'requiredFeatures': ['hit-test'] });
xr_session_promise_test("Transient hit test subscription fails if the feature was not requested",
testFunctionGeneratorTransient(/*shouldSucceed=*/false, /*endSession=*/false, "NotSupportedError"),
fakeDeviceInitParams,
'immersive-ar', {});
xr_session_promise_test("Transient test subscription fails if the feature was requested but the session already ended",
testFunctionGeneratorTransient(/*shouldSucceed=*/false, /*endSession=*/true, "InvalidStateError"),
fakeDeviceInitParams,
'immersive-ar', { 'requiredFeatures': ['hit-test'] });
</script>

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