mirror of
https://github.com/servo/servo.git
synced 2025-06-25 17:44:33 +01:00
Update web-platform-tests to revision 2f346208c2a115a601b580e7869fe112b97c4246
This commit is contained in:
parent
2a594821ba
commit
add3067672
78 changed files with 2101 additions and 635 deletions
|
@ -141128,7 +141128,11 @@
|
|||
"css/css-pseudo/marker-content-010.html",
|
||||
[
|
||||
[
|
||||
"/css/css-pseudo/marker-content-010-ref.html",
|
||||
"/css/css-pseudo/marker-content-010-ref-001.html",
|
||||
"=="
|
||||
],
|
||||
[
|
||||
"/css/css-pseudo/marker-content-010-ref-002.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
|
@ -204377,6 +204381,18 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"forced-colors-mode/forced-colors-mode-25.html": [
|
||||
[
|
||||
"forced-colors-mode/forced-colors-mode-25.html",
|
||||
[
|
||||
[
|
||||
"/forced-colors-mode/forced-colors-mode-25-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"html/browsers/sandboxing/sandbox-parse-noscript.html": [
|
||||
[
|
||||
"html/browsers/sandboxing/sandbox-parse-noscript.html",
|
||||
|
@ -257768,7 +257784,10 @@
|
|||
"css/css-pseudo/marker-content-009-ref.html": [
|
||||
[]
|
||||
],
|
||||
"css/css-pseudo/marker-content-010-ref.html": [
|
||||
"css/css-pseudo/marker-content-010-ref-001.html": [
|
||||
[]
|
||||
],
|
||||
"css/css-pseudo/marker-content-010-ref-002.html": [
|
||||
[]
|
||||
],
|
||||
"css/css-pseudo/marker-content-011-ref.html": [
|
||||
|
@ -272642,6 +272661,9 @@
|
|||
"forced-colors-mode/forced-colors-mode-23-ref.html": [
|
||||
[]
|
||||
],
|
||||
"forced-colors-mode/forced-colors-mode-25-ref.html": [
|
||||
[]
|
||||
],
|
||||
"forced-colors-mode/resources/float-image.jpg": [
|
||||
[]
|
||||
],
|
||||
|
@ -294101,6 +294123,12 @@
|
|||
"webgl/common.js": [
|
||||
[]
|
||||
],
|
||||
"webgpu/LICENSE.txt": [
|
||||
[]
|
||||
],
|
||||
"webgpu/constants.js": [
|
||||
[]
|
||||
],
|
||||
"webgpu/framework/allowed_characters.js": [
|
||||
[]
|
||||
],
|
||||
|
@ -294110,6 +294138,9 @@
|
|||
"webgpu/framework/fixture.js": [
|
||||
[]
|
||||
],
|
||||
"webgpu/framework/generate_minimal_query_list.js": [
|
||||
[]
|
||||
],
|
||||
"webgpu/framework/gpu/implementation.js": [
|
||||
[]
|
||||
],
|
||||
|
@ -294185,6 +294216,9 @@
|
|||
"webgpu/runtime/helper/options.js": [
|
||||
[]
|
||||
],
|
||||
"webgpu/runtime/helper/test_worker-worker.js": [
|
||||
[]
|
||||
],
|
||||
"webgpu/runtime/helper/test_worker.js": [
|
||||
[]
|
||||
],
|
||||
|
@ -317230,7 +317264,9 @@
|
|||
"content-security-policy/embedded-enforcement/required_csp-header.html": [
|
||||
[
|
||||
"content-security-policy/embedded-enforcement/required_csp-header.html",
|
||||
{}
|
||||
{
|
||||
"timeout": "long"
|
||||
}
|
||||
]
|
||||
],
|
||||
"content-security-policy/embedded-enforcement/subsumption_algorithm-general.html": [
|
||||
|
@ -320501,6 +320537,46 @@
|
|||
}
|
||||
]
|
||||
],
|
||||
"cookie-store/cookieStore_subscribe_arguments.tentative.https.any.js": [
|
||||
[
|
||||
"cookie-store/cookieStore_subscribe_arguments.tentative.https.any.html",
|
||||
{
|
||||
"script_metadata": [
|
||||
[
|
||||
"title",
|
||||
"Cookie Store API: cookieStore.subscribe() arguments"
|
||||
],
|
||||
[
|
||||
"global",
|
||||
"!default,serviceworker,window"
|
||||
],
|
||||
[
|
||||
"script",
|
||||
"/service-workers/service-worker/resources/test-helpers.sub.js"
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
[
|
||||
"cookie-store/cookieStore_subscribe_arguments.tentative.https.any.serviceworker.html",
|
||||
{
|
||||
"script_metadata": [
|
||||
[
|
||||
"title",
|
||||
"Cookie Store API: cookieStore.subscribe() arguments"
|
||||
],
|
||||
[
|
||||
"global",
|
||||
"!default,serviceworker,window"
|
||||
],
|
||||
[
|
||||
"script",
|
||||
"/service-workers/service-worker/resources/test-helpers.sub.js"
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"cookie-store/cookieStore_subscriptions_empty.tentative.https.window.js": [
|
||||
[
|
||||
"cookie-store/cookieStore_subscriptions_empty.tentative.https.window.html",
|
||||
|
@ -325983,6 +326059,18 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-grid/alignment/grid-align-content-vertical-lr.html": [
|
||||
[
|
||||
"css/css-grid/alignment/grid-align-content-vertical-lr.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-grid/alignment/grid-align-content-vertical-rl.html": [
|
||||
[
|
||||
"css/css-grid/alignment/grid-align-content-vertical-rl.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-grid/alignment/grid-align-content.html": [
|
||||
[
|
||||
"css/css-grid/alignment/grid-align-content.html",
|
||||
|
@ -329739,6 +329827,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-position/position-absolute-table-001.html": [
|
||||
[
|
||||
"css/css-position/position-absolute-table-001.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-position/position-fixed-at-bottom-right-on-viewport.html": [
|
||||
[
|
||||
"css/css-position/position-fixed-at-bottom-right-on-viewport.html",
|
||||
|
@ -432979,141 +433073,135 @@
|
|||
],
|
||||
"webgpu/cts.html": [
|
||||
[
|
||||
"webgpu/cts.html?q=cts:buffers/create_mapped:",
|
||||
"webgpu/cts.html?q=cts:buffers/create_mapped",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:buffers/map:",
|
||||
"webgpu/cts.html?q=cts:buffers/map",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:buffers/map_detach:",
|
||||
"webgpu/cts.html?q=cts:buffers/map_detach",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:buffers/map_oom:",
|
||||
"webgpu/cts.html?q=cts:buffers/map_oom",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:canvas/context_creation:",
|
||||
"webgpu/cts.html?q=cts:canvas/context_creation",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:command_buffer/basic:",
|
||||
"webgpu/cts.html?q=cts:command_buffer/basic",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:command_buffer/compute/basic:",
|
||||
"webgpu/cts.html?q=cts:command_buffer/compute/basic",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:command_buffer/copies:",
|
||||
"webgpu/cts.html?q=cts:command_buffer/copies",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:command_buffer/render/basic:",
|
||||
"webgpu/cts.html?q=cts:command_buffer/render/basic",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:command_buffer/render/rendering:",
|
||||
"webgpu/cts.html?q=cts:command_buffer/render/rendering",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:command_buffer/render/storeop:",
|
||||
"webgpu/cts.html?q=cts:command_buffer/render/storeop",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:copyImageBitmapToTexture:",
|
||||
"webgpu/cts.html?q=cts:copyImageBitmapToTexture",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:examples:",
|
||||
"webgpu/cts.html?q=cts:examples",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:fences:",
|
||||
"webgpu/cts.html?q=cts:fences",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:resource_init/sampled_texture_clear:",
|
||||
"webgpu/cts.html?q=cts:resource_init/sampled_texture_clear",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/createBindGroup:",
|
||||
"webgpu/cts.html?q=cts:validation/createBindGroup",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/createBindGroupLayout:",
|
||||
"webgpu/cts.html?q=cts:validation/createBindGroupLayout",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/createPipelineLayout:",
|
||||
"webgpu/cts.html?q=cts:validation/createPipelineLayout",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/createRenderPipeline:",
|
||||
"webgpu/cts.html?q=cts:validation/createRenderPipeline",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/createTexture:",
|
||||
"webgpu/cts.html?q=cts:validation/createTexture",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/createView:",
|
||||
"webgpu/cts.html?q=cts:validation/createView",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/error_scope:",
|
||||
"webgpu/cts.html?q=cts:validation/error_scope",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/fences:",
|
||||
"webgpu/cts.html?q=cts:validation/fences",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/queue_submit:",
|
||||
"webgpu/cts.html?q=cts:validation/queue_submit",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/render_pass:",
|
||||
"webgpu/cts.html?q=cts:validation/render_pass",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/render_pass_descriptor:",
|
||||
"webgpu/cts.html?q=cts:validation/render_pass_descriptor",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/setBindGroup:",
|
||||
"webgpu/cts.html?q=cts:validation/setBindGroup",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/setBlendColor:",
|
||||
"webgpu/cts.html?q=cts:validation/setBlendColor",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/setScissorRect:",
|
||||
"webgpu/cts.html?q=cts:validation/setScissorRect",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/setStencilReference:",
|
||||
"webgpu/cts.html?q=cts:validation/setStencilReference",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/setVertexBuffer:",
|
||||
"webgpu/cts.html?q=cts:validation/setVertexBuffer",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/setViewport:",
|
||||
"webgpu/cts.html?q=cts:validation/setViewport",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"webgpu/cts.html?q=cts:validation/vertex_state:",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"webgpu/runtime/helper/test_worker.worker.js": [
|
||||
[
|
||||
"webgpu/runtime/helper/test_worker.worker.html",
|
||||
"webgpu/cts.html?q=cts:validation/vertex_state",
|
||||
{}
|
||||
]
|
||||
],
|
||||
|
@ -439960,6 +440048,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"webxr/xrFrame_getViewerPose_getPose.https.html": [
|
||||
[
|
||||
"webxr/xrFrame_getViewerPose_getPose.https.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"webxr/xrFrame_lifetime.https.html": [
|
||||
[
|
||||
"webxr/xrFrame_lifetime.https.html",
|
||||
|
@ -470788,7 +470882,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"IndexedDB/idb-explicit-commit.any.js": [
|
||||
"2acd904ea6ab5f887cfda7e7dece0ed506c27ae4",
|
||||
"ec72e1ae9583eb227652a193ff589212fd10cd82",
|
||||
"testharness"
|
||||
],
|
||||
"IndexedDB/idb_binary_key_conversion.htm": [
|
||||
|
@ -495548,7 +495642,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"content-security-policy/embedded-enforcement/required_csp-header.html": [
|
||||
"510c25b0b0045546b6e0c0b2981d8b78555c8ef5",
|
||||
"fbaa42d56ee4da3ee45fd8b25dadadf6db909d23",
|
||||
"testharness"
|
||||
],
|
||||
"content-security-policy/embedded-enforcement/subsumption_algorithm-general.html": [
|
||||
|
@ -496632,7 +496726,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"content-security-policy/object-src/object-src-url-allowed.html": [
|
||||
"7ab85bd6bcea33969288b948042914ebdd4e4175",
|
||||
"89d431c0b50d452c3883bf73a760f3586ef62e13",
|
||||
"testharness"
|
||||
],
|
||||
"content-security-policy/object-src/object-src-url-allowed.html.sub.headers": [
|
||||
|
@ -496644,7 +496738,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"content-security-policy/object-src/object-src-url-embed-allowed.html": [
|
||||
"edb01b3839f2d8a165de572bb43d88d8371bb77c",
|
||||
"cc64dff27a7db281bfdeec1e21eea6700f4dfb29",
|
||||
"testharness"
|
||||
],
|
||||
"content-security-policy/object-src/object-src-url-embed-allowed.html.sub.headers": [
|
||||
|
@ -498292,7 +498386,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"cookie-store/cookieStore_getAll_arguments.tentative.https.any.js": [
|
||||
"6073fca3deb0e9ebdaf522ca895829eb869371eb",
|
||||
"93f9fd84daece913b24d5ff18747d1dacd5cd646",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/cookieStore_getAll_multiple.tentative.https.any.js": [
|
||||
|
@ -498304,7 +498398,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"cookie-store/cookieStore_get_arguments.tentative.https.any.js": [
|
||||
"73932c9bd5ddc0352b0a7cc19b9f13dbe3b30bad",
|
||||
"e88fdcbcef7fe6fd3c5d5a7db41a947bf53a4da8",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/cookieStore_get_delete_basic.tentative.https.any.js": [
|
||||
|
@ -498339,6 +498433,10 @@
|
|||
"a4b31178ab0977e96e86e45b550712b862c6d2c7",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/cookieStore_subscribe_arguments.tentative.https.any.js": [
|
||||
"5c49cefb82ef03e2a78ddd4243b9262f47ccb71d",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/cookieStore_subscriptions_empty.tentative.https.window.js": [
|
||||
"907a34b4de6632f5e91adbcd606839a92eead320",
|
||||
"testharness"
|
||||
|
@ -525136,7 +525234,7 @@
|
|||
"reftest"
|
||||
],
|
||||
"css/CSS2/linebox/inline-negative-margin-001.html": [
|
||||
"226a3a19ad17b8fb773e00174b1dcd1593e6be61",
|
||||
"b1ce232e6e9770a0019c5570f9e6ea57eb87f121",
|
||||
"testharness"
|
||||
],
|
||||
"css/CSS2/linebox/inline-negative-margin-minmax-crash-001.html": [
|
||||
|
@ -583355,6 +583453,14 @@
|
|||
"488fc05aad441bd2a648ad1a95c339ae82504ee1",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-grid/alignment/grid-align-content-vertical-lr.html": [
|
||||
"dbd27574e9b5f37af2a1f546c14eeb10d8d533f9",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-grid/alignment/grid-align-content-vertical-rl.html": [
|
||||
"440cf9406786b09d976e9d5a5d3ab9960ff42492",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-grid/alignment/grid-align-content.html": [
|
||||
"fb3f7007ee19189a09de9c1f786176c317b7ee14",
|
||||
"testharness"
|
||||
|
@ -593171,6 +593277,10 @@
|
|||
"5a76277092bf9e84605fbb8e1fd64e17259e3f44",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-position/position-absolute-table-001.html": [
|
||||
"c467ac480069caad4da5d65480b0d7b8a32dccfe",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-position/position-fixed-at-bottom-right-on-viewport.html": [
|
||||
"9184db028e864915813a4dcf76822f9a07d03b29",
|
||||
"testharness"
|
||||
|
@ -594063,12 +594173,16 @@
|
|||
"b3627cca7554076f85d59869eec7bc80e39b82be",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-pseudo/marker-content-010-ref.html": [
|
||||
"5bee9bb17943d7efd06a82656bd6881204cbf24a",
|
||||
"css/css-pseudo/marker-content-010-ref-001.html": [
|
||||
"9135f90241682949788b1faa565cc40ba03322c0",
|
||||
"support"
|
||||
],
|
||||
"css/css-pseudo/marker-content-010-ref-002.html": [
|
||||
"b85ccfbaebb59e0002458a6881aa2d9ed44bf883",
|
||||
"support"
|
||||
],
|
||||
"css/css-pseudo/marker-content-010.html": [
|
||||
"ccd377d523d55a1eac4f0f05ab7d378357488838",
|
||||
"dcd27df148ae4f865402f1e85b7df4cdd195be5b",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-pseudo/marker-content-011-ref.html": [
|
||||
|
@ -597632,7 +597746,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"css/css-scroll-snap/snap-after-relayout/move-current-target.html": [
|
||||
"83c2c478bf5921cedd9cb4d48b5de14533f4bbcd",
|
||||
"ccadc884c5ba23f90b4b7d273e5aaf355cf648d1",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-scroll-snap/snap-after-relayout/remove-current-target.html": [
|
||||
|
@ -651403,6 +651517,14 @@
|
|||
"20519ea181e82a64865b95f32f3486e52300eb06",
|
||||
"reftest"
|
||||
],
|
||||
"forced-colors-mode/forced-colors-mode-25-ref.html": [
|
||||
"9c626ae768676c155459e90a75e2bd4fdda02867",
|
||||
"support"
|
||||
],
|
||||
"forced-colors-mode/forced-colors-mode-25.html": [
|
||||
"ea1f973f04aa66c9e00a63cedacf929d62c70524",
|
||||
"reftest"
|
||||
],
|
||||
"forced-colors-mode/resources/float-image.jpg": [
|
||||
"ab06d5f94d16e22bb08fad79d6fef662b2a7de5a",
|
||||
"support"
|
||||
|
@ -689452,7 +689574,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"portals/portals-focus.sub.html": [
|
||||
"1427dae2e4d13cd849fdc4f92dbcd9d4b2cad280",
|
||||
"1779590779af1f7306925add9dfdd84a6abfa323",
|
||||
"testharness"
|
||||
],
|
||||
"portals/portals-host-exposure.sub.html": [
|
||||
|
@ -689532,7 +689654,7 @@
|
|||
"support"
|
||||
],
|
||||
"portals/resources/focus-page-with-button.html": [
|
||||
"2b6f0ff75604a5750ba96f6c19c9cc6508495676",
|
||||
"2bf0ddb93933a492b209b28d8767e3885350496f",
|
||||
"support"
|
||||
],
|
||||
"portals/resources/focus-page-with-x-origin-iframe.sub.html": [
|
||||
|
@ -703460,7 +703582,7 @@
|
|||
"support"
|
||||
],
|
||||
"resources/chromium/webxr-test-math-helper.js": [
|
||||
"0147f50f3712af39734ddd7db3bee073a1d8c923",
|
||||
"5eff666b70678e3d04a4b316616e8713a3cc58ea",
|
||||
"support"
|
||||
],
|
||||
"resources/chromium/webxr-test-math-helper.js.headers": [
|
||||
|
@ -703468,7 +703590,7 @@
|
|||
"support"
|
||||
],
|
||||
"resources/chromium/webxr-test.js": [
|
||||
"16191695e894f91e9a09aea1cfb7d9deb0307de9",
|
||||
"695b265db60067f5872099a7eda6ed579b3d73ca",
|
||||
"support"
|
||||
],
|
||||
"resources/chromium/webxr-test.js.headers": [
|
||||
|
@ -704016,7 +704138,7 @@
|
|||
"support"
|
||||
],
|
||||
"scroll-animations/scroll-animation.html": [
|
||||
"d565788e1089af140fb3579fca67d4ca9b60bdf3",
|
||||
"bee9e360c5913b2f54a16a68f4625d13c42bb15b",
|
||||
"testharness"
|
||||
],
|
||||
"scroll-animations/setting-current-time.html": [
|
||||
|
@ -728835,8 +728957,16 @@
|
|||
"f75cbcb99724219224c63d0dc595b1c001298500",
|
||||
"testharness"
|
||||
],
|
||||
"webgpu/LICENSE.txt": [
|
||||
"c7a75d7d221561df02c42470ad5e751324de645d",
|
||||
"support"
|
||||
],
|
||||
"webgpu/constants.js": [
|
||||
"28771fb0e3e96d273436446e8c254a28c92aebeb",
|
||||
"support"
|
||||
],
|
||||
"webgpu/cts.html": [
|
||||
"5c529e90401ce3523ab210739da616047c93c8eb",
|
||||
"058d3b3c4ad6bf098529234bcae42d34c2969dac",
|
||||
"testharness"
|
||||
],
|
||||
"webgpu/framework/allowed_characters.js": [
|
||||
|
@ -728848,19 +728978,23 @@
|
|||
"support"
|
||||
],
|
||||
"webgpu/framework/fixture.js": [
|
||||
"d976fa46880a30cbb1837fce30a96023875e0f87",
|
||||
"11b5f405456b4d5e635571b00247cce4e1fc5942",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/generate_minimal_query_list.js": [
|
||||
"12311acac0516009516147e2914910176613dd81",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/gpu/implementation.js": [
|
||||
"726eeab4eed644d4b5c4e0693e2462dbf1a08c5d",
|
||||
"653b60ab433c04ae08af73971950d125e209f447",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/id.js": [
|
||||
"8e5db2c7d7fbde102865f7da04fcccaea53960b6",
|
||||
"cb21a667d6035cbbf1e0a83b01f1460d2c51d927",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/index.js": [
|
||||
"93ee20963990d21039a60902b4e52ee0c5cb8b72",
|
||||
"c85a681688881226ebfcb5ae431196fe3ecde439",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/listing.js": [
|
||||
|
@ -728872,11 +729006,11 @@
|
|||
"support"
|
||||
],
|
||||
"webgpu/framework/logger.js": [
|
||||
"5536e736f069a3a013eb88233eb0d3a8c413f919",
|
||||
"b3ddbb6155588bd4d15e081c06f8445313c9ef96",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/params/combine.js": [
|
||||
"181877cf1650ef59c6d1f19a2ebff8cd84c5b790",
|
||||
"20b2be113525b20d36036fbb5de8dbabefcad6d9",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/params/exclude.js": [
|
||||
|
@ -728888,7 +729022,7 @@
|
|||
"support"
|
||||
],
|
||||
"webgpu/framework/params/index.js": [
|
||||
"bb21202f92de8395873d807aa02e283067e84bf7",
|
||||
"de922526696d7921d2ed8139964b85996d811dc1",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/params/options.js": [
|
||||
|
@ -728896,15 +729030,15 @@
|
|||
"support"
|
||||
],
|
||||
"webgpu/framework/test_filter/filter_by_group.js": [
|
||||
"e7cc5f78ba52a49eb021bf7cc9247448f2620f53",
|
||||
"b43749f9c5d700d1085b6402a086e38dcc4f2e24",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/test_filter/filter_one_file.js": [
|
||||
"7616bee6afeaec3fb6836f21fd318a4185d78c5a",
|
||||
"6c634888810bdb817c2228312290fb2394a77f59",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/test_filter/index.js": [
|
||||
"1a9dbcad4875d6e5160965f08f37c3fcd1e4c54d",
|
||||
"743975e13d687848ba8277cdc0adac4352ad5b9e",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/test_filter/internal.js": [
|
||||
|
@ -728912,19 +729046,19 @@
|
|||
"support"
|
||||
],
|
||||
"webgpu/framework/test_filter/load_filter.js": [
|
||||
"03d475eb4b8aa756b5ebb46c5fa764876d6e6fc7",
|
||||
"787747ead06027cb07f42b3485d25e569aa37a47",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/test_group.js": [
|
||||
"68527a5b2cf55426ae779739fba788cfde94b244",
|
||||
"643e9f60b3150dd870644888d6898a4d5451b5cc",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/tree.js": [
|
||||
"a0690519dbbe9e6ddc4c036acbca60dd409e0dc0",
|
||||
"fd7e6704c7602a28b3d28b366a614ac60ce13226",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/url_query.js": [
|
||||
"3712432888f6d2ac46aa410bb098ce7971ef0f93",
|
||||
"1446bc7f7f74b00b74bba7b22a29c553262b3941",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/util/async_mutex.js": [
|
||||
|
@ -728932,11 +729066,11 @@
|
|||
"support"
|
||||
],
|
||||
"webgpu/framework/util/index.js": [
|
||||
"01d10e375b6cbbafdb8ce34a8cb77e3e9b94952e",
|
||||
"2cba5f33998f3573db78fcef03c1e3fd535791ef",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/util/stack.js": [
|
||||
"bd51d54509483954bb84ea9757b873ca42233cab",
|
||||
"92b9c0e6bbc7e612fdb3742ab4502a1cd28b7f98",
|
||||
"support"
|
||||
],
|
||||
"webgpu/framework/util/timeout.js": [
|
||||
|
@ -728944,20 +729078,20 @@
|
|||
"support"
|
||||
],
|
||||
"webgpu/framework/version.js": [
|
||||
"8dd830276b92cd74c0a911ff5e328cbfb50e4463",
|
||||
"f8067d48eeb9a9942cd2797c57fbaa471044671f",
|
||||
"support"
|
||||
],
|
||||
"webgpu/runtime/helper/options.js": [
|
||||
"1a90beadf1ee459911b2b549fc9359b44fe37bbd",
|
||||
"support"
|
||||
],
|
||||
"webgpu/runtime/helper/test_worker.js": [
|
||||
"8a8c232f3b11b4a326a4f11ef60319d2b157710e",
|
||||
"webgpu/runtime/helper/test_worker-worker.js": [
|
||||
"d382f1e80e4dda805aca7e41cb90273cf84147c2",
|
||||
"support"
|
||||
],
|
||||
"webgpu/runtime/helper/test_worker.worker.js": [
|
||||
"513874144f714e50a289cd22cc88087cd73235e3",
|
||||
"testharness"
|
||||
"webgpu/runtime/helper/test_worker.js": [
|
||||
"a67030056f5b8d5ed7665f9e06f9735d0e26b287",
|
||||
"support"
|
||||
],
|
||||
"webgpu/runtime/wpt.js": [
|
||||
"fd02f09471bc656a900714dd586101d6acb28c46",
|
||||
|
@ -728992,7 +729126,7 @@
|
|||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/command_buffer/compute/basic.spec.js": [
|
||||
"7abb291ca43e401b80019f29fa3cdc21175300fc",
|
||||
"598edea66ab3946b45548ca3cea1d8becd8aec55",
|
||||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/command_buffer/copies.spec.js": [
|
||||
|
@ -729004,15 +729138,15 @@
|
|||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/command_buffer/render/rendering.spec.js": [
|
||||
"a5d7568dae594357bf94c26c5a07b020671442f1",
|
||||
"7bb7c546b5842aa585dec89ec456ad78a4ccfc18",
|
||||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/command_buffer/render/storeop.spec.js": [
|
||||
"ae92995aa6b73eadd52b3342ff6737b91b413431",
|
||||
"5bf6bd0116c80eea3082fab2f84522027755672b",
|
||||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/copyImageBitmapToTexture.spec.js": [
|
||||
"c9b07e83a81bad7b809c8b80f754ba3dbbe1f0e1",
|
||||
"b201bb49750c4f368fe6c39aa1462f1b026a3f69",
|
||||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/examples.spec.js": [
|
||||
|
@ -729024,11 +729158,11 @@
|
|||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/format_info.js": [
|
||||
"d1b5b85530bdbd1af762083ad44314ecc7d36fc4",
|
||||
"5d54bbb8c51ecd39ddb4869ce29e46571726a0cc",
|
||||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/gpu_test.js": [
|
||||
"cf52a6cacf82581d3d04aa28f01d057c8118957d",
|
||||
"236e9eaeb9d10923d840ff9cbe885a9d534e9230",
|
||||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/index.js": [
|
||||
|
@ -729036,27 +729170,27 @@
|
|||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/resource_init/sampled_texture_clear.spec.js": [
|
||||
"b7dfbe3583f1b18c0774580861f382b3e969b535",
|
||||
"66cee08addd60931f1192a6bf7bc97227b5b4130",
|
||||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/validation/createBindGroup.spec.js": [
|
||||
"4bc1d0877bab8087b3fa2bd25431b1b681ddef44",
|
||||
"22472f8dff2cf6b4d4206d7e29bc652a56466c4d",
|
||||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/validation/createBindGroupLayout.spec.js": [
|
||||
"9ac11b49ba621ff076c0e0b94a868ec0b37e6d2e",
|
||||
"22fa8f5d606e01841485d2567849db8dcd211168",
|
||||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/validation/createPipelineLayout.spec.js": [
|
||||
"b82229db3d9296f6dcadf70218d2143fccb8c8f6",
|
||||
"9d5394f925b6bec87b1ec7a01f9bd66aa994929e",
|
||||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/validation/createRenderPipeline.spec.js": [
|
||||
"b66dabf285a2c007e01356ed9c42a9cfe7eddc43",
|
||||
"f6a555526559969c659c74a49d3035573fc013db",
|
||||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/validation/createTexture.spec.js": [
|
||||
"77f1c9709b6cddda912bacd988408671cb20e8bb",
|
||||
"08c6d1b50b596e32b780f08a7be6d370d0951a75",
|
||||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/validation/createView.spec.js": [
|
||||
|
@ -729076,7 +729210,7 @@
|
|||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/validation/render_pass.spec.js": [
|
||||
"3e08dcc17368ecb7a74d386c64e2166fb6baff66",
|
||||
"f788fb63d8d0cd0270516a9e51640cb95fdf4118",
|
||||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/validation/render_pass_descriptor.spec.js": [
|
||||
|
@ -729108,11 +729242,11 @@
|
|||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/validation/validation_test.js": [
|
||||
"dc5488e769883b99a9157567d3aaa71eafd2dd42",
|
||||
"c275f94a80e5b8477838f4b66e4a1c123de9dbd6",
|
||||
"support"
|
||||
],
|
||||
"webgpu/suites/cts/validation/vertex_state.spec.js": [
|
||||
"da619181192b907f0485d71cf364616568d77f66",
|
||||
"cc33cde1decd5f42f006007e0e9381d50067babd",
|
||||
"support"
|
||||
],
|
||||
"webmessaging/Channel_postMessage_Blob.htm": [
|
||||
|
@ -729920,7 +730054,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"webrtc/RTCPeerConnection-onicecandidateerror.https.html": [
|
||||
"1bbb30bd575794ea5bb12bc192262a4127a6c308",
|
||||
"096cc9dd1a15b0e35cfae50c7bb872b876672adc",
|
||||
"testharness"
|
||||
],
|
||||
"webrtc/RTCPeerConnection-onnegotiationneeded.html": [
|
||||
|
@ -730172,7 +730306,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"webrtc/idlharness.https.window.js": [
|
||||
"85fc7a68b9dff83ce4470b6caa2986932af43b75",
|
||||
"93341278ac628f7ecc514283f01ad6d9ad90bc28",
|
||||
"testharness"
|
||||
],
|
||||
"webrtc/legacy/README.txt": [
|
||||
|
@ -735095,6 +735229,10 @@
|
|||
"1f3e3765df4e0a4319ea94842f2368e673948c4c",
|
||||
"testharness"
|
||||
],
|
||||
"webxr/xrFrame_getViewerPose_getPose.https.html": [
|
||||
"7d26983fc963c3ef4b00726d055f6b1a85d2d5f9",
|
||||
"testharness"
|
||||
],
|
||||
"webxr/xrFrame_lifetime.https.html": [
|
||||
"2d706d24848a29ee9ad5f3d309f809b803f5c8ca",
|
||||
"testharness"
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
[transform-scale-hittest.html]
|
||||
[Hit test within unscaled box]
|
||||
expected: FAIL
|
||||
|
||||
[Hit test intersecting scaled box]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[CaretPosition-001.html]
|
||||
[Element at (400, 100)]
|
||||
expected: FAIL
|
||||
|
|
@ -21,3 +21,6 @@
|
|||
[test the top of layer]
|
||||
expected: FAIL
|
||||
|
||||
[test some point of the element: top left corner]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[elementsFromPoint-invalid-cases.html]
|
||||
[The root element is the last element returned for otherwise empty queries within the viewport]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[HTMLMediaElement.html]
|
||||
expected: TIMEOUT
|
|
@ -324,12 +324,15 @@
|
|||
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*]
|
||||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*]
|
||||
[<iframe>: combined response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
|
||||
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
[X-Content-Type-Options%3A%20nosniff%0C]
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff]
|
||||
[X-Content-Type-Options%3A%20no%0D%0AX-Content-Type-Options%3A%20nosniff]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
expected: FAIL
|
||||
|
||||
[Embedded credentials are treated as network errors in new windows.]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[Embedded credentials matching the top-level are treated as network errors for cross-origin URLs.]
|
||||
expected: TIMEOUT
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[traverse_the_history_1.html]
|
||||
[Multiple history traversals from the same task]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[traverse_the_history_5.html]
|
||||
[traverse_the_history_4.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[iframe_sandbox_popups_escaping-3.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[iframe_sandbox_popups_nonescaping-3.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
5
tests/wpt/metadata/webmessaging/with-ports/017.html.ini
Normal file
5
tests/wpt/metadata/webmessaging/with-ports/017.html.ini
Normal file
|
@ -0,0 +1,5 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
[Worker-constructor.html]
|
||||
expected: ERROR
|
|
@ -196,9 +196,12 @@ promise_test(async testCase => {
|
|||
txn2.commit();
|
||||
|
||||
// Exercise the IndexedDB transaction ordering by executing one with a
|
||||
// different scope.
|
||||
const txn3 = db.transaction(['not_books'], 'readwrite');
|
||||
txn3.objectStore('not_books').put({'title': 'not_title'}, 'key');
|
||||
// different scope. A readonly transaction is used here because
|
||||
// implementations are not required to run non-overlapping readwrite
|
||||
// transactions in parallel, and some implementations (ex: Firefox)
|
||||
// will not.
|
||||
const txn3 = db.transaction(['not_books'], 'readonly');
|
||||
txn3.objectStore('not_books').getAllKeys();
|
||||
txn3.oncomplete = function() {
|
||||
releaseTxnFunction();
|
||||
}
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Embedded Enforcement: Sec-Required-CSP header.</title>
|
||||
<!--
|
||||
This test is creating and navigating >=70 iframes. This can exceed the
|
||||
"short" timeout". See https://crbug.com/818324
|
||||
-->
|
||||
<meta name="timeout" content="long">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/testharness-helper.sub.js"></script>
|
||||
|
|
|
@ -4,15 +4,21 @@
|
|||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<!-- Content-Security-Policy: object-src 'self'; script-src 'self' 'unsafe-inline'; report-uri ../support/report.py?op=put&reportID={{$id}} -->
|
||||
<!--
|
||||
Content-Security-Policy:
|
||||
object-src 'self';
|
||||
script-src 'self' 'unsafe-inline';
|
||||
report-uri ../support/report.py?op=put&reportID={{$id}}
|
||||
-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<object type="image/png" data="/content-security-policy/support/pass.png"></object>
|
||||
|
||||
<!-- we rely on the report because we can't rely on the onload event for
|
||||
"allowed" tests as it is not fired for object and embed -->
|
||||
<script async defer src='../support/checkReport.sub.js?reportExists=false'></script>
|
||||
<!--
|
||||
We rely on the report because we can't rely on the onload event for
|
||||
"allowed" tests as it is not fired for object and embed
|
||||
-->
|
||||
<script src='../support/checkReport.sub.js?reportExists=false'></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -4,16 +4,22 @@
|
|||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<!-- Content-Security-Policy: object-src 'self'; script-src 'self' 'unsafe-inline'; report-uri ../support/report.py?op=put&reportID={{$id}} -->
|
||||
<!--
|
||||
Content-Security-Policy:
|
||||
object-src 'self';
|
||||
script-src 'self' 'unsafe-inline';
|
||||
report-uri ../support/report.py?op=put&reportID={{$id}}
|
||||
-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<embed height="40" width="40" type="image/png"
|
||||
src="/content-security-policy/support/pass.png"></embed>
|
||||
|
||||
<!-- we rely on the report because we can't rely on the onload event for
|
||||
"allowed" tests as it is not fired for object and embed -->
|
||||
<script async defer src='../support/checkReport.sub.js?reportExists=false'></script>
|
||||
<!--
|
||||
We rely on the report because we can't rely on the onload event for
|
||||
"allowed" tests as it is not fired for object and embed
|
||||
-->
|
||||
<script src='../support/checkReport.sub.js?reportExists=false'></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -142,3 +142,61 @@ promise_test(async testCase => {
|
|||
assert_equals(cookies[0].name, 'cookie-name');
|
||||
assert_equals(cookies[0].value, 'cookie-value');
|
||||
}, 'cookieStore.getAll with matchType set to starts-with and missing name');
|
||||
|
||||
promise_test(async testCase => {
|
||||
await cookieStore.set('cookie-name', 'cookie-value');
|
||||
testCase.add_cleanup(async () => {
|
||||
await cookieStore.delete('cookie-name');
|
||||
});
|
||||
|
||||
let target_url = self.location.href;
|
||||
if (self.GLOBAL.isWorker()) {
|
||||
target_url = target_url + '/path/within/scope';
|
||||
}
|
||||
|
||||
const cookies = await cookieStore.getAll({ url: target_url });
|
||||
assert_equals(cookies.length, 1);
|
||||
assert_equals(cookies[0].name, 'cookie-name');
|
||||
assert_equals(cookies[0].value, 'cookie-value');
|
||||
}, 'cookieStore.getAll with absolute url in options');
|
||||
|
||||
promise_test(async testCase => {
|
||||
await cookieStore.set('cookie-name', 'cookie-value');
|
||||
testCase.add_cleanup(async () => {
|
||||
await cookieStore.delete('cookie-name');
|
||||
});
|
||||
|
||||
let target_path = self.location.pathname;
|
||||
if (self.GLOBAL.isWorker()) {
|
||||
target_path = target_path + '/path/within/scope';
|
||||
}
|
||||
|
||||
const cookies = await cookieStore.getAll({ url: target_path });
|
||||
assert_equals(cookies.length, 1);
|
||||
assert_equals(cookies[0].name, 'cookie-name');
|
||||
assert_equals(cookies[0].value, 'cookie-value');
|
||||
}, 'cookieStore.getAll with relative url in options');
|
||||
|
||||
promise_test(async testCase => {
|
||||
await cookieStore.set('cookie-name', 'cookie-value');
|
||||
testCase.add_cleanup(async () => {
|
||||
await cookieStore.delete('cookie-name');
|
||||
});
|
||||
|
||||
const invalid_url =
|
||||
`${self.location.protocol}//${self.location.host}/different/path`;
|
||||
await promise_rejects(testCase, new TypeError(), cookieStore.getAll(
|
||||
{ url: invalid_url }));
|
||||
}, 'cookieStore.getAll with invalid url path in options');
|
||||
|
||||
promise_test(async testCase => {
|
||||
await cookieStore.set('cookie-name', 'cookie-value');
|
||||
testCase.add_cleanup(async () => {
|
||||
await cookieStore.delete('cookie-name');
|
||||
});
|
||||
|
||||
const invalid_url =
|
||||
`${self.location.protocol}//www.example.com${self.location.pathname}`;
|
||||
await promise_rejects(testCase, new TypeError(), cookieStore.getAll(
|
||||
{ url: invalid_url }));
|
||||
}, 'cookieStore.getAll with invalid url host in options');
|
||||
|
|
|
@ -105,3 +105,59 @@ promise_test(async testCase => {
|
|||
assert_equals(cookie.name, 'cookie-name');
|
||||
assert_equals(cookie.value, 'cookie-value');
|
||||
}, 'cookieStore.get with matchType set to starts-with and missing name');
|
||||
|
||||
promise_test(async testCase => {
|
||||
await cookieStore.set('cookie-name', 'cookie-value');
|
||||
testCase.add_cleanup(async () => {
|
||||
await cookieStore.delete('cookie-name');
|
||||
});
|
||||
|
||||
let target_url = self.location.href;
|
||||
if (self.GLOBAL.isWorker()) {
|
||||
target_url = target_url + '/path/within/scope';
|
||||
}
|
||||
|
||||
const cookie = await cookieStore.get({ url: target_url });
|
||||
assert_equals(cookie.name, 'cookie-name');
|
||||
assert_equals(cookie.value, 'cookie-value');
|
||||
}, 'cookieStore.get with absolute url in options');
|
||||
|
||||
promise_test(async testCase => {
|
||||
await cookieStore.set('cookie-name', 'cookie-value');
|
||||
testCase.add_cleanup(async () => {
|
||||
await cookieStore.delete('cookie-name');
|
||||
});
|
||||
|
||||
let target_path = self.location.pathname;
|
||||
if (self.GLOBAL.isWorker()) {
|
||||
target_path = target_path + '/path/within/scope';
|
||||
}
|
||||
|
||||
const cookie = await cookieStore.get({ url: target_path });
|
||||
assert_equals(cookie.name, 'cookie-name');
|
||||
assert_equals(cookie.value, 'cookie-value');
|
||||
}, 'cookieStore.get with relative url in options');
|
||||
|
||||
promise_test(async testCase => {
|
||||
await cookieStore.set('cookie-name', 'cookie-value');
|
||||
testCase.add_cleanup(async () => {
|
||||
await cookieStore.delete('cookie-name');
|
||||
});
|
||||
|
||||
const invalid_url =
|
||||
`${self.location.protocol}//${self.location.host}/different/path`;
|
||||
await promise_rejects(testCase, new TypeError(), cookieStore.get(
|
||||
{ url: invalid_url }));
|
||||
}, 'cookieStore.get with invalid url path in options');
|
||||
|
||||
promise_test(async testCase => {
|
||||
await cookieStore.set('cookie-name', 'cookie-value');
|
||||
testCase.add_cleanup(async () => {
|
||||
await cookieStore.delete('cookie-name');
|
||||
});
|
||||
|
||||
const invalid_url =
|
||||
`${self.location.protocol}//www.example.com${self.location.pathname}`;
|
||||
await promise_rejects(testCase, new TypeError(), cookieStore.get(
|
||||
{ url: invalid_url }));
|
||||
}, 'cookieStore.get with invalid url host in options');
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
// META: title=Cookie Store API: cookieStore.subscribe() arguments
|
||||
// META: global=!default,serviceworker,window
|
||||
// META: script=/service-workers/service-worker/resources/test-helpers.sub.js
|
||||
|
||||
'use strict';
|
||||
|
||||
promise_test(async testCase => {
|
||||
if (self.GLOBAL.isWindow()) {
|
||||
const registration = await service_worker_unregister_and_register(
|
||||
testCase, 'resources/empty_sw.js',
|
||||
'/cookie-store/resources/does/not/exist');
|
||||
testCase.add_cleanup(() => registration.unregister());
|
||||
|
||||
// Must wait for the service worker to enter the 'activated' state before
|
||||
// subscribing to cookiechange events.
|
||||
await wait_for_state(testCase, registration.installing, 'activated');
|
||||
|
||||
self.registration = registration;
|
||||
} else {
|
||||
// Must wait for the service worker to enter the 'activated' state before
|
||||
// subscribing to cookiechange events.
|
||||
await new Promise(resolve => {
|
||||
self.addEventListener('activate', event => { resolve(); });
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
const subscriptions = [
|
||||
{ name: 'cookie-name', matchType: 'equals' }
|
||||
];
|
||||
await self.registration.cookies.subscribe(subscriptions);
|
||||
testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions));
|
||||
}
|
||||
|
||||
const subscriptions = await registration.cookies.getSubscriptions();
|
||||
assert_equals(subscriptions.length, 1);
|
||||
|
||||
assert_equals(subscriptions[0].name, 'cookie-name');
|
||||
assert_equals(subscriptions[0].matchType, 'equals');
|
||||
assert_equals(subscriptions[0].url, registration.scope);
|
||||
}, 'cookieStore.subscribe without url in option');
|
||||
|
||||
promise_test(async testCase => {
|
||||
if (self.GLOBAL.isWindow()) {
|
||||
const registration = await service_worker_unregister_and_register(
|
||||
testCase, 'resources/empty_sw.js',
|
||||
'/cookie-store/resources/does/not/exist');
|
||||
testCase.add_cleanup(() => registration.unregister());
|
||||
|
||||
// Must wait for the service worker to enter the 'activated' state before
|
||||
// subscribing to cookiechange events.
|
||||
await wait_for_state(testCase, registration.installing, 'activated');
|
||||
|
||||
self.registration = registration;
|
||||
} else if (!self.registration.active) {
|
||||
// If service worker is not active yet, it must wait for it to enter the
|
||||
// 'activated' state before subscribing to cookiechange events.
|
||||
await new Promise(resolve => {
|
||||
self.addEventListener('activate', event => { resolve(); });
|
||||
});
|
||||
}
|
||||
|
||||
await promise_rejects(testCase, new TypeError(),
|
||||
registration.cookies.subscribe(
|
||||
{ name: 'cookie-name', matchType: 'equals', url: '/wrong/path' }));
|
||||
}, 'cookieStore.subscribe with invalid url path in option');
|
|
@ -5,6 +5,7 @@
|
|||
<script src="/resources/check-layout-th.js"></script>
|
||||
<link rel="help" href="https://crbug.com/979894">
|
||||
<link rel="help" href="https://crbug.com/1011816">
|
||||
<link rel="help" href="https://crbug.com/1040461">
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#inline-width">
|
||||
<link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
|
@ -20,6 +21,7 @@ inline-block {
|
|||
}
|
||||
.w1 { width: 1ch; }
|
||||
.w2 { width: 2ch; }
|
||||
.w3 { width: 3ch; }
|
||||
.w4 { width: 4ch; }
|
||||
.w5 { width: 5ch; }
|
||||
span {
|
||||
|
@ -43,6 +45,9 @@ img {
|
|||
<div class="w4" data-expected-height=20><img class="w4"><img class="w2" style="margin-left: -1ch"></div>
|
||||
<div class="w4" data-expected-height=10><img class="w5"><img class="w1" style="margin-left: -2ch"></div>
|
||||
<div class="w4" data-expected-height=20><img class="w5"><img class="w2" style="margin-left: -2ch"></div>
|
||||
|
||||
<div class="w4" data-expected-height=20><img class="w3"><img class="w2"><img class="w1" style="margin-left: -2ch"></div>
|
||||
<div class="w4" data-expected-height=20><img class="w2"> <img class="w2"><img class="w1" style="margin-left: -2ch"></div>
|
||||
</section>
|
||||
<script>checkLayout('[data-expected-height]');</script>
|
||||
</body>
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Grid Layout test: align-content in vertical-lr</title>
|
||||
<link rel="author" title="Rossana Monteriso" href="mailto:rmonteriso@igalia.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-4/#propdef-direction">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-align">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#alignment-values">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-4/#direction">
|
||||
<meta name="assert" content="This test checks that the align-content property is applied correctly in vertical-lr grids, for both LTR and RTL directions.">
|
||||
<meta name="flags" content="ahem">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<link rel="stylesheet" href="/css/support/grid.css">
|
||||
<link rel="stylesheet" href="/css/support/alignment.css">
|
||||
|
||||
<style>
|
||||
|
||||
.grid {
|
||||
grid: 100px 100px / 50px 50px;
|
||||
position: relative;
|
||||
width: 300px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.cell {
|
||||
width: 20px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
|
||||
<body onload="checkLayout('.grid')">
|
||||
|
||||
<div style="position: relative">
|
||||
<p>direction: LTR | align-content: 'center'</p>
|
||||
<div class="grid verticalLR alignContentCenter" data-expected-width="300" data-expected-height="200">
|
||||
<div class="cell firstRowFirstColumn" data-offset-x="50" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="50" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="secondRowFirstColumn" data-offset-x="150" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="cell secondRowSecondColumn" data-offset-x="150" data-offset-y="50" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative">
|
||||
<p>direction: LTR | align-content: 'start'</p>
|
||||
<div class="grid verticalLR alignContentStart" data-expected-width="300" data-expected-height="200">
|
||||
<div class="cell firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="50" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="cell secondRowSecondColumn" data-offset-x="100" data-offset-y="50" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative">
|
||||
<p>direction: LTR | align-content: 'end'</p>
|
||||
<div class="grid verticalLR alignContentEnd" data-expected-width="300" data-expected-height="200">
|
||||
<div class="cell firstRowFirstColumn" data-offset-x="100" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="firstRowSecondColumn" data-offset-x="100" data-offset-y="50" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="secondRowFirstColumn" data-offset-x="200" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="cell secondRowSecondColumn" data-offset-x="200" data-offset-y="50" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- RTL direction. -->
|
||||
<div style="position: relative">
|
||||
<p>direction: RTL | align-content: 'center'</p>
|
||||
<div class="grid directionRTL verticalLR alignContentCenter" data-expected-width="300" data-expected-height="200">
|
||||
<div class="cell firstRowFirstColumn" data-offset-x="50" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="100" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="secondRowFirstColumn" data-offset-x="150" data-offset-y="150" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="cell secondRowSecondColumn" data-offset-x="150" data-offset-y="110" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative">
|
||||
<p>direction: RTL | align-content: 'start'</p>
|
||||
<div class="grid directionRTL verticalLR alignContentStart" data-expected-width="300" data-expected-height="200">
|
||||
<div class="cell firstRowFirstColumn" data-offset-x="0" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="100" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="150" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="cell secondRowSecondColumn" data-offset-x="100" data-offset-y="110" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative">
|
||||
<p>direction: RTL | align-content: 'end'</p>
|
||||
<div class="grid directionRTL verticalLR alignContentEnd" data-expected-width="300" data-expected-height="200">
|
||||
<div class="cell firstRowFirstColumn" data-offset-x="100" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="firstRowSecondColumn" data-offset-x="100" data-offset-y="100" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="secondRowFirstColumn" data-offset-x="200" data-offset-y="150" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="cell secondRowSecondColumn" data-offset-x="200" data-offset-y="110" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
|
@ -0,0 +1,98 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Grid Layout test: align-content in vertical-rl</title>
|
||||
<link rel="author" title="Rossana Monteriso" href="mailto:rmonteriso@igalia.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-4/#propdef-direction">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-align">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-align-3/#alignment-values">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-4/#direction">
|
||||
<meta name="assert" content="This test checks that the align-content property is applied correctly in vertical-rl grids, for both LTR and RTL directions.">
|
||||
<meta name="flags" content="ahem">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<link rel="stylesheet" href="/css/support/grid.css">
|
||||
<link rel="stylesheet" href="/css/support/alignment.css">
|
||||
|
||||
<style>
|
||||
|
||||
.grid {
|
||||
grid: 100px 100px / 50px 50px;
|
||||
position: relative;
|
||||
width: 300px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.cell {
|
||||
width: 20px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
|
||||
<body onload="checkLayout('.grid')">
|
||||
|
||||
<div style="position: relative">
|
||||
<p>direction: LTR | align-content: 'center'</p>
|
||||
<div class="grid verticalRL alignContentCenter" data-expected-width="300" data-expected-height="200">
|
||||
<div class="cell firstRowFirstColumn" data-offset-x="230" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="50" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="cell secondRowSecondColumn" data-offset-x="130" data-offset-y="50" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative">
|
||||
<p>direction: LTR | align-content: 'start'</p>
|
||||
<div class="grid verticalRL alignContentStart" data-expected-width="300" data-expected-height="200">
|
||||
<div class="cell firstRowFirstColumn" data-offset-x="280" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="firstRowSecondColumn" data-offset-x="200" data-offset-y="50" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="cell secondRowSecondColumn" data-offset-x="180" data-offset-y="50" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative">
|
||||
<p>direction: LTR | align-content: 'end'</p>
|
||||
<div class="grid verticalRL alignContentEnd" data-expected-width="300" data-expected-height="200">
|
||||
<div class="cell firstRowFirstColumn" data-offset-x="180" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="firstRowSecondColumn" data-offset-x="100" data-offset-y="50" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="secondRowFirstColumn" data-offset-x="00" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="cell secondRowSecondColumn" data-offset-x="80" data-offset-y="50" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- RTL direction. -->
|
||||
<div style="position: relative">
|
||||
<p>direction: RTL | align-content: 'center'</p>
|
||||
<div class="grid directionRTL verticalRL alignContentCenter" data-expected-width="300" data-expected-height="200">
|
||||
<div class="cell firstRowFirstColumn" data-offset-x="230" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="firstRowSecondColumn" data-offset-x="150" data-offset-y="100" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="secondRowFirstColumn" data-offset-x="50" data-offset-y="150" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="cell secondRowSecondColumn" data-offset-x="130" data-offset-y="110" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative">
|
||||
<p>direction: RTL | align-content: 'start'</p>
|
||||
<div class="grid directionRTL verticalRL alignContentStart" data-expected-width="300" data-expected-height="200">
|
||||
<div class="cell firstRowFirstColumn" data-offset-x="280" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="firstRowSecondColumn" data-offset-x="200" data-offset-y="100" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="secondRowFirstColumn" data-offset-x="100" data-offset-y="150" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="cell secondRowSecondColumn" data-offset-x="180" data-offset-y="110" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative">
|
||||
<p>direction: RTL | align-content: 'end'</p>
|
||||
<div class="grid directionRTL verticalRL alignContentEnd" data-expected-width="300" data-expected-height="200">
|
||||
<div class="cell firstRowFirstColumn" data-offset-x="180" data-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
|
||||
<div class="firstRowSecondColumn" data-offset-x="100" data-offset-y="100" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="secondRowFirstColumn" data-offset-x="00" data-offset-y="150" data-expected-width="100" data-expected-height="50"></div>
|
||||
<div class="cell secondRowSecondColumn" data-offset-x="80" data-offset-y="110" data-expected-width="20" data-expected-height="40"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
|
@ -0,0 +1,112 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Position Absolute: table width/height</title>
|
||||
<link rel="author" href="mailto:atotic@google.com">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-position-3/#abs-non-replaced-width">
|
||||
<meta name="assert" content="Table css width/height are different. Make sure absolute position respects the differences.">
|
||||
<style>
|
||||
|
||||
.container {
|
||||
margin-bottom: 8px;
|
||||
position: relative;
|
||||
width: 300px;
|
||||
height: 220px;
|
||||
background: gray;
|
||||
}
|
||||
table {
|
||||
position: absolute;
|
||||
border: 10px solid green;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: yellow;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 10px;
|
||||
border-spacing: 0 0;
|
||||
}
|
||||
.contentbox {
|
||||
box-sizing: content-box;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
td {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<p>Table css width/height are interpreted differently: they are the minimum width. Absolute positioning code should respect this.</p>
|
||||
<div class="container">
|
||||
<table id="one">
|
||||
<td>t1</td>
|
||||
</table>
|
||||
</div>
|
||||
<div class="container">
|
||||
<table id="two">
|
||||
<td><div style="width:160px;height:160px;background:orange">div makes cell larger.</div></td>
|
||||
</table>
|
||||
</div>
|
||||
<div class="container">
|
||||
<table id="one-border" style="box-sizing: border-box">
|
||||
<td>t1</td>
|
||||
</table>
|
||||
</div>
|
||||
<div class="container">
|
||||
<table id="two-border" style="box-sizing: border-box">
|
||||
<td><div style="width:160px;height:160px;background:orange">div makes cell larger.</div></td>
|
||||
</table>
|
||||
</div>
|
||||
<div class="container">
|
||||
<table id="one-content" class="contentbox">
|
||||
<td>t1</td>
|
||||
</table>
|
||||
</div>
|
||||
<div class="container">
|
||||
<table id="two-content" class="contentbox">
|
||||
<td><div style="width:160px;height:160px;background:orange">div makes cell larger.</div></td>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
test(() => {
|
||||
let t = document.getElementById("one");
|
||||
assert_equals(t.offsetWidth, 100);
|
||||
assert_equals(t.offsetHeight, 100);
|
||||
assert_equals(t.parentNode.offsetHeight, t.offsetTop + t.offsetHeight, "bottom position is 0");
|
||||
assert_equals(t.parentNode.offsetWidth, t.offsetLeft + t.offsetWidth, "right position is 0");
|
||||
}, 'table size is interpreted as border-box width by default');
|
||||
test(() => {
|
||||
let t = document.getElementById("two");
|
||||
assert_equals(t.offsetWidth, 200);
|
||||
assert_equals(t.offsetHeight, 200);
|
||||
assert_equals(t.parentNode.offsetWidth, t.offsetLeft + t.offsetWidth, "right position is 0");
|
||||
assert_equals(t.parentNode.offsetHeight, t.offsetTop + t.offsetHeight, "bottom position is 0");
|
||||
}, 'table size is interpreted as minimum width');
|
||||
test(() => {
|
||||
let t = document.getElementById("one-border");
|
||||
assert_equals(t.offsetWidth, 100);
|
||||
assert_equals(t.offsetHeight, 100);
|
||||
assert_equals(t.parentNode.offsetHeight, t.offsetTop + t.offsetHeight, "bottom position is 0");
|
||||
assert_equals(t.parentNode.offsetWidth, t.offsetLeft + t.offsetWidth, "right position is 0");
|
||||
}, 'table size border-box');
|
||||
test(() => {
|
||||
let t = document.getElementById("two-border");
|
||||
assert_equals(t.offsetWidth, 200);
|
||||
assert_equals(t.offsetHeight, 200);
|
||||
assert_equals(t.parentNode.offsetWidth, t.offsetLeft + t.offsetWidth, "right position is 0");
|
||||
assert_equals(t.parentNode.offsetHeight, t.offsetTop + t.offsetHeight, "bottom position is 0");
|
||||
}, 'table size border-box interpreted as minimum width');
|
||||
test(() => {
|
||||
let t = document.getElementById("one-content");
|
||||
assert_equals(t.offsetWidth, 100);
|
||||
assert_equals(t.offsetHeight, 100);
|
||||
assert_equals(t.parentNode.offsetHeight, t.offsetTop + t.offsetHeight, "bottom position is 0");
|
||||
assert_equals(t.parentNode.offsetWidth, t.offsetLeft + t.offsetWidth, "right position is 0");
|
||||
}, 'table size content-box');
|
||||
test(() => {
|
||||
let t = document.getElementById("two-content");
|
||||
assert_equals(t.offsetWidth, 200);
|
||||
assert_equals(t.offsetHeight, 200);
|
||||
assert_equals(t.parentNode.offsetWidth, t.offsetLeft + t.offsetWidth, "right position is 0");
|
||||
assert_equals(t.parentNode.offsetHeight, t.offsetTop + t.offsetHeight, "bottom position is 0");
|
||||
}, 'table size content-box interpreted as minimum width');
|
||||
</script>
|
|
@ -8,15 +8,15 @@ html,body {
|
|||
color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
|
||||
}
|
||||
body { margin-left: 40px; }
|
||||
.h m { display:inline-block; width:0; line-height:0; height:0; position:relative; left: -3ch; }
|
||||
.h m { display:inline-block; width:0; height:0; position:relative; left: -3ch; font-size: 16px; line-height:0; }
|
||||
.big { font-size:xx-large; }
|
||||
.big-marker m { font-size:xx-large; }
|
||||
li { display: block; }
|
||||
</style>
|
||||
</head><body>
|
||||
<ol class="h">
|
||||
<li><div class="big"><m style="font-size:initial">1.</m>C<br>D</div></li>
|
||||
<li><div></div><div class="big"><m style="font-size:initial">2.</m>C<br>D</div>
|
||||
<li><div class="big"><m>1.</m>C<br>D</div></li>
|
||||
<li><div></div><div class="big"><m>2.</m>C<br>D</div>
|
||||
</li>
|
||||
</ol>
|
||||
<ol class="big-marker h">
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Reference: ::marker pseudo elements styled with 'content' property</title>
|
||||
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
|
||||
<style>
|
||||
html,body {
|
||||
color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
|
||||
}
|
||||
body { margin-left: 40px; }
|
||||
.h m { display:inline-block; width:0; height:0; position:relative; left: -3ch; font-size: 16px; }
|
||||
.big { font-size:xx-large; }
|
||||
.big-marker m { font-size:xx-large; }
|
||||
li { display: block; }
|
||||
</style>
|
||||
</head><body>
|
||||
<ol class="h">
|
||||
<li><div class="big"><m>1.</m>C<br>D</div></li>
|
||||
<li><div></div><div class="big"><m>2.</m>C<br>D</div>
|
||||
</li>
|
||||
</ol>
|
||||
<ol class="big-marker h">
|
||||
<li><div><m>1.</m>C<br>D</div></li>
|
||||
<li><div></div><div><m>2.</m>C<br>D</div></li>
|
||||
</ol>
|
||||
</body></html>
|
|
@ -3,7 +3,11 @@
|
|||
<meta charset="utf-8">
|
||||
<title>CSS Test: ::marker pseudo elements styled with 'content' property</title>
|
||||
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
|
||||
<link rel="match" href="marker-content-010-ref.html">
|
||||
<!-- Outside markers may affect the height of the first line of the list item.
|
||||
In the 1st reference the line height isn't affected, in the 2nd one it is.
|
||||
Both are valid behaviors, the test passes if one of them matches -->
|
||||
<link rel="match" href="marker-content-010-ref-001.html">
|
||||
<link rel="match" href="marker-content-010-ref-002.html">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#marker-pseudo">
|
||||
<style>
|
||||
html,body {
|
||||
|
|
|
@ -95,8 +95,6 @@ test(t => {
|
|||
assert_equals(scroller.scrollTop, 100);
|
||||
assert_equals(scroller.scrollLeft, 100);
|
||||
|
||||
// TODO(alsan): Chrome currently doesn't correctly re-snap due to transform.
|
||||
// It seems to be an invalidation issue. http://crbug.com/1028316
|
||||
initial_target.style.setProperty("transform", "translate(0,100px)");
|
||||
assert_equals(scroller.scrollTop, 200);
|
||||
assert_equals(scroller.scrollLeft, 100);
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Forced colors mode - atomic inline reference.
|
||||
Ensures that background images are not overridden for atomic inlines.
|
||||
</title>
|
||||
<style>
|
||||
body {
|
||||
forced-color-adjust: none;
|
||||
}
|
||||
div {
|
||||
background-image: url("resources/test-image.jpg");
|
||||
height: 150px;
|
||||
width: 150px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Four images should appear below with forced colors mode enabled and disabled.</p>
|
||||
<div style="display: inline-block;"></div>
|
||||
<div style="display: inline-flex;"></div>
|
||||
<div style="display: inline-grid;"></div>
|
||||
<div style="display: inline-table;"></div>
|
||||
</body>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Forced colors mode - atomic inline.
|
||||
Ensures that background images are not overridden for atomic inlines.
|
||||
</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-color-adjust-1/#forced-colors-properties">
|
||||
<link rel=match href="forced-colors-mode-25-ref.html">
|
||||
<style>
|
||||
div {
|
||||
background-image: url("resources/test-image.jpg");
|
||||
height: 150px;
|
||||
width: 150px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Four images should appear below with forced colors mode enabled and disabled.</p>
|
||||
<div style="display: inline-block;"></div>
|
||||
<div style="display: inline-flex;"></div>
|
||||
<div style="display: inline-grid;"></div>
|
||||
<div style="display: inline-table;"></div>
|
||||
</body>
|
|
@ -86,19 +86,47 @@
|
|||
}, "test that a x-origin iframe inside an adopted portal cannot steal focus");
|
||||
|
||||
const TAB = "\ue004"; // https://w3c.github.io/webdriver/#keyboard-actions
|
||||
const SPACE = " "
|
||||
const RETURN = "\r";
|
||||
|
||||
promise_test(async t => {
|
||||
let portal = await createPortal(document, "resources/focus-page-with-button.html");
|
||||
try {
|
||||
portal.tabIndex = 0;
|
||||
await test_driver.send_keys(document.body, TAB);
|
||||
portal.onmessage = t.step_func(e => {
|
||||
assert_unreached("button inside portal should not be focused");
|
||||
});
|
||||
portal.onmessage = t.unreached_func("button inside portal should not be focused");
|
||||
await new Promise(r => t.step_timeout(r, 500));
|
||||
} finally {
|
||||
document.body.removeChild(portal);
|
||||
}
|
||||
}, "test that a portal is keyboard focusable");
|
||||
|
||||
promise_test(async t => {
|
||||
let portal = await createPortal(document, "resources/focus-page-with-button.html");
|
||||
try {
|
||||
let portalFocusPromise = new Promise(r => portal.onfocus = r);
|
||||
portal.onmessage = t.unreached_func("button inside portal should not be focused");
|
||||
await test_driver.send_keys(document.body, TAB);
|
||||
await portalFocusPromise;
|
||||
await test_driver.send_keys(document.body, TAB);
|
||||
await new Promise(r => t.step_timeout(r, 500));
|
||||
} finally {
|
||||
document.body.removeChild(portal);
|
||||
}
|
||||
}, "test that we cannot tab into a portal's contents");
|
||||
|
||||
promise_test(async t => {
|
||||
let portal = await createPortal(document, "resources/simple-portal.html");
|
||||
try {
|
||||
portal.focus();
|
||||
for (let key of [SPACE, RETURN]) {
|
||||
let clickPromise = new Promise(r => portal.onclick = r);
|
||||
await test_driver.send_keys(document.body, key);
|
||||
await clickPromise;
|
||||
}
|
||||
} finally {
|
||||
document.body.removeChild(portal);
|
||||
}
|
||||
}, "test that a portal is keyboard activatable");
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -18,7 +18,12 @@
|
|||
let portal = e.adoptPredecessor();
|
||||
document.body.appendChild(portal);
|
||||
portal.onmessage = handleMessage;
|
||||
}
|
||||
};
|
||||
|
||||
window.onfocus = () => {
|
||||
if (window.portalHost)
|
||||
window.portalHost.postMessage("window focused", "*");
|
||||
};
|
||||
</script>
|
||||
<button>A</button>
|
||||
</body>
|
||||
|
|
|
@ -23,7 +23,7 @@ class XRMathHelper {
|
|||
// .w is treated here like an entity type, 1 signifies points, 0 signifies vectors.
|
||||
// point - point, point - vector, vector - vector are ok, vector - point is not.
|
||||
if (lhs.w != rhs.w && lhs.w == 0.0) {
|
||||
console.warn("vector - point not allowed: " + toString(lhs) + "-" + toString(rhs));
|
||||
throw new Error("vector - point not allowed: " + toString(lhs) + "-" + toString(rhs));
|
||||
}
|
||||
|
||||
return {x : lhs.x - rhs.x, y : lhs.y - rhs.y, z : lhs.z - rhs.z, w : lhs.w - rhs.w};
|
||||
|
@ -31,7 +31,7 @@ class XRMathHelper {
|
|||
|
||||
static add(lhs, rhs) {
|
||||
if (lhs.w == rhs.w && lhs.w == 1.0) {
|
||||
console.warn("point + point not allowed", p1, p2);
|
||||
throw new Error("point + point not allowed", p1, p2);
|
||||
}
|
||||
|
||||
return {x : lhs.x + rhs.x, y : lhs.y + rhs.y, z : lhs.z + rhs.z, w : lhs.w + rhs.w};
|
||||
|
@ -39,7 +39,7 @@ class XRMathHelper {
|
|||
|
||||
static cross(lhs, rhs) {
|
||||
if (lhs.w != 0.0 || rhs.w != 0.0) {
|
||||
console.warn("cross product not allowed: " + toString(lhs) + "x" + toString(rhs));
|
||||
throw new Error("cross product not allowed: " + toString(lhs) + "x" + toString(rhs));
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -52,7 +52,7 @@ class XRMathHelper {
|
|||
|
||||
static dot(lhs, rhs) {
|
||||
if (lhs.w != 0 || rhs.w != 0) {
|
||||
console.warn("dot product not allowed: " + toString(lhs) + "x" + toString(rhs));
|
||||
throw new Error("dot product not allowed: " + toString(lhs) + "x" + toString(rhs));
|
||||
}
|
||||
|
||||
return lhs.x * rhs.x + lhs.y * rhs.y + lhs.z * rhs.z;
|
||||
|
@ -60,7 +60,7 @@ class XRMathHelper {
|
|||
|
||||
static mul(scalar, vector) {
|
||||
if (vector.w != 0) {
|
||||
console.warn("scalar * vector not allowed", scalar, vector);
|
||||
throw new Error("scalar * vector not allowed", scalar, vector);
|
||||
}
|
||||
|
||||
return {x : vector.x * scalar, y : vector.y * scalar, z : vector.z * scalar, w : vector.w};
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// https://github.com/immersive-web/webxr-test-api
|
||||
|
||||
|
||||
let default_standing = new gfx.mojom.Transform();
|
||||
const default_standing = new gfx.mojom.Transform();
|
||||
default_standing.matrix = [1, 0, 0, 0,
|
||||
0, 1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
|
@ -15,26 +15,26 @@ const default_stage_parameters = {
|
|||
};
|
||||
|
||||
function getMatrixFromTransform(transform) {
|
||||
let x = transform.orientation[0];
|
||||
let y = transform.orientation[1];
|
||||
let z = transform.orientation[2];
|
||||
let w = transform.orientation[3];
|
||||
const x = transform.orientation[0];
|
||||
const y = transform.orientation[1];
|
||||
const z = transform.orientation[2];
|
||||
const w = transform.orientation[3];
|
||||
|
||||
let m11 = 1.0 - 2.0 * (y * y + z * z);
|
||||
let m21 = 2.0 * (x * y + z * w);
|
||||
let m31 = 2.0 * (x * z - y * w);
|
||||
const m11 = 1.0 - 2.0 * (y * y + z * z);
|
||||
const m21 = 2.0 * (x * y + z * w);
|
||||
const m31 = 2.0 * (x * z - y * w);
|
||||
|
||||
let m12 = 2.0 * (x * y - z * w);
|
||||
let m22 = 1.0 - 2.0 * (x * x + z * z);
|
||||
let m32 = 2.0 * (y * z + x * w);
|
||||
const m12 = 2.0 * (x * y - z * w);
|
||||
const m22 = 1.0 - 2.0 * (x * x + z * z);
|
||||
const m32 = 2.0 * (y * z + x * w);
|
||||
|
||||
let m13 = 2.0 * (x * z + y * w);
|
||||
let m23 = 2.0 * (y * z - x * w);
|
||||
let m33 = 1.0 - 2.0 * (x * x + y * y);
|
||||
const m13 = 2.0 * (x * z + y * w);
|
||||
const m23 = 2.0 * (y * z - x * w);
|
||||
const m33 = 1.0 - 2.0 * (x * x + y * y);
|
||||
|
||||
let m14 = transform.position[0];
|
||||
let m24 = transform.position[1];
|
||||
let m34 = transform.position[2];
|
||||
const m14 = transform.position[0];
|
||||
const m24 = transform.position[1];
|
||||
const m34 = transform.position[2];
|
||||
|
||||
// Column-major linearized order is expected.
|
||||
return [m11, m21, m31, 0,
|
||||
|
@ -44,7 +44,7 @@ function getMatrixFromTransform(transform) {
|
|||
}
|
||||
|
||||
function composeGFXTransform(fakeTransformInit) {
|
||||
let transform = new gfx.mojom.Transform();
|
||||
const transform = new gfx.mojom.Transform();
|
||||
transform.matrix = getMatrixFromTransform(fakeTransformInit);
|
||||
return transform;
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class ChromeXRTest {
|
|||
}
|
||||
|
||||
simulateUserActivation(callback) {
|
||||
let button = document.createElement('button');
|
||||
const button = document.createElement('button');
|
||||
button.textContent = 'click to continue test';
|
||||
button.style.display = 'block';
|
||||
button.style.fontSize = '20px';
|
||||
|
@ -95,7 +95,7 @@ class MockVRService {
|
|||
|
||||
// Test methods
|
||||
addRuntime(fakeDeviceInit) {
|
||||
let runtime = new MockRuntime(fakeDeviceInit, this);
|
||||
const runtime = new MockRuntime(fakeDeviceInit, this);
|
||||
this.runtimes_.push(runtime);
|
||||
|
||||
if (this.client_) {
|
||||
|
@ -114,7 +114,7 @@ class MockVRService {
|
|||
}
|
||||
|
||||
removeRuntime(device) {
|
||||
let index = this.runtimes_.indexOf(device);
|
||||
const index = this.runtimes_.indexOf(device);
|
||||
if (index >= 0) {
|
||||
this.runtimes_.splice(index, 1);
|
||||
if (this.client_) {
|
||||
|
@ -132,7 +132,7 @@ class MockVRService {
|
|||
}
|
||||
|
||||
requestSession(sessionOptions, was_activation) {
|
||||
let requests = [];
|
||||
const requests = [];
|
||||
// Request a session from all the runtimes.
|
||||
for (let i = 0; i < this.runtimes_.length; i++) {
|
||||
requests[i] = this.runtimes_[i].requestRuntimeSession(sessionOptions);
|
||||
|
@ -143,12 +143,12 @@ class MockVRService {
|
|||
for (let i = 0; i < results.length; i++) {
|
||||
if (results[i].session) {
|
||||
// Construct a dummy metrics recorder
|
||||
let metricsRecorderPtr = new device.mojom.XRSessionMetricsRecorderPtr();
|
||||
let metricsRecorderRequest = mojo.makeRequest(metricsRecorderPtr);
|
||||
let metricsRecorderBinding = new mojo.Binding(
|
||||
const metricsRecorderPtr = new device.mojom.XRSessionMetricsRecorderPtr();
|
||||
const metricsRecorderRequest = mojo.makeRequest(metricsRecorderPtr);
|
||||
const metricsRecorderBinding = new mojo.Binding(
|
||||
device.mojom.XRSessionMetricsRecorder, new MockXRSessionMetricsRecorder(), metricsRecorderRequest);
|
||||
|
||||
let success = {
|
||||
const success = {
|
||||
session: results[i].session,
|
||||
metricsRecorder: metricsRecorderPtr,
|
||||
};
|
||||
|
@ -177,7 +177,7 @@ class MockVRService {
|
|||
}
|
||||
|
||||
supportsSession(sessionOptions) {
|
||||
let requests = [];
|
||||
const requests = [];
|
||||
// Check supports on all the runtimes.
|
||||
for (let i = 0; i < this.runtimes_.length; i++) {
|
||||
requests[i] = this.runtimes_[i].runtimeSupportsSession(sessionOptions);
|
||||
|
@ -194,7 +194,7 @@ class MockVRService {
|
|||
// If there were no successful results, returns false.
|
||||
return {supportsSession: false};
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Implements XRFrameDataProvider and XRPresentationProvider. Maintains a mock
|
||||
|
@ -207,7 +207,8 @@ class MockRuntime {
|
|||
"local": device.mojom.XRSessionFeature.REF_SPACE_LOCAL,
|
||||
"local-floor": device.mojom.XRSessionFeature.REF_SPACE_LOCAL_FLOOR,
|
||||
"bounded-floor": device.mojom.XRSessionFeature.REF_SPACE_BOUNDED_FLOOR,
|
||||
"unbounded": device.mojom.XRSessionFeature.REF_SPACE_UNBOUNDED };
|
||||
"unbounded": device.mojom.XRSessionFeature.REF_SPACE_UNBOUNDED,
|
||||
};
|
||||
|
||||
static sessionModeToMojoMap = {
|
||||
"inline": device.mojom.XRSessionMode.kInline,
|
||||
|
@ -292,8 +293,9 @@ class MockRuntime {
|
|||
}
|
||||
|
||||
_convertModeToEnum(sessionMode) {
|
||||
if(sessionMode in MockRuntime.sessionModeToMojoMap)
|
||||
if (sessionMode in MockRuntime.sessionModeToMojoMap) {
|
||||
return MockRuntime.sessionModeToMojoMap[sessionMode];
|
||||
}
|
||||
|
||||
throw new TypeError("Unrecognized value for XRSessionMode enum: " + sessionMode);
|
||||
}
|
||||
|
@ -333,8 +335,8 @@ class MockRuntime {
|
|||
}
|
||||
|
||||
setViewerOrigin(origin, emulatedPosition = false) {
|
||||
let p = origin.position;
|
||||
let q = origin.orientation;
|
||||
const p = origin.position;
|
||||
const q = origin.orientation;
|
||||
this.pose_ = {
|
||||
orientation: { x: q[0], y: q[1], z: q[2], w: q[3] },
|
||||
position: { x: p[0], y: p[1], z: p[2] },
|
||||
|
@ -422,17 +424,17 @@ class MockRuntime {
|
|||
}
|
||||
|
||||
simulateInputSourceConnection(fakeInputSourceInit) {
|
||||
let index = this.next_input_source_index_;
|
||||
const index = this.next_input_source_index_;
|
||||
this.next_input_source_index_++;
|
||||
|
||||
let source = new MockXRInputSource(fakeInputSourceInit, index, this);
|
||||
const source = new MockXRInputSource(fakeInputSourceInit, index, this);
|
||||
this.input_sources_.set(index, source);
|
||||
return source;
|
||||
}
|
||||
|
||||
// Helper methods
|
||||
getNonImmersiveDisplayInfo() {
|
||||
let displayInfo = this.getImmersiveDisplayInfo();
|
||||
const displayInfo = this.getImmersiveDisplayInfo();
|
||||
|
||||
displayInfo.capabilities.canPresent = false;
|
||||
displayInfo.leftEye = null;
|
||||
|
@ -497,16 +499,16 @@ class MockRuntime {
|
|||
rightDegrees: fakeXRViewInit.fieldOfView.rightDegrees
|
||||
};
|
||||
} else {
|
||||
let m = fakeXRViewInit.projectionMatrix;
|
||||
const m = fakeXRViewInit.projectionMatrix;
|
||||
|
||||
function toDegrees(tan) {
|
||||
return Math.atan(tan) * 180 / Math.PI;
|
||||
}
|
||||
|
||||
let leftTan = (1 - m[8]) / m[0];
|
||||
let rightTan = (1 + m[8]) / m[0];
|
||||
let upTan = (1 + m[9]) / m[5];
|
||||
let downTan = (1 - m[9]) / m[5];
|
||||
const leftTan = (1 - m[8]) / m[0];
|
||||
const rightTan = (1 + m[8]) / m[0];
|
||||
const upTan = (1 + m[9]) / m[5];
|
||||
const downTan = (1 - m[9]) / m[5];
|
||||
|
||||
fov = {
|
||||
upDegrees: toDegrees(upTan),
|
||||
|
@ -536,7 +538,7 @@ class MockRuntime {
|
|||
this.supportedFeatures_ = [];
|
||||
|
||||
for (let i = 0; i < supportedFeatures.length; i++) {
|
||||
let feature = convertFeatureToMojom(supportedFeatures[i]);
|
||||
const feature = convertFeatureToMojom(supportedFeatures[i]);
|
||||
if (feature !== device.mojom.XRSessionFeature.INVALID) {
|
||||
this.supportedFeatures_.push(feature);
|
||||
}
|
||||
|
@ -554,14 +556,16 @@ class MockRuntime {
|
|||
this.input_sources_.delete(source.source_id_);
|
||||
}
|
||||
|
||||
// Mojo function implementations.
|
||||
// Extension point for non-standard modules.
|
||||
|
||||
_injectAdditionalFrameData(options, frameData) {
|
||||
}
|
||||
|
||||
// Mojo function implementations.
|
||||
|
||||
// XRFrameDataProvider implementation.
|
||||
getFrameData(options) {
|
||||
let mojo_space_reset = this.send_mojo_space_reset_;
|
||||
const mojo_space_reset = this.send_mojo_space_reset_;
|
||||
this.send_mojo_space_reset_ = false;
|
||||
if (this.pose_) {
|
||||
this.pose_.poseIndex++;
|
||||
|
@ -574,18 +578,18 @@ class MockRuntime {
|
|||
let input_state = null;
|
||||
if (this.input_sources_.size > 0) {
|
||||
input_state = [];
|
||||
for (let input_source of this.input_sources_.values()) {
|
||||
for (const input_source of this.input_sources_.values()) {
|
||||
input_state.push(input_source.getInputSourceState());
|
||||
}
|
||||
}
|
||||
|
||||
// Convert current document time to monotonic time.
|
||||
let now = window.performance.now() / 1000.0;
|
||||
let diff = now - internals.monotonicTimeToZeroBasedDocumentTime(now);
|
||||
const diff = now - internals.monotonicTimeToZeroBasedDocumentTime(now);
|
||||
now += diff;
|
||||
now *= 1000000;
|
||||
|
||||
let frameData = {
|
||||
const frameData = {
|
||||
pose: this.pose_,
|
||||
mojoSpaceReset: mojo_space_reset,
|
||||
inputState: input_state,
|
||||
|
@ -597,10 +601,10 @@ class MockRuntime {
|
|||
bufferSize: {},
|
||||
};
|
||||
|
||||
this._injectAdditionalFrameData(options, frameData);
|
||||
|
||||
this._calculateHitTestResults(frameData);
|
||||
|
||||
this._injectAdditionalFrameData(options, frameData);
|
||||
|
||||
return Promise.resolve({
|
||||
frameData: frameData,
|
||||
});
|
||||
|
@ -677,7 +681,7 @@ class MockRuntime {
|
|||
requestRuntimeSession(sessionOptions) {
|
||||
return this.runtimeSupportsSession(sessionOptions).then((result) => {
|
||||
// The JavaScript bindings convert c_style_names to camelCase names.
|
||||
let options = new device.mojom.XRPresentationTransportOptions();
|
||||
const options = new device.mojom.XRPresentationTransportOptions();
|
||||
options.transportMethod =
|
||||
device.mojom.XRPresentationTransportMethod.SUBMIT_AS_MAILBOX_HOLDER;
|
||||
options.waitForTransferNotification = true;
|
||||
|
@ -691,14 +695,14 @@ class MockRuntime {
|
|||
transportOptions: options
|
||||
};
|
||||
|
||||
let dataProviderPtr = new device.mojom.XRFrameDataProviderPtr();
|
||||
let dataProviderRequest = mojo.makeRequest(dataProviderPtr);
|
||||
const dataProviderPtr = new device.mojom.XRFrameDataProviderPtr();
|
||||
const dataProviderRequest = mojo.makeRequest(dataProviderPtr);
|
||||
this.dataProviderBinding_ = new mojo.Binding(
|
||||
device.mojom.XRFrameDataProvider, this, dataProviderRequest);
|
||||
|
||||
let clientReceiver = mojo.makeRequest(this.sessionClient_);
|
||||
const clientReceiver = mojo.makeRequest(this.sessionClient_);
|
||||
|
||||
let enabled_features = [];
|
||||
const enabled_features = [];
|
||||
for (let i = 0; i < sessionOptions.requiredFeatures.length; i++) {
|
||||
if (this.supportedFeatures_.indexOf(sessionOptions.requiredFeatures[i]) !== -1) {
|
||||
enabled_features.push(sessionOptions.requiredFeatures[i]);
|
||||
|
@ -785,7 +789,7 @@ class MockRuntime {
|
|||
}
|
||||
|
||||
return result.sort((lhs, rhs) => lhs.distance - rhs.distance);
|
||||
};
|
||||
}
|
||||
|
||||
// Hit tests the passed in ray (expressed as origin and direction) against world region.
|
||||
// |entityTypes| is a set of FakeXRRegionTypes.
|
||||
|
@ -1097,10 +1101,10 @@ class MockXRInputSource {
|
|||
return;
|
||||
}
|
||||
|
||||
let supported_button_map = {};
|
||||
const supported_button_map = {};
|
||||
this.gamepad_ = this.getEmptyGamepad();
|
||||
for (let i = 0; i < supportedButtons.length; i++) {
|
||||
let buttonType = supportedButtons[i].buttonType;
|
||||
const buttonType = supportedButtons[i].buttonType;
|
||||
this.supported_buttons_.push(buttonType);
|
||||
supported_button_map[buttonType] = supportedButtons[i];
|
||||
}
|
||||
|
@ -1127,7 +1131,7 @@ class MockXRInputSource {
|
|||
pressed: false,
|
||||
touched: false,
|
||||
value: 0
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1143,8 +1147,8 @@ class MockXRInputSource {
|
|||
throw new Error("Tried to update state on an unsupported button");
|
||||
}
|
||||
|
||||
let buttonIndex = this.getButtonIndex(buttonState.buttonType);
|
||||
let axesStartIndex = this.getAxesStartIndex(buttonState.buttonType);
|
||||
const buttonIndex = this.getButtonIndex(buttonState.buttonType);
|
||||
const axesStartIndex = this.getAxesStartIndex(buttonState.buttonType);
|
||||
|
||||
if (buttonIndex == -1) {
|
||||
throw new Error("Unknown Button Type!");
|
||||
|
@ -1162,7 +1166,7 @@ class MockXRInputSource {
|
|||
|
||||
// Helpers for Mojom
|
||||
getInputSourceState() {
|
||||
let input_state = new device.mojom.XRInputSourceState();
|
||||
const input_state = new device.mojom.XRInputSourceState();
|
||||
|
||||
input_state.sourceId = this.source_id_;
|
||||
|
||||
|
@ -1180,7 +1184,7 @@ class MockXRInputSource {
|
|||
input_state.emulatedPosition = this.emulated_position_;
|
||||
|
||||
if (this.desc_dirty_) {
|
||||
let input_desc = new device.mojom.XRInputSourceDescription();
|
||||
const input_desc = new device.mojom.XRInputSourceDescription();
|
||||
|
||||
switch (this.target_ray_mode_) {
|
||||
case 'gaze':
|
||||
|
@ -1223,7 +1227,7 @@ class MockXRInputSource {
|
|||
getEmptyGamepad() {
|
||||
// Mojo complains if some of the properties on Gamepad are null, so set
|
||||
// everything to reasonable defaults that tests can override.
|
||||
let gamepad = new device.mojom.Gamepad();
|
||||
const gamepad = new device.mojom.Gamepad();
|
||||
gamepad.connected = true;
|
||||
gamepad.id = "";
|
||||
gamepad.timestamp = 0;
|
||||
|
@ -1252,8 +1256,8 @@ class MockXRInputSource {
|
|||
return;
|
||||
}
|
||||
|
||||
let buttonIndex = this.getButtonIndex(buttonState.buttonType);
|
||||
let axesStartIndex = this.getAxesStartIndex(buttonState.buttonType);
|
||||
const buttonIndex = this.getButtonIndex(buttonState.buttonType);
|
||||
const axesStartIndex = this.getAxesStartIndex(buttonState.buttonType);
|
||||
|
||||
if (buttonIndex == -1) {
|
||||
throw new Error("Unknown Button Type!");
|
||||
|
@ -1314,8 +1318,8 @@ class MockXRPresentationProvider {
|
|||
}
|
||||
|
||||
bindProvider(request) {
|
||||
let providerPtr = new device.mojom.XRPresentationProviderPtr();
|
||||
let providerRequest = mojo.makeRequest(providerPtr);
|
||||
const providerPtr = new device.mojom.XRPresentationProviderPtr();
|
||||
const providerRequest = mojo.makeRequest(providerPtr);
|
||||
|
||||
this.binding_.close();
|
||||
|
||||
|
@ -1356,7 +1360,7 @@ class MockXRPresentationProvider {
|
|||
// This is a temporary workaround for the fact that spinning up webxr before
|
||||
// the mojo interceptors are created will cause the interceptors to not get
|
||||
// registered, so we have to create this before we query xr;
|
||||
let XRTest = new ChromeXRTest();
|
||||
const XRTest = new ChromeXRTest();
|
||||
|
||||
// This test API is also used to run Chrome's internal legacy VR tests; however,
|
||||
// those fail if navigator.xr has been used. Those tests will set a bool telling
|
||||
|
|
|
@ -70,8 +70,17 @@
|
|||
// Now do some scrolling and make sure that the Animation current time is
|
||||
// correct.
|
||||
scroller.scrollTop = 0.2 * maxScroll;
|
||||
// TODO(crbug.com/944449): After scroll offset snapshotting is implemented,
|
||||
// scroll timeline current time, animation current time and effect local
|
||||
// time will be updated on the same frame (which in this case will be the
|
||||
// next frame).
|
||||
assert_equals(animation.currentTime, animation.timeline.currentTime,
|
||||
"The current time corresponds to the scroll position of the scroller.");
|
||||
await waitForNextFrame();
|
||||
assert_times_equal(
|
||||
animation.effect.getComputedTiming().localTime,
|
||||
animation.timeline.currentTime,
|
||||
'Effect local time corresponds to the scroll position of the scroller.');
|
||||
}, 'Animation start and current times are correct for each animation state.');
|
||||
|
||||
promise_test(async t => {
|
||||
|
|
26
tests/wpt/web-platform-tests/webgpu/LICENSE.txt
Normal file
26
tests/wpt/web-platform-tests/webgpu/LICENSE.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
Copyright 2019 WebGPU CTS Contributors
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
299
tests/wpt/web-platform-tests/webgpu/constants.js
Normal file
299
tests/wpt/web-platform-tests/webgpu/constants.js
Normal file
|
@ -0,0 +1,299 @@
|
|||
/**
|
||||
* AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts
|
||||
**/
|
||||
|
||||
// https://github.com/gpuweb/gpuweb/blob/402b69138fbedf4a3c9c85cd1bf7e1cc27c1b34e/spec/index.bs
|
||||
// String enums
|
||||
export let ExtensionName;
|
||||
|
||||
(function (ExtensionName) {
|
||||
ExtensionName["AnisotropicFiltering"] = "anisotropic-filtering";
|
||||
})(ExtensionName || (ExtensionName = {}));
|
||||
|
||||
export let AddressMode;
|
||||
|
||||
(function (AddressMode) {
|
||||
AddressMode["ClampToEdge"] = "clamp-to-edge";
|
||||
AddressMode["Repeat"] = "repeat";
|
||||
AddressMode["MirrorRepeat"] = "mirror-repeat";
|
||||
})(AddressMode || (AddressMode = {}));
|
||||
|
||||
export let BindingType;
|
||||
|
||||
(function (BindingType) {
|
||||
BindingType["UniformBuffer"] = "uniform-buffer";
|
||||
BindingType["StorageBuffer"] = "storage-buffer";
|
||||
BindingType["ReadonlyStorageBuffer"] = "readonly-storage-buffer";
|
||||
BindingType["Sampler"] = "sampler";
|
||||
BindingType["SampledTexture"] = "sampled-texture";
|
||||
BindingType["StorageTexture"] = "storage-texture";
|
||||
})(BindingType || (BindingType = {}));
|
||||
|
||||
export let BlendFactor;
|
||||
|
||||
(function (BlendFactor) {
|
||||
BlendFactor["Zero"] = "zero";
|
||||
BlendFactor["One"] = "one";
|
||||
BlendFactor["SrcColor"] = "src-color";
|
||||
BlendFactor["OneMinusSrcColor"] = "one-minus-src-color";
|
||||
BlendFactor["SrcAlpha"] = "src-alpha";
|
||||
BlendFactor["OneMinusSrcAlpha"] = "one-minus-src-alpha";
|
||||
BlendFactor["DstColor"] = "dst-color";
|
||||
BlendFactor["OneMinusDstColor"] = "one-minus-dst-color";
|
||||
BlendFactor["DstAlpha"] = "dst-alpha";
|
||||
BlendFactor["OneMinusDstAlpha"] = "one-minus-dst-alpha";
|
||||
BlendFactor["SrcAlphaSaturated"] = "src-alpha-saturated";
|
||||
BlendFactor["BlendColor"] = "blend-color";
|
||||
BlendFactor["OneMinusBlendColor"] = "one-minus-blend-color";
|
||||
})(BlendFactor || (BlendFactor = {}));
|
||||
|
||||
export let BlendOperation;
|
||||
|
||||
(function (BlendOperation) {
|
||||
BlendOperation["Add"] = "add";
|
||||
BlendOperation["Subtract"] = "subtract";
|
||||
BlendOperation["ReverseSubtract"] = "reverse-subtract";
|
||||
BlendOperation["Min"] = "min";
|
||||
BlendOperation["Max"] = "max";
|
||||
})(BlendOperation || (BlendOperation = {}));
|
||||
|
||||
export let CompareFunction;
|
||||
|
||||
(function (CompareFunction) {
|
||||
CompareFunction["Never"] = "never";
|
||||
CompareFunction["Less"] = "less";
|
||||
CompareFunction["Equal"] = "equal";
|
||||
CompareFunction["LessEqual"] = "less-equal";
|
||||
CompareFunction["Greater"] = "greater";
|
||||
CompareFunction["NotEqual"] = "not-equal";
|
||||
CompareFunction["GreaterEqual"] = "greater-equal";
|
||||
CompareFunction["Always"] = "always";
|
||||
})(CompareFunction || (CompareFunction = {}));
|
||||
|
||||
export let CullMode;
|
||||
|
||||
(function (CullMode) {
|
||||
CullMode["None"] = "none";
|
||||
CullMode["Front"] = "front";
|
||||
CullMode["Back"] = "back";
|
||||
})(CullMode || (CullMode = {}));
|
||||
|
||||
export let FilterMode;
|
||||
|
||||
(function (FilterMode) {
|
||||
FilterMode["Nearest"] = "nearest";
|
||||
FilterMode["Linear"] = "linear";
|
||||
})(FilterMode || (FilterMode = {}));
|
||||
|
||||
export let FrontFace;
|
||||
|
||||
(function (FrontFace) {
|
||||
FrontFace["CCW"] = "ccw";
|
||||
FrontFace["CW"] = "cw";
|
||||
})(FrontFace || (FrontFace = {}));
|
||||
|
||||
export let IndexFormat;
|
||||
|
||||
(function (IndexFormat) {
|
||||
IndexFormat["Uint16"] = "uint16";
|
||||
IndexFormat["Uint32"] = "uint32";
|
||||
})(IndexFormat || (IndexFormat = {}));
|
||||
|
||||
export let InputStepMode;
|
||||
|
||||
(function (InputStepMode) {
|
||||
InputStepMode["Vertex"] = "vertex";
|
||||
InputStepMode["Instance"] = "instance";
|
||||
})(InputStepMode || (InputStepMode = {}));
|
||||
|
||||
export let LoadOp;
|
||||
|
||||
(function (LoadOp) {
|
||||
LoadOp["Load"] = "load";
|
||||
})(LoadOp || (LoadOp = {}));
|
||||
|
||||
export let PrimitiveTopology;
|
||||
|
||||
(function (PrimitiveTopology) {
|
||||
PrimitiveTopology["PointList"] = "point-list";
|
||||
PrimitiveTopology["LineList"] = "line-list";
|
||||
PrimitiveTopology["LineStrip"] = "line-strip";
|
||||
PrimitiveTopology["TriangleList"] = "triangle-list";
|
||||
PrimitiveTopology["TriangleStrip"] = "triangle-strip";
|
||||
})(PrimitiveTopology || (PrimitiveTopology = {}));
|
||||
|
||||
export let StencilOperation;
|
||||
|
||||
(function (StencilOperation) {
|
||||
StencilOperation["Keep"] = "keep";
|
||||
StencilOperation["Zero"] = "zero";
|
||||
StencilOperation["Replace"] = "replace";
|
||||
StencilOperation["Invert"] = "invert";
|
||||
StencilOperation["IncrementClamp"] = "increment-clamp";
|
||||
StencilOperation["DecrementClamp"] = "decrement-clamp";
|
||||
StencilOperation["IncrementWrap"] = "increment-wrap";
|
||||
StencilOperation["DecrementWrap"] = "decrement-wrap";
|
||||
})(StencilOperation || (StencilOperation = {}));
|
||||
|
||||
export let StoreOp;
|
||||
|
||||
(function (StoreOp) {
|
||||
StoreOp["Store"] = "store";
|
||||
StoreOp["Clear"] = "clear";
|
||||
})(StoreOp || (StoreOp = {}));
|
||||
|
||||
export let TextureDimension;
|
||||
|
||||
(function (TextureDimension) {
|
||||
TextureDimension["E1d"] = "1d";
|
||||
TextureDimension["E2d"] = "2d";
|
||||
TextureDimension["E3d"] = "3d";
|
||||
})(TextureDimension || (TextureDimension = {}));
|
||||
|
||||
export let TextureFormat;
|
||||
|
||||
(function (TextureFormat) {
|
||||
TextureFormat["R8Unorm"] = "r8unorm";
|
||||
TextureFormat["R8Snorm"] = "r8snorm";
|
||||
TextureFormat["R8Uint"] = "r8uint";
|
||||
TextureFormat["R8Sint"] = "r8sint";
|
||||
TextureFormat["R16Uint"] = "r16uint";
|
||||
TextureFormat["R16Sint"] = "r16sint";
|
||||
TextureFormat["R16Float"] = "r16float";
|
||||
TextureFormat["RG8Unorm"] = "rg8unorm";
|
||||
TextureFormat["RG8Snorm"] = "rg8snorm";
|
||||
TextureFormat["RG8Uint"] = "rg8uint";
|
||||
TextureFormat["RG8Sint"] = "rg8sint";
|
||||
TextureFormat["R32Uint"] = "r32uint";
|
||||
TextureFormat["R32Sint"] = "r32sint";
|
||||
TextureFormat["R32Float"] = "r32float";
|
||||
TextureFormat["RG16Uint"] = "rg16uint";
|
||||
TextureFormat["RG16Sint"] = "rg16sint";
|
||||
TextureFormat["RG16Float"] = "rg16float";
|
||||
TextureFormat["RGBA8Unorm"] = "rgba8unorm";
|
||||
TextureFormat["RGBA8UnormSRGB"] = "rgba8unorm-srgb";
|
||||
TextureFormat["RGBA8Snorm"] = "rgba8snorm";
|
||||
TextureFormat["RGBA8Uint"] = "rgba8uint";
|
||||
TextureFormat["RGBA8Sint"] = "rgba8sint";
|
||||
TextureFormat["BGRA8Unorm"] = "bgra8unorm";
|
||||
TextureFormat["BGRA8UnormSRGB"] = "bgra8unorm-srgb";
|
||||
TextureFormat["RGB10A2Unorm"] = "rgb10a2unorm";
|
||||
TextureFormat["RGB11B10Float"] = "rg11b10float";
|
||||
TextureFormat["RG32Uint"] = "rg32uint";
|
||||
TextureFormat["RG32Sint"] = "rg32sint";
|
||||
TextureFormat["RG32Float"] = "rg32float";
|
||||
TextureFormat["RGBA16Uint"] = "rgba16uint";
|
||||
TextureFormat["RGBA16Sint"] = "rgba16sint";
|
||||
TextureFormat["RGBA16Float"] = "rgba16float";
|
||||
TextureFormat["RGBA32Uint"] = "rgba32uint";
|
||||
TextureFormat["RGBA32Sint"] = "rgba32sint";
|
||||
TextureFormat["RGBA32Float"] = "rgba32float";
|
||||
TextureFormat["Depth32Float"] = "depth32float";
|
||||
TextureFormat["Depth24Plus"] = "depth24plus";
|
||||
TextureFormat["Depth24PlusStencil8"] = "depth24plus-stencil8";
|
||||
})(TextureFormat || (TextureFormat = {}));
|
||||
|
||||
export let TextureComponentType;
|
||||
|
||||
(function (TextureComponentType) {
|
||||
TextureComponentType["Float"] = "float";
|
||||
TextureComponentType["Sint"] = "sint";
|
||||
TextureComponentType["Uint"] = "uint";
|
||||
})(TextureComponentType || (TextureComponentType = {}));
|
||||
|
||||
export let TextureViewDimension;
|
||||
|
||||
(function (TextureViewDimension) {
|
||||
TextureViewDimension["E1d"] = "1d";
|
||||
TextureViewDimension["E2d"] = "2d";
|
||||
TextureViewDimension["E2dArray"] = "2d-array";
|
||||
TextureViewDimension["Cube"] = "cube";
|
||||
TextureViewDimension["CubeArray"] = "cube-array";
|
||||
TextureViewDimension["E3d"] = "3d";
|
||||
})(TextureViewDimension || (TextureViewDimension = {}));
|
||||
|
||||
export let VertexFormat;
|
||||
|
||||
(function (VertexFormat) {
|
||||
VertexFormat["Uchar2"] = "uchar2";
|
||||
VertexFormat["Uchar4"] = "uchar4";
|
||||
VertexFormat["Char2"] = "char2";
|
||||
VertexFormat["Char4"] = "char4";
|
||||
VertexFormat["Uchar2Norm"] = "uchar2norm";
|
||||
VertexFormat["Uchar4Norm"] = "uchar4norm";
|
||||
VertexFormat["Char2Norm"] = "char2norm";
|
||||
VertexFormat["Char4Norm"] = "char4norm";
|
||||
VertexFormat["Ushort2"] = "ushort2";
|
||||
VertexFormat["Ushort4"] = "ushort4";
|
||||
VertexFormat["Short2"] = "short2";
|
||||
VertexFormat["Short4"] = "short4";
|
||||
VertexFormat["Ushort2Norm"] = "ushort2norm";
|
||||
VertexFormat["Ushort4Norm"] = "ushort4norm";
|
||||
VertexFormat["Short2Norm"] = "short2norm";
|
||||
VertexFormat["Short4Norm"] = "short4norm";
|
||||
VertexFormat["Half2"] = "half2";
|
||||
VertexFormat["Half4"] = "half4";
|
||||
VertexFormat["Float"] = "float";
|
||||
VertexFormat["Float2"] = "float2";
|
||||
VertexFormat["Float3"] = "float3";
|
||||
VertexFormat["Float4"] = "float4";
|
||||
VertexFormat["Uint"] = "uint";
|
||||
VertexFormat["Uint2"] = "uint2";
|
||||
VertexFormat["Uint3"] = "uint3";
|
||||
VertexFormat["Uint4"] = "uint4";
|
||||
VertexFormat["Int"] = "int";
|
||||
VertexFormat["Int2"] = "int2";
|
||||
VertexFormat["Int3"] = "int3";
|
||||
VertexFormat["Int4"] = "int4";
|
||||
})(VertexFormat || (VertexFormat = {}));
|
||||
|
||||
export let TextureAspect; // Bit fields
|
||||
|
||||
(function (TextureAspect) {
|
||||
TextureAspect["All"] = "all";
|
||||
TextureAspect["StencilOnly"] = "stencil-only";
|
||||
TextureAspect["DepthOnly"] = "depth-only";
|
||||
})(TextureAspect || (TextureAspect = {}));
|
||||
|
||||
export let BufferUsage;
|
||||
|
||||
(function (BufferUsage) {
|
||||
BufferUsage[BufferUsage["MapRead"] = 1] = "MapRead";
|
||||
BufferUsage[BufferUsage["MapWrite"] = 2] = "MapWrite";
|
||||
BufferUsage[BufferUsage["CopySrc"] = 4] = "CopySrc";
|
||||
BufferUsage[BufferUsage["CopyDst"] = 8] = "CopyDst";
|
||||
BufferUsage[BufferUsage["Index"] = 16] = "Index";
|
||||
BufferUsage[BufferUsage["Vertex"] = 32] = "Vertex";
|
||||
BufferUsage[BufferUsage["Uniform"] = 64] = "Uniform";
|
||||
BufferUsage[BufferUsage["Storage"] = 128] = "Storage";
|
||||
BufferUsage[BufferUsage["Indirect"] = 256] = "Indirect";
|
||||
})(BufferUsage || (BufferUsage = {}));
|
||||
|
||||
export let ColorWrite;
|
||||
|
||||
(function (ColorWrite) {
|
||||
ColorWrite[ColorWrite["Red"] = 1] = "Red";
|
||||
ColorWrite[ColorWrite["Green"] = 2] = "Green";
|
||||
ColorWrite[ColorWrite["Blue"] = 4] = "Blue";
|
||||
ColorWrite[ColorWrite["Alpha"] = 8] = "Alpha";
|
||||
ColorWrite[ColorWrite["All"] = 15] = "All";
|
||||
})(ColorWrite || (ColorWrite = {}));
|
||||
|
||||
export let ShaderStage;
|
||||
|
||||
(function (ShaderStage) {
|
||||
ShaderStage[ShaderStage["Vertex"] = 1] = "Vertex";
|
||||
ShaderStage[ShaderStage["Fragment"] = 2] = "Fragment";
|
||||
ShaderStage[ShaderStage["Compute"] = 4] = "Compute";
|
||||
})(ShaderStage || (ShaderStage = {}));
|
||||
|
||||
export let TextureUsage;
|
||||
|
||||
(function (TextureUsage) {
|
||||
TextureUsage[TextureUsage["CopySrc"] = 1] = "CopySrc";
|
||||
TextureUsage[TextureUsage["CopyDst"] = 2] = "CopyDst";
|
||||
TextureUsage[TextureUsage["Sampled"] = 4] = "Sampled";
|
||||
TextureUsage[TextureUsage["Storage"] = 8] = "Storage";
|
||||
TextureUsage[TextureUsage["OutputAttachment"] = 16] = "OutputAttachment";
|
||||
})(TextureUsage || (TextureUsage = {}));
|
||||
//# sourceMappingURL=constants.js.map
|
|
@ -1,4 +1,4 @@
|
|||
<!-- AUTO-GENERATED - DO NOT EDIT. See gen_wpt_cts_html.ts. -->
|
||||
<!-- AUTO-GENERATED - DO NOT EDIT. See WebGPU CTS: tools/gen_wpt_cts_html. -->
|
||||
<!--
|
||||
This test suite is built from the TypeScript sources at:
|
||||
https://github.com/gpuweb/cts
|
||||
|
@ -11,15 +11,8 @@
|
|||
NOTE:
|
||||
The WPT version of this file is generated with *one variant per test spec
|
||||
file*. If your harness needs more fine-grained suppressions, you'll need to
|
||||
generate your own variants list from your suppression list. For example, if
|
||||
test file cts:a/b: has 3 tests and you need to suppress a single case, you
|
||||
might break it out into the following variants:
|
||||
|
||||
- cts:a/b:test1~
|
||||
- cts:a/b:test2={"x":1}
|
||||
- cts:a/b:test2={"x":2} // <- suppress this one
|
||||
- cts:a/b:test2={"x":3}
|
||||
- cts:a/b:test3~
|
||||
generate your own variants list from your suppression list.
|
||||
See `tools/gen_wpt_cts_html` to do this.
|
||||
|
||||
When run under browser CI, the original cts.html should be skipped, and
|
||||
this alternate version should be run instead, under a non-exported WPT test
|
||||
|
@ -54,37 +47,36 @@
|
|||
|
||||
<textarea id=results></textarea>
|
||||
<script type=module src=/webgpu/runtime/wpt.js></script>
|
||||
|
||||
<meta name=variant content='?q=cts:buffers/create_mapped:'>
|
||||
<meta name=variant content='?q=cts:buffers/map:'>
|
||||
<meta name=variant content='?q=cts:buffers/map_detach:'>
|
||||
<meta name=variant content='?q=cts:buffers/map_oom:'>
|
||||
<meta name=variant content='?q=cts:canvas/context_creation:'>
|
||||
<meta name=variant content='?q=cts:command_buffer/basic:'>
|
||||
<meta name=variant content='?q=cts:command_buffer/compute/basic:'>
|
||||
<meta name=variant content='?q=cts:command_buffer/copies:'>
|
||||
<meta name=variant content='?q=cts:command_buffer/render/basic:'>
|
||||
<meta name=variant content='?q=cts:command_buffer/render/rendering:'>
|
||||
<meta name=variant content='?q=cts:command_buffer/render/storeop:'>
|
||||
<meta name=variant content='?q=cts:copyImageBitmapToTexture:'>
|
||||
<meta name=variant content='?q=cts:examples:'>
|
||||
<meta name=variant content='?q=cts:fences:'>
|
||||
<meta name=variant content='?q=cts:resource_init/sampled_texture_clear:'>
|
||||
<meta name=variant content='?q=cts:validation/createBindGroup:'>
|
||||
<meta name=variant content='?q=cts:validation/createBindGroupLayout:'>
|
||||
<meta name=variant content='?q=cts:validation/createPipelineLayout:'>
|
||||
<meta name=variant content='?q=cts:validation/createRenderPipeline:'>
|
||||
<meta name=variant content='?q=cts:validation/createTexture:'>
|
||||
<meta name=variant content='?q=cts:validation/createView:'>
|
||||
<meta name=variant content='?q=cts:validation/error_scope:'>
|
||||
<meta name=variant content='?q=cts:validation/fences:'>
|
||||
<meta name=variant content='?q=cts:validation/queue_submit:'>
|
||||
<meta name=variant content='?q=cts:validation/render_pass:'>
|
||||
<meta name=variant content='?q=cts:validation/render_pass_descriptor:'>
|
||||
<meta name=variant content='?q=cts:validation/setBindGroup:'>
|
||||
<meta name=variant content='?q=cts:validation/setBlendColor:'>
|
||||
<meta name=variant content='?q=cts:validation/setScissorRect:'>
|
||||
<meta name=variant content='?q=cts:validation/setStencilReference:'>
|
||||
<meta name=variant content='?q=cts:validation/setVertexBuffer:'>
|
||||
<meta name=variant content='?q=cts:validation/setViewport:'>
|
||||
<meta name=variant content='?q=cts:validation/vertex_state:'>
|
||||
<meta name=variant content='?q=cts:buffers/create_mapped'>
|
||||
<meta name=variant content='?q=cts:buffers/map'>
|
||||
<meta name=variant content='?q=cts:buffers/map_detach'>
|
||||
<meta name=variant content='?q=cts:buffers/map_oom'>
|
||||
<meta name=variant content='?q=cts:canvas/context_creation'>
|
||||
<meta name=variant content='?q=cts:command_buffer/basic'>
|
||||
<meta name=variant content='?q=cts:command_buffer/compute/basic'>
|
||||
<meta name=variant content='?q=cts:command_buffer/copies'>
|
||||
<meta name=variant content='?q=cts:command_buffer/render/basic'>
|
||||
<meta name=variant content='?q=cts:command_buffer/render/rendering'>
|
||||
<meta name=variant content='?q=cts:command_buffer/render/storeop'>
|
||||
<meta name=variant content='?q=cts:copyImageBitmapToTexture'>
|
||||
<meta name=variant content='?q=cts:examples'>
|
||||
<meta name=variant content='?q=cts:fences'>
|
||||
<meta name=variant content='?q=cts:resource_init/sampled_texture_clear'>
|
||||
<meta name=variant content='?q=cts:validation/createBindGroup'>
|
||||
<meta name=variant content='?q=cts:validation/createBindGroupLayout'>
|
||||
<meta name=variant content='?q=cts:validation/createPipelineLayout'>
|
||||
<meta name=variant content='?q=cts:validation/createRenderPipeline'>
|
||||
<meta name=variant content='?q=cts:validation/createTexture'>
|
||||
<meta name=variant content='?q=cts:validation/createView'>
|
||||
<meta name=variant content='?q=cts:validation/error_scope'>
|
||||
<meta name=variant content='?q=cts:validation/fences'>
|
||||
<meta name=variant content='?q=cts:validation/queue_submit'>
|
||||
<meta name=variant content='?q=cts:validation/render_pass'>
|
||||
<meta name=variant content='?q=cts:validation/render_pass_descriptor'>
|
||||
<meta name=variant content='?q=cts:validation/setBindGroup'>
|
||||
<meta name=variant content='?q=cts:validation/setBlendColor'>
|
||||
<meta name=variant content='?q=cts:validation/setScissorRect'>
|
||||
<meta name=variant content='?q=cts:validation/setStencilReference'>
|
||||
<meta name=variant content='?q=cts:validation/setVertexBuffer'>
|
||||
<meta name=variant content='?q=cts:validation/setViewport'>
|
||||
<meta name=variant content='?q=cts:validation/vertex_state'>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
import { assert } from './util/index.js';
|
||||
export class SkipTestCase extends Error {} // A Fixture is a class used to instantiate each test case at run time.
|
||||
// A new instance of the Fixture is created for every single test case
|
||||
// (i.e. every time the test function is run).
|
||||
|
@ -35,10 +36,7 @@ export class Fixture {
|
|||
}
|
||||
|
||||
async finalize() {
|
||||
if (this.numOutstandingAsyncExpectations !== 0) {
|
||||
throw new Error('there were outstanding asynchronous expectations (e.g. shouldReject) at the end of the test');
|
||||
}
|
||||
|
||||
assert(this.numOutstandingAsyncExpectations === 0, 'there were outstanding asynchronous expectations (e.g. shouldReject) at the end of the test');
|
||||
await Promise.all(this.eventualExpectations);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
/**
|
||||
* AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts
|
||||
**/
|
||||
|
||||
import { Logger } from './logger.js';
|
||||
import { makeFilter } from './test_filter/index.js';
|
||||
import { treeFromFilterResults } from './tree.js';
|
||||
|
||||
function makeQuerySplitterTree(caselist, expectationStrings) {
|
||||
const expectations = [];
|
||||
|
||||
for (const e of expectationStrings) {
|
||||
const filter = makeFilter(e);
|
||||
const id = filter.idIfSingle();
|
||||
|
||||
if (!id) {
|
||||
throw new Error('Can only handle expectations which cover one file, one test, or one case. ' + e);
|
||||
}
|
||||
|
||||
expectations.push({
|
||||
id,
|
||||
line: e,
|
||||
seen: false
|
||||
});
|
||||
}
|
||||
|
||||
const convertToQuerySplitterTree = (tree, name) => {
|
||||
const children = tree.children;
|
||||
let needsSplit = true;
|
||||
|
||||
if (name !== undefined) {
|
||||
const filter = makeFilter(name);
|
||||
const moreThanOneFile = !filter.definitelyOneFile();
|
||||
const matchingExpectations = expectations.map(e => {
|
||||
const matches = filter.matches(e.id);
|
||||
if (matches) e.seen = true;
|
||||
return matches;
|
||||
});
|
||||
needsSplit = matchingExpectations.some(m => m) || moreThanOneFile;
|
||||
}
|
||||
|
||||
const queryNode = {
|
||||
needsSplit
|
||||
};
|
||||
|
||||
if (children) {
|
||||
queryNode.children = new Map();
|
||||
|
||||
for (const [k, v] of children) {
|
||||
const subtree = convertToQuerySplitterTree(v, k);
|
||||
queryNode.children.set(k, subtree);
|
||||
}
|
||||
}
|
||||
|
||||
return queryNode;
|
||||
};
|
||||
|
||||
const log = new Logger();
|
||||
const tree = treeFromFilterResults(log, caselist.values());
|
||||
const queryTree = convertToQuerySplitterTree(tree);
|
||||
|
||||
for (const e of expectations) {
|
||||
if (!e.seen) throw new Error('expectation had no effect: ' + e.line);
|
||||
}
|
||||
|
||||
return queryTree;
|
||||
} // Takes a TestFilterResultIterator enumerating every test case in the suite, and a list of
|
||||
// expectation queries from a browser's expectations file. Creates a minimal list of queries
|
||||
// (i.e. wpt variant lines) such that:
|
||||
//
|
||||
// - There is at least one query per spec file.
|
||||
// - Each of those those input queries is in the output, so that it can have its own expectation.
|
||||
//
|
||||
// It does this by creating a tree from the list of cases (same tree as the standalone runner uses),
|
||||
// then marking every node which is a parent of a node that matches an expectation.
|
||||
|
||||
|
||||
export async function generateMinimalQueryList(caselist, expectationStrings) {
|
||||
const unsplitNodes = [];
|
||||
|
||||
const findUnsplitNodes = (name, node) => {
|
||||
if (node === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (node.needsSplit && node.children) {
|
||||
for (const [k, v] of node.children) {
|
||||
findUnsplitNodes(k, v);
|
||||
}
|
||||
} else {
|
||||
unsplitNodes.push(name);
|
||||
}
|
||||
};
|
||||
|
||||
const queryTree = makeQuerySplitterTree(caselist, expectationStrings);
|
||||
findUnsplitNodes('', queryTree);
|
||||
|
||||
for (const exp of expectationStrings) {
|
||||
if (!unsplitNodes.some(name => name === exp)) {
|
||||
throw new Error('Something went wrong: all expectation strings should always appear exactly: ' + exp);
|
||||
}
|
||||
}
|
||||
|
||||
return unsplitNodes;
|
||||
}
|
||||
//# sourceMappingURL=generate_minimal_query_list.js.map
|
|
@ -3,16 +3,14 @@
|
|||
**/
|
||||
|
||||
/// <reference types="@webgpu/types" />
|
||||
import { assert } from '../util/index.js';
|
||||
let impl = undefined;
|
||||
export function getGPU() {
|
||||
if (impl) {
|
||||
return impl;
|
||||
}
|
||||
|
||||
if (typeof navigator === 'undefined' || navigator.gpu === undefined) {
|
||||
throw new Error('No WebGPU implementation found');
|
||||
}
|
||||
|
||||
assert(typeof navigator !== 'undefined' && navigator.gpu !== undefined, 'No WebGPU implementation found');
|
||||
impl = navigator.gpu;
|
||||
return impl;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
/**
|
||||
* AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts
|
||||
**/
|
||||
|
||||
export function testSpecEquals(x, y) {
|
||||
return x.suite === y.suite && x.path === y.path;
|
||||
} // Identifies a test case (a specific parameterization of a test), within its spec file.
|
||||
//# sourceMappingURL=id.js.map
|
|
@ -5,5 +5,8 @@
|
|||
export * from './fixture.js';
|
||||
export * from './params/index.js';
|
||||
export * from './test_group.js';
|
||||
export * from './util/index.js';
|
||||
export * from './util/index.js'; // Well-typed WebGPU constants
|
||||
|
||||
import * as C from '../constants.js';
|
||||
export { C };
|
||||
//# sourceMappingURL=index.js.map
|
|
@ -5,16 +5,15 @@
|
|||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
import { SkipTestCase } from './fixture.js';
|
||||
import { extractPublicParams } from './params/index.js';
|
||||
import { makeQueryString } from './url_query.js';
|
||||
import { extractPublicParams } from './url_query.js';
|
||||
import { getStackTrace, now } from './util/index.js';
|
||||
import { assert, getStackTrace, now } from './util/index.js';
|
||||
import { version } from './version.js';
|
||||
|
||||
class LogMessageWithStack extends Error {
|
||||
constructor(name, ex) {
|
||||
export class LogMessageWithStack extends Error {
|
||||
constructor(name, ex, includeStack = true) {
|
||||
super(ex.message);
|
||||
this.name = name;
|
||||
this.stack = ex.stack;
|
||||
this.stack = includeStack ? ex.stack : undefined;
|
||||
}
|
||||
|
||||
toJSON() {
|
||||
|
@ -24,19 +23,14 @@ class LogMessageWithStack extends Error {
|
|||
m += ': ' + this.message;
|
||||
}
|
||||
|
||||
if (this.stack) {
|
||||
m += '\n' + getStackTrace(this);
|
||||
}
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class LogMessageWithoutStack extends LogMessageWithStack {
|
||||
toJSON() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class Logger {
|
||||
constructor() {
|
||||
_defineProperty(this, "results", []);
|
||||
|
@ -110,10 +104,7 @@ export class TestCaseRecorder {
|
|||
}
|
||||
|
||||
finish() {
|
||||
if (this.startTime < 0) {
|
||||
throw new Error('finish() before start()');
|
||||
}
|
||||
|
||||
assert(this.startTime >= 0, 'finish() before start()');
|
||||
const endTime = now(); // Round to next microsecond to avoid storing useless .xxxx00000000000002 in results.
|
||||
|
||||
this.result.timems = Math.ceil((endTime - this.startTime) * 1000) / 1000;
|
||||
|
@ -127,7 +118,7 @@ export class TestCaseRecorder {
|
|||
return;
|
||||
}
|
||||
|
||||
this.logs.push(new LogMessageWithoutStack('DEBUG', ex));
|
||||
this.logs.push(new LogMessageWithStack('DEBUG', ex, false));
|
||||
}
|
||||
|
||||
warn(ex) {
|
||||
|
|
|
@ -6,15 +6,14 @@ let _Symbol$iterator;
|
|||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
import { assert } from '../util/index.js';
|
||||
export function pcombine(...params) {
|
||||
return new PCombine(params);
|
||||
}
|
||||
|
||||
function merge(a, b) {
|
||||
for (const key of Object.keys(a)) {
|
||||
if (b.hasOwnProperty(key)) {
|
||||
throw new Error('Duplicate key: ' + key);
|
||||
}
|
||||
assert(!b.hasOwnProperty(key), 'Duplicate key: ' + key);
|
||||
}
|
||||
|
||||
return { ...a,
|
||||
|
|
|
@ -7,13 +7,35 @@ export * from './combine.js';
|
|||
export * from './exclude.js';
|
||||
export * from './filter.js';
|
||||
export * from './options.js';
|
||||
export function extractPublicParams(params) {
|
||||
const publicParams = {};
|
||||
|
||||
for (const k of Object.keys(params)) {
|
||||
if (!k.startsWith('_')) {
|
||||
publicParams[k] = params[k];
|
||||
}
|
||||
}
|
||||
|
||||
return publicParams;
|
||||
}
|
||||
export function stringifyPublicParams(p) {
|
||||
if (p === null || paramsEquals(p, {})) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return JSON.stringify(extractPublicParams(p));
|
||||
}
|
||||
export function paramsEquals(x, y) {
|
||||
if (x === y) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (x === null || y === null) {
|
||||
return false;
|
||||
if (x === null) {
|
||||
x = {};
|
||||
}
|
||||
|
||||
if (y === null) {
|
||||
y = {};
|
||||
}
|
||||
|
||||
for (const xk of Object.keys(x)) {
|
||||
|
@ -40,8 +62,7 @@ export function paramsSupersets(sup, sub) {
|
|||
}
|
||||
|
||||
if (sup === null) {
|
||||
// && sub !== undefined
|
||||
return false;
|
||||
sup = {};
|
||||
}
|
||||
|
||||
for (const k of Object.keys(sub)) {
|
||||
|
|
|
@ -8,10 +8,14 @@ export class FilterByGroup {
|
|||
constructor(suite, groupPrefix) {
|
||||
_defineProperty(this, "suite", void 0);
|
||||
|
||||
_defineProperty(this, "groupPrefix", void 0);
|
||||
_defineProperty(this, "specPathPrefix", void 0);
|
||||
|
||||
this.suite = suite;
|
||||
this.groupPrefix = groupPrefix;
|
||||
this.specPathPrefix = groupPrefix;
|
||||
}
|
||||
|
||||
matches(id) {
|
||||
return id.spec.suite === this.suite && this.pathMatches(id.spec.path);
|
||||
}
|
||||
|
||||
async iterate(loader) {
|
||||
|
@ -23,7 +27,7 @@ export class FilterByGroup {
|
|||
path,
|
||||
description
|
||||
} of specs) {
|
||||
if (path.startsWith(this.groupPrefix)) {
|
||||
if (this.pathMatches(path)) {
|
||||
const isReadme = path === '' || path.endsWith('/');
|
||||
const spec = isReadme ? {
|
||||
description
|
||||
|
@ -41,5 +45,20 @@ export class FilterByGroup {
|
|||
return entries;
|
||||
}
|
||||
|
||||
definitelyOneFile() {
|
||||
// FilterByGroup could always possibly match multiple files, because it represents a prefix,
|
||||
// e.g. "a:b" not "a:b:".
|
||||
return false;
|
||||
}
|
||||
|
||||
idIfSingle() {
|
||||
// FilterByGroup could be one whole suite, but we only want whole files, tests, or cases.
|
||||
return undefined;
|
||||
}
|
||||
|
||||
pathMatches(path) {
|
||||
return path.startsWith(this.specPathPrefix);
|
||||
}
|
||||
|
||||
}
|
||||
//# sourceMappingURL=filter_by_group.js.map
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
import { testSpecEquals } from '../id.js';
|
||||
import { paramsEquals, paramsSupersets } from '../params/index.js';
|
||||
|
||||
class FilterOneFile {
|
||||
|
@ -24,6 +25,10 @@ class FilterOneFile {
|
|||
}];
|
||||
}
|
||||
|
||||
definitelyOneFile() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function filterTestGroup(group, filter) {
|
||||
|
@ -49,7 +54,30 @@ export class FilterByTestMatch extends FilterOneFile {
|
|||
}
|
||||
|
||||
getCases(spec) {
|
||||
return filterTestGroup(spec.g, testcase => testcase.test.startsWith(this.testPrefix));
|
||||
return filterTestGroup(spec.g, testcase => this.testMatches(testcase.test));
|
||||
}
|
||||
|
||||
idIfSingle() {
|
||||
if (this.testPrefix.length !== 0) {
|
||||
return undefined;
|
||||
} // This is one whole spec file.
|
||||
|
||||
|
||||
return {
|
||||
spec: this.specId
|
||||
};
|
||||
}
|
||||
|
||||
matches(id) {
|
||||
if (id.test === undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return testSpecEquals(id.spec, this.specId) && this.testMatches(id.test);
|
||||
}
|
||||
|
||||
testMatches(test) {
|
||||
return test.startsWith(this.testPrefix);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -66,7 +94,35 @@ export class FilterByParamsMatch extends FilterOneFile {
|
|||
}
|
||||
|
||||
getCases(spec) {
|
||||
return filterTestGroup(spec.g, testcase => testcase.test === this.test && paramsSupersets(testcase.params, this.params));
|
||||
return filterTestGroup(spec.g, testcase => this.caseMatches(testcase.test, testcase.params));
|
||||
}
|
||||
|
||||
idIfSingle() {
|
||||
if (this.params !== null) {
|
||||
return undefined;
|
||||
} // This is one whole test.
|
||||
|
||||
|
||||
return {
|
||||
spec: this.specId,
|
||||
test: this.test
|
||||
};
|
||||
}
|
||||
|
||||
matches(id) {
|
||||
if (id.test === undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return testSpecEquals(id.spec, this.specId) && this.caseMatches(id.test, id.params);
|
||||
}
|
||||
|
||||
caseMatches(test, params) {
|
||||
if (params === undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return test === this.test && paramsSupersets(params, this.params);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -83,7 +139,28 @@ export class FilterByParamsExact extends FilterOneFile {
|
|||
}
|
||||
|
||||
getCases(spec) {
|
||||
return filterTestGroup(spec.g, testcase => testcase.test === this.test && paramsEquals(testcase.params, this.params));
|
||||
return filterTestGroup(spec.g, testcase => this.caseMatches(testcase.test, testcase.params));
|
||||
}
|
||||
|
||||
idIfSingle() {
|
||||
// This is one single test case.
|
||||
return {
|
||||
spec: this.specId,
|
||||
test: this.test,
|
||||
params: this.params
|
||||
};
|
||||
}
|
||||
|
||||
matches(id) {
|
||||
if (id.test === undefined || id.params === undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return testSpecEquals(id.spec, this.specId) && this.caseMatches(id.test, id.params);
|
||||
}
|
||||
|
||||
caseMatches(test, params) {
|
||||
return test === this.test && paramsEquals(params, this.params);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
* AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts
|
||||
**/
|
||||
|
||||
export { loadFilter } from './load_filter.js'; // Result of iterating a test filter. Contains a loaded spec (.spec.ts) file and its id.
|
||||
export { loadFilter, makeFilter } from './load_filter.js'; // Result of iterating a test filter. Contains a loaded spec (.spec.ts) file and its id.
|
||||
//# sourceMappingURL=index.js.map
|
|
@ -3,16 +3,13 @@
|
|||
**/
|
||||
|
||||
import { allowedTestNameCharacters } from '../allowed_characters.js';
|
||||
import { assert, unreachable } from '../util/index.js';
|
||||
import { FilterByGroup } from './filter_by_group.js';
|
||||
import { FilterByParamsExact, FilterByParamsMatch, FilterByTestMatch } from './filter_one_file.js';
|
||||
// Each filter is of one of the forms below (urlencoded).
|
||||
export async function loadFilter(loader, filter) {
|
||||
export function makeFilter(filter) {
|
||||
const i1 = filter.indexOf(':');
|
||||
|
||||
if (i1 === -1) {
|
||||
throw new Error('Test queries must fully specify their suite name (e.g. "cts:")');
|
||||
}
|
||||
|
||||
assert(i1 !== -1, 'Test queries must fully specify their suite name (e.g. "cts:")');
|
||||
const suite = filter.substring(0, i1);
|
||||
const i2 = filter.indexOf(':', i1 + 1);
|
||||
|
||||
|
@ -22,7 +19,7 @@ export async function loadFilter(loader, filter) {
|
|||
// - cts:buffers/
|
||||
// - cts:buffers/map
|
||||
const groupPrefix = filter.substring(i1 + 1);
|
||||
return new FilterByGroup(suite, groupPrefix).iterate(loader);
|
||||
return new FilterByGroup(suite, groupPrefix);
|
||||
}
|
||||
|
||||
const path = filter.substring(i1 + 1, i2);
|
||||
|
@ -36,7 +33,7 @@ export async function loadFilter(loader, filter) {
|
|||
return new FilterByTestMatch({
|
||||
suite,
|
||||
path
|
||||
}, testPrefix).iterate(loader);
|
||||
}, testPrefix);
|
||||
}
|
||||
|
||||
const i3 = i2 + 1 + i3sub;
|
||||
|
@ -55,7 +52,7 @@ export async function loadFilter(loader, filter) {
|
|||
return new FilterByParamsMatch({
|
||||
suite,
|
||||
path
|
||||
}, test, params).iterate(loader);
|
||||
}, test, params);
|
||||
} else if (token === '=') {
|
||||
// - cts:buffers/mapWriteAsync:basic=
|
||||
// - cts:buffers/mapWriteAsync:basic={}
|
||||
|
@ -63,9 +60,12 @@ export async function loadFilter(loader, filter) {
|
|||
return new FilterByParamsExact({
|
||||
suite,
|
||||
path
|
||||
}, test, params).iterate(loader);
|
||||
}, test, params);
|
||||
} else {
|
||||
throw new Error("invalid character after test name; must be '~' or '='");
|
||||
unreachable("invalid character after test name; must be '~' or '='");
|
||||
}
|
||||
}
|
||||
export function loadFilter(loader, filter) {
|
||||
return makeFilter(filter).iterate(loader);
|
||||
}
|
||||
//# sourceMappingURL=load_filter.js.map
|
|
@ -5,8 +5,9 @@
|
|||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
import { allowedTestNameCharacters } from './allowed_characters.js';
|
||||
import { paramsEquals } from './params/index.js';
|
||||
import { checkPublicParamType, extractPublicParams } from './url_query.js';
|
||||
import { extractPublicParams, paramsEquals } from './params/index.js';
|
||||
import { checkPublicParamType } from './url_query.js';
|
||||
import { assert } from './util/index.js';
|
||||
const validNames = new RegExp('^[' + allowedTestNameCharacters + ']+$');
|
||||
export class TestGroup {
|
||||
constructor(fixture) {
|
||||
|
@ -26,30 +27,18 @@ export class TestGroup {
|
|||
}
|
||||
|
||||
checkName(name) {
|
||||
if (!validNames.test(name)) {
|
||||
throw new Error(`Invalid test name ${name}; must match [${validNames}]+`);
|
||||
}
|
||||
|
||||
if (name !== decodeURIComponent(name)) {
|
||||
// Shouldn't happen due to the rule above. Just makes sure that treated
|
||||
assert(validNames.test(name), `Invalid test name ${name}; must match [${validNames}]+`);
|
||||
assert( // Shouldn't happen due to the rule above. Just makes sure that treated
|
||||
// unencoded strings as encoded strings is OK.
|
||||
throw new Error(`Not decodeURIComponent-idempotent: ${name} !== ${decodeURIComponent(name)}`);
|
||||
}
|
||||
|
||||
if (this.seen.has(name)) {
|
||||
throw new Error(`Duplicate test name: ${name}`);
|
||||
}
|
||||
|
||||
name === decodeURIComponent(name), `Not decodeURIComponent-idempotent: ${name} !== ${decodeURIComponent(name)}`);
|
||||
assert(!this.seen.has(name), `Duplicate test name: ${name}`);
|
||||
this.seen.add(name);
|
||||
} // TODO: This could take a fixture, too, to override the one for the group.
|
||||
|
||||
|
||||
test(name, fn) {
|
||||
// Replace spaces with underscores for readability.
|
||||
if (name.indexOf('_') !== -1) {
|
||||
throw new Error('Invalid test name ${name}: contains underscore (use space)');
|
||||
}
|
||||
|
||||
assert(name.indexOf('_') === -1, 'Invalid test name ${name}: contains underscore (use space)');
|
||||
name = name.replace(/ /g, '_');
|
||||
this.checkName(name);
|
||||
const test = new Test(name, this.fixture, fn);
|
||||
|
@ -75,10 +64,7 @@ class Test {
|
|||
}
|
||||
|
||||
params(specs) {
|
||||
if (this.cases !== null) {
|
||||
throw new Error('test case is already parameterized');
|
||||
}
|
||||
|
||||
assert(this.cases === null, 'test case is already parameterized');
|
||||
const cases = Array.from(specs);
|
||||
const seen = []; // This is n^2.
|
||||
|
||||
|
@ -90,10 +76,7 @@ class Test {
|
|||
checkPublicParamType(v);
|
||||
}
|
||||
|
||||
if (seen.some(x => paramsEquals(x, publicParams))) {
|
||||
throw new Error('Duplicate test case params');
|
||||
}
|
||||
|
||||
assert(!seen.some(x => paramsEquals(x, publicParams)), 'Duplicate test case params');
|
||||
seen.push(publicParams);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
* AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts
|
||||
**/
|
||||
|
||||
import { stringifyPublicParams } from './params/index.js';
|
||||
|
||||
// e.g. iteratePath('a/b/c/d', ':') yields ['a/', 'a/b/', 'a/b/c/', 'a/b/c/d:']
|
||||
function* iteratePath(path, terminator) {
|
||||
const parts = path.split('/');
|
||||
|
@ -25,7 +27,7 @@ function* iteratePath(path, terminator) {
|
|||
}
|
||||
|
||||
export function treeFromFilterResults(log, listing) {
|
||||
function insertOrNew(n, k) {
|
||||
function getOrInsert(n, k) {
|
||||
const children = n.children;
|
||||
|
||||
if (children.has(k)) {
|
||||
|
@ -44,18 +46,18 @@ export function treeFromFilterResults(log, listing) {
|
|||
};
|
||||
|
||||
for (const f of listing) {
|
||||
const files = insertOrNew(tree, f.id.suite + ':');
|
||||
const files = getOrInsert(tree, f.id.suite + ':');
|
||||
|
||||
if (f.id.path === '') {
|
||||
// This is a suite README.
|
||||
files.description = f.spec.description;
|
||||
files.description = f.spec.description.trim();
|
||||
continue;
|
||||
}
|
||||
|
||||
let tests = files;
|
||||
|
||||
for (const path of iteratePath(f.id.path, ':')) {
|
||||
tests = insertOrNew(tests, f.id.suite + ':' + path);
|
||||
tests = getOrInsert(tests, f.id.suite + ':' + path);
|
||||
}
|
||||
|
||||
if (f.spec.description) {
|
||||
|
@ -75,10 +77,10 @@ export function treeFromFilterResults(log, listing) {
|
|||
let cases = tests;
|
||||
|
||||
for (const path of iteratePath(t.id.test, '~')) {
|
||||
cases = insertOrNew(cases, fId + ':' + path);
|
||||
cases = getOrInsert(cases, fId + ':' + path);
|
||||
}
|
||||
|
||||
const p = t.id.params ? JSON.stringify(t.id.params) : '';
|
||||
const p = stringifyPublicParams(t.id.params);
|
||||
cases.children.set(fId + ':' + t.id.test + '=' + p, {
|
||||
runCase: t
|
||||
});
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
* AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts
|
||||
**/
|
||||
|
||||
import { stringifyPublicParams } from './params/index.js';
|
||||
import { unreachable } from './util/index.js';
|
||||
export function encodeSelectively(s) {
|
||||
let ret = encodeURIComponent(s);
|
||||
ret = ret.replace(/%22/g, '"');
|
||||
|
@ -15,17 +17,6 @@ export function encodeSelectively(s) {
|
|||
ret = ret.replace(/%7D/g, '}');
|
||||
return ret;
|
||||
}
|
||||
export function extractPublicParams(params) {
|
||||
const publicParams = {};
|
||||
|
||||
for (const k of Object.keys(params)) {
|
||||
if (!k.startsWith('_')) {
|
||||
publicParams[k] = params[k];
|
||||
}
|
||||
}
|
||||
|
||||
return publicParams;
|
||||
}
|
||||
export function checkPublicParamType(v) {
|
||||
if (typeof v === 'number' || typeof v === 'string' || typeof v === 'boolean' || v === undefined) {
|
||||
return;
|
||||
|
@ -41,7 +32,7 @@ export function checkPublicParamType(v) {
|
|||
return;
|
||||
}
|
||||
|
||||
throw new Error('Invalid type for test case params ' + v);
|
||||
unreachable('Invalid type for test case params ' + v);
|
||||
}
|
||||
export function makeQueryString(spec, testcase) {
|
||||
let s = spec.suite + ':';
|
||||
|
@ -49,10 +40,7 @@ export function makeQueryString(spec, testcase) {
|
|||
|
||||
if (testcase !== undefined) {
|
||||
s += testcase.test + '=';
|
||||
|
||||
if (testcase.params) {
|
||||
s += JSON.stringify(extractPublicParams(testcase.params));
|
||||
}
|
||||
s += stringifyPublicParams(testcase.params);
|
||||
}
|
||||
|
||||
return encodeSelectively(s);
|
||||
|
|
|
@ -3,7 +3,15 @@
|
|||
**/
|
||||
|
||||
import { timeout } from './timeout.js';
|
||||
export * from './stack.js'; // performance.now() is available in all browsers, but not in scope by default in Node.
|
||||
export * from './stack.js';
|
||||
export function assert(condition, msg) {
|
||||
if (!condition) {
|
||||
throw new Error(msg);
|
||||
}
|
||||
}
|
||||
export function unreachable(msg) {
|
||||
throw new Error(msg);
|
||||
} // performance.now() is available in all browsers, but not in scope by default in Node.
|
||||
|
||||
const perf = typeof performance !== 'undefined' ? performance : require('perf_hooks').performance;
|
||||
export function now() {
|
||||
|
|
|
@ -12,6 +12,7 @@ export function getStackTrace(e) {
|
|||
|
||||
const parts = e.stack.split('\n');
|
||||
const stack = [];
|
||||
const moreStack = [];
|
||||
let found = false;
|
||||
const suitesRegex = /[\/\\]suites[\/\\]/;
|
||||
|
||||
|
@ -20,10 +21,15 @@ export function getStackTrace(e) {
|
|||
const isSuites = suitesRegex.test(part);
|
||||
|
||||
if (found && !isSuites) {
|
||||
break;
|
||||
moreStack.push(part);
|
||||
}
|
||||
|
||||
if (isSuites) {
|
||||
if (moreStack.length) {
|
||||
stack.push(...moreStack);
|
||||
moreStack.length = 0;
|
||||
}
|
||||
|
||||
stack.push(part);
|
||||
found = true;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
// AUTO-GENERATED - DO NOT EDIT. See tools/gen_version.
|
||||
|
||||
export const version = 'a5c59f8995f38843e332ff4d869a72f75d2f028d';
|
||||
export const version = 'ec18cc3262922e7dcdbe70243c6f40606f979144';
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts
|
||||
**/
|
||||
|
||||
import { assert } from '../../framework/index.js';
|
||||
import { TestLoader } from '../../framework/loader.js';
|
||||
import { Logger } from '../../framework/logger.js';
|
||||
// should be DedicatedWorkerGlobalScope
|
||||
|
@ -14,12 +15,12 @@ self.onmessage = async ev => {
|
|||
debug
|
||||
} = ev.data;
|
||||
const files = Array.from((await loader.loadTests([query])));
|
||||
if (files.length !== 1) throw new Error('worker query resulted in != 1 files');
|
||||
assert(files.length === 1, 'worker query resulted in != 1 files');
|
||||
const f = files[0];
|
||||
const [rec] = log.record(f.id);
|
||||
if (!('g' in f.spec)) throw new Error('worker query resulted in README');
|
||||
assert('g' in f.spec, 'worker query resulted in README');
|
||||
const cases = Array.from(f.spec.g.iterate(rec));
|
||||
if (cases.length !== 1) throw new Error('worker query resulted in != 1 cases');
|
||||
assert(cases.length === 1, 'worker query resulted in != 1 cases');
|
||||
const c = cases[0];
|
||||
const result = await c.run(debug);
|
||||
self.postMessage({
|
||||
|
@ -27,4 +28,4 @@ self.onmessage = async ev => {
|
|||
result
|
||||
});
|
||||
};
|
||||
//# sourceMappingURL=test_worker.worker.js.map
|
||||
//# sourceMappingURL=test_worker-worker.js.map
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
import { LogMessageWithStack } from '../../framework/logger.js';
|
||||
export class TestWorker {
|
||||
constructor() {
|
||||
_defineProperty(this, "worker", void 0);
|
||||
|
@ -12,16 +13,21 @@ export class TestWorker {
|
|||
|
||||
const selfPath = import.meta.url;
|
||||
const selfPathDir = selfPath.substring(0, selfPath.lastIndexOf('/'));
|
||||
const workerPath = selfPathDir + '/test_worker.worker.js';
|
||||
const workerPath = selfPathDir + '/test_worker-worker.js';
|
||||
this.worker = new Worker(workerPath, {
|
||||
type: 'module'
|
||||
});
|
||||
|
||||
this.worker.onmessage = ev => {
|
||||
const {
|
||||
query,
|
||||
result
|
||||
} = ev.data;
|
||||
const query = ev.data.query;
|
||||
const result = ev.data.result;
|
||||
|
||||
if (result.logs) {
|
||||
for (const l of result.logs) {
|
||||
Object.setPrototypeOf(l, LogMessageWithStack.prototype);
|
||||
}
|
||||
}
|
||||
|
||||
this.resolvers.get(query)(result); // TODO(kainino0x): update the Logger with this result (or don't have a logger and update the
|
||||
// entire results JSON somehow at some point).
|
||||
};
|
||||
|
|
|
@ -66,7 +66,7 @@ g.test('memcpy', async t => {
|
|||
* `
|
||||
* )
|
||||
*/
|
||||
new Uint32Array([119734787, 66304, 524295, 18, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 327695, 5, 4, 1852399981, 0, 393232, 4, 17, 1, 1, 1, 196611, 1, 310, 262149, 4, 1852399981, 0, 196613, 7, 7631684, 327686, 7, 0, 1970037110, 101, 196613, 9, 7631716, 196613, 11, 6517331, 327686, 11, 0, 1970037110, 101, 196613, 13, 6517363, 327752, 7, 0, 35, 0, 196679, 7, 2, 262215, 9, 34, 0, 262215, 9, 33, 1, 327752, 11, 0, 35, 0, 196679, 11, 2, 262215, 13, 34, 0, 262215, 13, 33, 0, 131091, 2, 196641, 3, 2, 262165, 6, 32, 1, 196638, 7, 6, 262176, 8, 12, 7, 262203, 8, 9, 12, 262187, 6, 10, 0, 196638, 11, 6, 262176, 12, 12, 11, 262203, 12, 13, 12, 262176, 14, 12, 6, 327734, 2, 4, 0, 3, 131320, 5, 327745, 14, 15, 13, 10, 262205, 6, 16, 15, 327745, 14, 17, 9, 10, 196670, 17, 16, 65789, 65592])
|
||||
new Uint32Array([119734787, 66304, 524296, 18, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 327695, 5, 4, 1852399981, 0, 393232, 4, 17, 1, 1, 1, 196611, 1, 310, 262149, 4, 1852399981, 0, 196613, 7, 7631684, 327686, 7, 0, 1970037110, 101, 196613, 9, 7631716, 196613, 11, 6517331, 327686, 11, 0, 1970037110, 101, 196613, 13, 6517363, 327752, 7, 0, 35, 0, 196679, 7, 2, 262215, 9, 34, 0, 262215, 9, 33, 1, 327752, 11, 0, 35, 0, 196679, 11, 2, 262215, 13, 34, 0, 262215, 13, 33, 0, 131091, 2, 196641, 3, 2, 262165, 6, 32, 1, 196638, 7, 6, 262176, 8, 12, 7, 262203, 8, 9, 12, 262187, 6, 10, 0, 196638, 11, 6, 262176, 12, 12, 11, 262203, 12, 13, 12, 262176, 14, 12, 6, 327734, 2, 4, 0, 3, 131320, 5, 327745, 14, 15, 13, 10, 262205, 6, 16, 15, 327745, 14, 17, 9, 10, 196670, 17, 16, 65789, 65592])
|
||||
});
|
||||
const pl = t.device.createPipelineLayout({
|
||||
bindGroupLayouts: [bgl]
|
||||
|
|
|
@ -34,7 +34,7 @@ g.test('fullscreen quad', async t => {
|
|||
* `
|
||||
* )
|
||||
*/
|
||||
new Uint32Array([119734787, 66304, 524295, 39, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 458767, 0, 4, 1852399981, 0, 10, 26, 196611, 1, 310, 262149, 4, 1852399981, 0, 393221, 8, 1348430951, 1700164197, 2019914866, 0, 393222, 8, 0, 1348430951, 1953067887, 7237481, 458758, 8, 1, 1348430951, 1953393007, 1702521171, 0, 196613, 10, 0, 393221, 26, 1449094247, 1702130277, 1684949368, 30821, 327685, 29, 1701080681, 1818386808, 101, 327752, 8, 0, 11, 0, 327752, 8, 1, 11, 1, 196679, 8, 2, 262215, 26, 11, 42, 131091, 2, 196641, 3, 2, 196630, 6, 32, 262167, 7, 6, 4, 262174, 8, 7, 6, 262176, 9, 3, 8, 262203, 9, 10, 3, 262165, 11, 32, 1, 262187, 11, 12, 0, 262167, 13, 6, 2, 262165, 14, 32, 0, 262187, 14, 15, 3, 262172, 16, 13, 15, 262187, 6, 17, 3212836864, 262187, 6, 18, 3225419776, 327724, 13, 19, 17, 18, 262187, 6, 20, 1077936128, 262187, 6, 21, 1065353216, 327724, 13, 22, 20, 21, 327724, 13, 23, 17, 21, 393260, 16, 24, 19, 22, 23, 262176, 25, 1, 11, 262203, 25, 26, 1, 262176, 28, 7, 16, 262176, 30, 7, 13, 262187, 6, 33, 0, 262176, 37, 3, 7, 327734, 2, 4, 0, 3, 131320, 5, 262203, 28, 29, 7, 262205, 11, 27, 26, 196670, 29, 24, 327745, 30, 31, 29, 27, 262205, 13, 32, 31, 327761, 6, 34, 32, 0, 327761, 6, 35, 32, 1, 458832, 7, 36, 34, 35, 33, 21, 327745, 37, 38, 10, 12, 196670, 38, 36, 65789, 65592])
|
||||
new Uint32Array([119734787, 66304, 524296, 39, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 458767, 0, 4, 1852399981, 0, 10, 26, 196611, 1, 310, 262149, 4, 1852399981, 0, 393221, 8, 1348430951, 1700164197, 2019914866, 0, 393222, 8, 0, 1348430951, 1953067887, 7237481, 458758, 8, 1, 1348430951, 1953393007, 1702521171, 0, 196613, 10, 0, 393221, 26, 1449094247, 1702130277, 1684949368, 30821, 327685, 29, 1701080681, 1818386808, 101, 327752, 8, 0, 11, 0, 327752, 8, 1, 11, 1, 196679, 8, 2, 262215, 26, 11, 42, 131091, 2, 196641, 3, 2, 196630, 6, 32, 262167, 7, 6, 4, 262174, 8, 7, 6, 262176, 9, 3, 8, 262203, 9, 10, 3, 262165, 11, 32, 1, 262187, 11, 12, 0, 262167, 13, 6, 2, 262165, 14, 32, 0, 262187, 14, 15, 3, 262172, 16, 13, 15, 262187, 6, 17, 3212836864, 262187, 6, 18, 3225419776, 327724, 13, 19, 17, 18, 262187, 6, 20, 1077936128, 262187, 6, 21, 1065353216, 327724, 13, 22, 20, 21, 327724, 13, 23, 17, 21, 393260, 16, 24, 19, 22, 23, 262176, 25, 1, 11, 262203, 25, 26, 1, 262176, 28, 7, 16, 262176, 30, 7, 13, 262187, 6, 33, 0, 262176, 37, 3, 7, 327734, 2, 4, 0, 3, 131320, 5, 262203, 28, 29, 7, 262205, 11, 27, 26, 196670, 29, 24, 327745, 30, 31, 29, 27, 262205, 13, 32, 31, 327761, 6, 34, 32, 0, 327761, 6, 35, 32, 1, 458832, 7, 36, 34, 35, 33, 21, 327745, 37, 38, 10, 12, 196670, 38, 36, 65789, 65592])
|
||||
});
|
||||
const fragmentModule = t.createShaderModule({
|
||||
code:
|
||||
|
@ -49,7 +49,7 @@ g.test('fullscreen quad', async t => {
|
|||
* `
|
||||
* )
|
||||
*/
|
||||
new Uint32Array([119734787, 66304, 524295, 13, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 393231, 4, 4, 1852399981, 0, 9, 196624, 4, 7, 196611, 1, 310, 262149, 4, 1852399981, 0, 327685, 9, 1734439526, 1869377347, 114, 196679, 9, 0, 262215, 9, 30, 0, 131091, 2, 196641, 3, 2, 196630, 6, 32, 262167, 7, 6, 4, 262176, 8, 3, 7, 262203, 8, 9, 3, 262187, 6, 10, 0, 262187, 6, 11, 1065353216, 458796, 7, 12, 10, 11, 10, 11, 327734, 2, 4, 0, 3, 131320, 5, 196670, 9, 12, 65789, 65592])
|
||||
new Uint32Array([119734787, 66304, 524296, 13, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 393231, 4, 4, 1852399981, 0, 9, 196624, 4, 7, 196611, 1, 310, 262149, 4, 1852399981, 0, 327685, 9, 1734439526, 1869377347, 114, 196679, 9, 0, 262215, 9, 30, 0, 131091, 2, 196641, 3, 2, 196630, 6, 32, 262167, 7, 6, 4, 262176, 8, 3, 7, 262203, 8, 9, 3, 262187, 6, 10, 0, 262187, 6, 11, 1065353216, 458796, 7, 12, 10, 11, 10, 11, 327734, 2, 4, 0, 3, 131320, 5, 196670, 9, 12, 65789, 65592])
|
||||
});
|
||||
const pl = t.device.createPipelineLayout({
|
||||
bindGroupLayouts: []
|
||||
|
|
|
@ -34,7 +34,7 @@ g.test('storeOp controls whether 1x1 drawn quad is stored', async t => {
|
|||
* }`
|
||||
* )
|
||||
*/
|
||||
new Uint32Array([119734787, 66304, 524295, 39, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 458767, 0, 4, 1852399981, 0, 13, 26, 196611, 2, 450, 262149, 4, 1852399981, 0, 393221, 11, 1348430951, 1700164197, 2019914866, 0, 393222, 11, 0, 1348430951, 1953067887, 7237481, 458758, 11, 1, 1348430951, 1953393007, 1702521171, 0, 458758, 11, 2, 1130327143, 1148217708, 1635021673, 6644590, 458758, 11, 3, 1130327143, 1147956341, 1635021673, 6644590, 196613, 13, 0, 393221, 26, 1449094247, 1702130277, 1684949368, 30821, 327685, 29, 1701080681, 1818386808, 101, 327752, 11, 0, 11, 0, 327752, 11, 1, 11, 1, 327752, 11, 2, 11, 3, 327752, 11, 3, 11, 4, 196679, 11, 2, 262215, 26, 11, 42, 131091, 2, 196641, 3, 2, 196630, 6, 32, 262167, 7, 6, 4, 262165, 8, 32, 0, 262187, 8, 9, 1, 262172, 10, 6, 9, 393246, 11, 7, 6, 10, 10, 262176, 12, 3, 11, 262203, 12, 13, 3, 262165, 14, 32, 1, 262187, 14, 15, 0, 262167, 16, 6, 2, 262187, 8, 17, 3, 262172, 18, 16, 17, 262187, 6, 19, 1065353216, 262187, 6, 20, 3212836864, 327724, 16, 21, 19, 20, 327724, 16, 22, 19, 19, 327724, 16, 23, 20, 19, 393260, 18, 24, 21, 22, 23, 262176, 25, 1, 14, 262203, 25, 26, 1, 262176, 28, 7, 18, 262176, 30, 7, 16, 262187, 6, 33, 0, 262176, 37, 3, 7, 327734, 2, 4, 0, 3, 131320, 5, 262203, 28, 29, 7, 262205, 14, 27, 26, 196670, 29, 24, 327745, 30, 31, 29, 27, 262205, 16, 32, 31, 327761, 6, 34, 32, 0, 327761, 6, 35, 32, 1, 458832, 7, 36, 34, 35, 33, 19, 327745, 37, 38, 13, 15, 196670, 38, 36, 65789, 65592])
|
||||
new Uint32Array([119734787, 66304, 524296, 39, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 458767, 0, 4, 1852399981, 0, 13, 26, 196611, 2, 450, 262149, 4, 1852399981, 0, 393221, 11, 1348430951, 1700164197, 2019914866, 0, 393222, 11, 0, 1348430951, 1953067887, 7237481, 458758, 11, 1, 1348430951, 1953393007, 1702521171, 0, 458758, 11, 2, 1130327143, 1148217708, 1635021673, 6644590, 458758, 11, 3, 1130327143, 1147956341, 1635021673, 6644590, 196613, 13, 0, 393221, 26, 1449094247, 1702130277, 1684949368, 30821, 327685, 29, 1701080681, 1818386808, 101, 327752, 11, 0, 11, 0, 327752, 11, 1, 11, 1, 327752, 11, 2, 11, 3, 327752, 11, 3, 11, 4, 196679, 11, 2, 262215, 26, 11, 42, 131091, 2, 196641, 3, 2, 196630, 6, 32, 262167, 7, 6, 4, 262165, 8, 32, 0, 262187, 8, 9, 1, 262172, 10, 6, 9, 393246, 11, 7, 6, 10, 10, 262176, 12, 3, 11, 262203, 12, 13, 3, 262165, 14, 32, 1, 262187, 14, 15, 0, 262167, 16, 6, 2, 262187, 8, 17, 3, 262172, 18, 16, 17, 262187, 6, 19, 1065353216, 262187, 6, 20, 3212836864, 327724, 16, 21, 19, 20, 327724, 16, 22, 19, 19, 327724, 16, 23, 20, 19, 393260, 18, 24, 21, 22, 23, 262176, 25, 1, 14, 262203, 25, 26, 1, 262176, 28, 7, 18, 262176, 30, 7, 16, 262187, 6, 33, 0, 262176, 37, 3, 7, 327734, 2, 4, 0, 3, 131320, 5, 262203, 28, 29, 7, 262205, 14, 27, 26, 196670, 29, 24, 327745, 30, 31, 29, 27, 262205, 16, 32, 31, 327761, 6, 34, 32, 0, 327761, 6, 35, 32, 1, 458832, 7, 36, 34, 35, 33, 19, 327745, 37, 38, 13, 15, 196670, 38, 36, 65789, 65592])
|
||||
});
|
||||
const fragmentModule = t.createShaderModule({
|
||||
code:
|
||||
|
@ -47,7 +47,7 @@ g.test('storeOp controls whether 1x1 drawn quad is stored', async t => {
|
|||
* }`
|
||||
* )
|
||||
*/
|
||||
new Uint32Array([119734787, 66304, 524295, 13, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 393231, 4, 4, 1852399981, 0, 9, 196624, 4, 7, 196611, 2, 450, 262149, 4, 1852399981, 0, 327685, 9, 1734439526, 1869377347, 114, 262215, 9, 30, 0, 131091, 2, 196641, 3, 2, 196630, 6, 32, 262167, 7, 6, 4, 262176, 8, 3, 7, 262203, 8, 9, 3, 262187, 6, 10, 1065353216, 262187, 6, 11, 0, 458796, 7, 12, 10, 11, 11, 10, 327734, 2, 4, 0, 3, 131320, 5, 196670, 9, 12, 65789, 65592])
|
||||
new Uint32Array([119734787, 66304, 524296, 13, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 393231, 4, 4, 1852399981, 0, 9, 196624, 4, 7, 196611, 2, 450, 262149, 4, 1852399981, 0, 327685, 9, 1734439526, 1869377347, 114, 262215, 9, 30, 0, 131091, 2, 196641, 3, 2, 196630, 6, 32, 262167, 7, 6, 4, 262176, 8, 3, 7, 262203, 8, 9, 3, 262187, 6, 10, 1065353216, 262187, 6, 11, 0, 458796, 7, 12, 10, 11, 11, 10, 327734, 2, 4, 0, 3, 131320, 5, 196670, 9, 12, 65789, 65592])
|
||||
});
|
||||
const renderPipeline = t.device.createRenderPipeline({
|
||||
vertexStage: {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
export const description = `
|
||||
copy imageBitmap To texture tests.
|
||||
`;
|
||||
import { TestGroup, pcombine, poptions } from '../../framework/index.js';
|
||||
import { TestGroup, assert, pcombine, poptions } from '../../framework/index.js';
|
||||
import { GPUTest } from './gpu_test.js';
|
||||
|
||||
function calculateRowPitch(width, bytesPerPixel) {
|
||||
|
@ -68,11 +68,7 @@ class F extends GPUTest {
|
|||
imageCanvas.width = imageBitmap.width;
|
||||
imageCanvas.height = imageBitmap.height;
|
||||
const imageCanvasContext = imageCanvas.getContext('2d');
|
||||
|
||||
if (!imageCanvasContext) {
|
||||
throw new Error('Cannot create canvas context for reading back contents from imageBitmap.');
|
||||
}
|
||||
|
||||
assert(imageCanvasContext !== null, 'Cannot create canvas context for reading back contents from imageBitmap.');
|
||||
imageCanvasContext.drawImage(imageBitmap, 0, 0, imageBitmap.width, imageBitmap.height);
|
||||
return imageCanvasContext.getImageData(0, 0, imageBitmap.width, imageBitmap.height).data;
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
* AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts
|
||||
**/
|
||||
|
||||
import { poptions } from '../../framework/index.js';
|
||||
// prettier-ignore
|
||||
export const textureFormatInfo = {
|
||||
export const textureFormatInfo =
|
||||
/* prettier-ignore */
|
||||
{
|
||||
// Try to keep these manually-formatted in a readable grid.
|
||||
// (Note: this list should always match the one in the spec.)
|
||||
// 8-bit formats
|
||||
|
@ -168,5 +168,35 @@ export const textureFormatInfo = {
|
|||
}
|
||||
};
|
||||
export const textureFormats = Object.keys(textureFormatInfo);
|
||||
export const textureFormatParams = Array.from(poptions('format', textureFormats));
|
||||
export const bindingTypeInfo =
|
||||
/* prettier-ignore */
|
||||
{
|
||||
'uniform-buffer': {
|
||||
type: 'buffer',
|
||||
maxDynamicCount: 8
|
||||
},
|
||||
'storage-buffer': {
|
||||
type: 'buffer',
|
||||
maxDynamicCount: 4
|
||||
},
|
||||
'readonly-storage-buffer': {
|
||||
type: 'buffer',
|
||||
maxDynamicCount: 4
|
||||
},
|
||||
'sampler': {
|
||||
type: 'sampler',
|
||||
maxDynamicCount: 0
|
||||
},
|
||||
'sampled-texture': {
|
||||
type: 'texture',
|
||||
maxDynamicCount: 0
|
||||
},
|
||||
'storage-texture': {
|
||||
type: 'texture',
|
||||
maxDynamicCount: 0
|
||||
}
|
||||
};
|
||||
export const bindingTypes = Object.keys(bindingTypeInfo);
|
||||
export const shaderStages = [1, 2, 4];
|
||||
export const shaderStageCombinations = [0, 1, 2, 3, 4, 5, 6, 7];
|
||||
//# sourceMappingURL=format_info.js.map
|
|
@ -5,7 +5,7 @@
|
|||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
import { getGPU } from '../../framework/gpu/implementation.js';
|
||||
import { Fixture } from '../../framework/index.js';
|
||||
import { Fixture, assert, unreachable } from '../../framework/index.js';
|
||||
let glslangInstance;
|
||||
export class GPUTest extends Fixture {
|
||||
constructor(...args) {
|
||||
|
@ -34,7 +34,7 @@ export class GPUTest extends Fixture {
|
|||
|
||||
try {
|
||||
await this.device.popErrorScope();
|
||||
throw new Error('There was an error scope on the stack at the beginning of the test');
|
||||
unreachable('There was an error scope on the stack at the beginning of the test');
|
||||
} catch (ex) {}
|
||||
|
||||
this.device.pushErrorScope('out-of-memory');
|
||||
|
@ -49,14 +49,14 @@ export class GPUTest extends Fixture {
|
|||
const gpuValidationError = await this.device.popErrorScope();
|
||||
|
||||
if (gpuValidationError !== null) {
|
||||
if (!(gpuValidationError instanceof GPUValidationError)) throw new Error();
|
||||
assert(gpuValidationError instanceof GPUValidationError);
|
||||
this.fail(`Unexpected validation error occurred: ${gpuValidationError.message}`);
|
||||
}
|
||||
|
||||
const gpuOutOfMemoryError = await this.device.popErrorScope();
|
||||
|
||||
if (gpuOutOfMemoryError !== null) {
|
||||
if (!(gpuOutOfMemoryError instanceof GPUOutOfMemoryError)) throw new Error();
|
||||
assert(gpuOutOfMemoryError instanceof GPUOutOfMemoryError);
|
||||
this.fail('Unexpected out-of-memory error occurred');
|
||||
}
|
||||
}
|
||||
|
@ -91,10 +91,7 @@ export class GPUTest extends Fixture {
|
|||
}
|
||||
|
||||
makeShaderModuleFromGLSL(stage, glsl) {
|
||||
if (!glslangInstance) {
|
||||
throw new Error('GLSL compiler is not instantiated. Run `await t.initGLSL()` first');
|
||||
}
|
||||
|
||||
assert(glslangInstance !== undefined, 'GLSL compiler is not instantiated. Run `await t.initGLSL()` first');
|
||||
const code = glslangInstance.compileGLSL(glsl, stage, false);
|
||||
return this.device.createShaderModule({
|
||||
code
|
||||
|
|
|
@ -54,7 +54,7 @@ g.test('compute pass test that sampled texture is cleared', async t => {
|
|||
* }`
|
||||
* )
|
||||
*/
|
||||
new Uint32Array([119734787, 66304, 524295, 29, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 327695, 5, 4, 1852399981, 0, 393232, 4, 17, 1, 1, 1, 196611, 2, 450, 262149, 4, 1852399981, 0, 327685, 8, 1717990722, 1700033125, 120, 327686, 8, 0, 1970496882, 29804, 327685, 10, 1717990754, 1700033125, 120, 327685, 15, 1886216563, 1700029804, 120, 327685, 19, 1886216563, 812803436, 0, 327752, 8, 0, 35, 0, 196679, 8, 2, 262215, 10, 34, 0, 262215, 10, 33, 1, 262215, 15, 34, 0, 262215, 15, 33, 0, 262215, 19, 34, 0, 262215, 19, 33, 2, 131091, 2, 196641, 3, 2, 196630, 6, 32, 262167, 7, 6, 4, 196638, 8, 7, 262176, 9, 12, 8, 262203, 9, 10, 12, 262165, 11, 32, 1, 262187, 11, 12, 0, 589849, 13, 6, 1, 0, 0, 0, 1, 0, 262176, 14, 0, 13, 262203, 14, 15, 0, 131098, 17, 262176, 18, 0, 17, 262203, 18, 19, 0, 196635, 21, 13, 262167, 23, 11, 2, 327724, 23, 24, 12, 12, 262176, 27, 12, 7, 327734, 2, 4, 0, 3, 131320, 5, 262205, 13, 16, 15, 262205, 17, 20, 19, 327766, 21, 22, 16, 20, 262244, 13, 25, 22, 458847, 7, 26, 25, 24, 2, 12, 327745, 27, 28, 10, 12, 196670, 28, 26, 65789, 65592])
|
||||
new Uint32Array([119734787, 66304, 524296, 29, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 327695, 5, 4, 1852399981, 0, 393232, 4, 17, 1, 1, 1, 196611, 2, 450, 262149, 4, 1852399981, 0, 327685, 8, 1717990722, 1700033125, 120, 327686, 8, 0, 1970496882, 29804, 327685, 10, 1717990754, 1700033125, 120, 327685, 15, 1886216563, 1700029804, 120, 327685, 19, 1886216563, 812803436, 0, 327752, 8, 0, 35, 0, 196679, 8, 2, 262215, 10, 34, 0, 262215, 10, 33, 1, 262215, 15, 34, 0, 262215, 15, 33, 0, 262215, 19, 34, 0, 262215, 19, 33, 2, 131091, 2, 196641, 3, 2, 196630, 6, 32, 262167, 7, 6, 4, 196638, 8, 7, 262176, 9, 12, 8, 262203, 9, 10, 12, 262165, 11, 32, 1, 262187, 11, 12, 0, 589849, 13, 6, 1, 0, 0, 0, 1, 0, 262176, 14, 0, 13, 262203, 14, 15, 0, 131098, 17, 262176, 18, 0, 17, 262203, 18, 19, 0, 196635, 21, 13, 262167, 23, 11, 2, 327724, 23, 24, 12, 12, 262176, 27, 12, 7, 327734, 2, 4, 0, 3, 131320, 5, 262205, 13, 16, 15, 262205, 17, 20, 19, 327766, 21, 22, 16, 20, 262244, 13, 25, 22, 458847, 7, 26, 25, 24, 2, 12, 327745, 27, 28, 10, 12, 196670, 28, 26, 65789, 65592])
|
||||
});
|
||||
const pipelineLayout = t.device.createPipelineLayout({
|
||||
bindGroupLayouts: [bindGroupLayout]
|
||||
|
|
|
@ -5,59 +5,15 @@
|
|||
export const description = `
|
||||
createBindGroup validation tests.
|
||||
`;
|
||||
import { TestGroup, pcombine, poptions } from '../../../framework/index.js';
|
||||
import { ValidationTest } from './validation_test.js';
|
||||
import { C, TestGroup, pcombine, poptions, unreachable } from '../../../framework/index.js';
|
||||
import { bindingTypes } from '../format_info.js';
|
||||
import { BindingResourceType, ValidationTest, resourceBindingMatches } from './validation_test.js';
|
||||
|
||||
function clone(descriptor) {
|
||||
return JSON.parse(JSON.stringify(descriptor));
|
||||
}
|
||||
|
||||
class F extends ValidationTest {
|
||||
getStorageBuffer() {
|
||||
return this.device.createBuffer({
|
||||
size: 1024,
|
||||
usage: GPUBufferUsage.STORAGE
|
||||
});
|
||||
}
|
||||
|
||||
getUniformBuffer() {
|
||||
return this.device.createBuffer({
|
||||
size: 1024,
|
||||
usage: GPUBufferUsage.UNIFORM
|
||||
});
|
||||
}
|
||||
|
||||
getSampler() {
|
||||
return this.device.createSampler();
|
||||
}
|
||||
|
||||
getSampledTexture() {
|
||||
return this.device.createTexture({
|
||||
size: {
|
||||
width: 16,
|
||||
height: 16,
|
||||
depth: 1
|
||||
},
|
||||
format: 'rgba8unorm',
|
||||
usage: GPUTextureUsage.SAMPLED
|
||||
});
|
||||
}
|
||||
|
||||
getStorageTexture() {
|
||||
return this.device.createTexture({
|
||||
size: {
|
||||
width: 16,
|
||||
height: 16,
|
||||
depth: 1
|
||||
},
|
||||
format: 'rgba8unorm',
|
||||
usage: GPUTextureUsage.STORAGE
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export const g = new TestGroup(F);
|
||||
export const g = new TestGroup(ValidationTest);
|
||||
g.test('binding count mismatch', async t => {
|
||||
const bindGroupLayout = t.device.createBindGroupLayout({
|
||||
bindings: [{
|
||||
|
@ -120,7 +76,6 @@ g.test('binding must be present in layout', async t => {
|
|||
const badDescriptor = {
|
||||
bindings: [{
|
||||
binding: 1,
|
||||
// binding index becomes 1.
|
||||
resource: {
|
||||
buffer: t.getStorageBuffer()
|
||||
}
|
||||
|
@ -131,60 +86,31 @@ g.test('binding must be present in layout', async t => {
|
|||
t.device.createBindGroup(badDescriptor);
|
||||
});
|
||||
});
|
||||
g.test('buffer binding must contain exactly one buffer of its type', async t => {
|
||||
const {
|
||||
bindingType,
|
||||
resourceType
|
||||
} = t.params;
|
||||
const bindGroupLayout = t.device.createBindGroupLayout({
|
||||
g.test('buffer binding must contain exactly one buffer of its type', t => {
|
||||
const bindingType = t.params.bindingType;
|
||||
const resourceType = t.params.resourceType;
|
||||
const layout = t.device.createBindGroupLayout({
|
||||
bindings: [{
|
||||
binding: 0,
|
||||
visibility: GPUShaderStage.COMPUTE,
|
||||
type: bindingType
|
||||
}]
|
||||
});
|
||||
let resource;
|
||||
|
||||
if (resourceType === 'error') {
|
||||
resource = {
|
||||
buffer: await t.getErrorBuffer()
|
||||
};
|
||||
} else if (resourceType === 'uniform-buffer') {
|
||||
resource = {
|
||||
buffer: t.getUniformBuffer()
|
||||
};
|
||||
} else if (resourceType === 'storage-buffer') {
|
||||
resource = {
|
||||
buffer: t.getStorageBuffer()
|
||||
};
|
||||
} else if (resourceType === 'sampler') {
|
||||
resource = t.getSampler();
|
||||
} else if (resourceType === 'sampled-texture') {
|
||||
resource = t.getSampledTexture().createView();
|
||||
} else if (resourceType === 'storage-texture') {
|
||||
resource = t.getStorageTexture().createView();
|
||||
} else throw new Error();
|
||||
|
||||
let shouldError = bindingType !== resourceType;
|
||||
|
||||
if (bindingType === 'readonly-storage-buffer' && resourceType === 'storage-buffer') {
|
||||
shouldError = false;
|
||||
}
|
||||
|
||||
const resource = t.getBindingResource(resourceType);
|
||||
const shouldError = !resourceBindingMatches(bindingType, resourceType);
|
||||
t.expectValidationError(() => {
|
||||
t.device.createBindGroup({
|
||||
layout,
|
||||
bindings: [{
|
||||
binding: 0,
|
||||
resource
|
||||
}],
|
||||
layout: bindGroupLayout
|
||||
}]
|
||||
});
|
||||
}, shouldError);
|
||||
}).params(pcombine(poptions('bindingType', ['uniform-buffer', 'storage-buffer', 'readonly-storage-buffer', 'sampler', 'sampled-texture', 'storage-texture']), poptions('resourceType', ['error', 'uniform-buffer', 'storage-buffer', 'sampler', 'sampled-texture', 'storage-texture'])));
|
||||
}).params(pcombine(poptions('bindingType', bindingTypes), poptions('resourceType', Object.keys(BindingResourceType))));
|
||||
g.test('texture binding must have correct usage', async t => {
|
||||
const {
|
||||
type
|
||||
} = t.params;
|
||||
const type = t.params.type;
|
||||
const usage = t.params._usage;
|
||||
const bindGroupLayout = t.device.createBindGroupLayout({
|
||||
bindings: [{
|
||||
binding: 0,
|
||||
|
@ -192,23 +118,13 @@ g.test('texture binding must have correct usage', async t => {
|
|||
type
|
||||
}]
|
||||
});
|
||||
let usage;
|
||||
|
||||
if (type === 'sampled-texture') {
|
||||
usage = GPUTextureUsage.SAMPLED;
|
||||
} else if (type === 'storage-texture') {
|
||||
usage = GPUTextureUsage.STORAGE;
|
||||
} else {
|
||||
throw new Error('Unexpected binding type');
|
||||
}
|
||||
|
||||
const goodDescriptor = {
|
||||
size: {
|
||||
width: 16,
|
||||
height: 16,
|
||||
depth: 1
|
||||
},
|
||||
format: 'r8unorm',
|
||||
format: C.TextureFormat.R8Unorm,
|
||||
usage
|
||||
}; // Control case
|
||||
|
||||
|
@ -249,7 +165,13 @@ g.test('texture binding must have correct usage', async t => {
|
|||
});
|
||||
});
|
||||
}
|
||||
}).params(poptions('type', ['sampled-texture', 'storage-texture']));
|
||||
}).params([{
|
||||
type: 'sampled-texture',
|
||||
_usage: C.TextureUsage.Sampled
|
||||
}, {
|
||||
type: 'storage-texture',
|
||||
_usage: C.TextureUsage.Storage
|
||||
}]);
|
||||
g.test('texture must have correct component type', async t => {
|
||||
const {
|
||||
textureComponentType
|
||||
|
@ -272,7 +194,7 @@ g.test('texture must have correct component type', async t => {
|
|||
} else if (textureComponentType === 'uint') {
|
||||
format = 'r8uint';
|
||||
} else {
|
||||
throw new Error('Unexpected texture component type');
|
||||
unreachable('Unexpected texture component type');
|
||||
}
|
||||
|
||||
const goodDescriptor = {
|
||||
|
@ -339,7 +261,7 @@ g.test('texture must have correct dimension', async t => {
|
|||
depth: 1
|
||||
},
|
||||
arrayLayerCount: 1,
|
||||
format: 'rgba8unorm',
|
||||
format: C.TextureFormat.RGBA8Unorm,
|
||||
usage: GPUTextureUsage.SAMPLED
|
||||
}; // Control case
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
export const description = `
|
||||
createBindGroupLayout validation tests.
|
||||
`;
|
||||
import { TestGroup } from '../../../framework/index.js';
|
||||
import { C, TestGroup, poptions } from '../../../framework/index.js';
|
||||
import { bindingTypeInfo, bindingTypes } from '../format_info.js';
|
||||
import { ValidationTest } from './validation_test.js';
|
||||
|
||||
function clone(descriptor) {
|
||||
|
@ -18,11 +19,11 @@ g.test('some binding index was specified more than once', async t => {
|
|||
bindings: [{
|
||||
binding: 0,
|
||||
visibility: GPUShaderStage.COMPUTE,
|
||||
type: 'storage-buffer'
|
||||
type: C.BindingType.StorageBuffer
|
||||
}, {
|
||||
binding: 1,
|
||||
visibility: GPUShaderStage.COMPUTE,
|
||||
type: 'storage-buffer'
|
||||
type: C.BindingType.StorageBuffer
|
||||
}]
|
||||
}; // Control case
|
||||
|
||||
|
@ -39,7 +40,7 @@ g.test('negative binding index', async t => {
|
|||
bindings: [{
|
||||
binding: 0,
|
||||
visibility: GPUShaderStage.COMPUTE,
|
||||
type: 'storage-buffer'
|
||||
type: C.BindingType.StorageBuffer
|
||||
}]
|
||||
}; // Control case
|
||||
|
||||
|
@ -52,14 +53,13 @@ g.test('negative binding index', async t => {
|
|||
});
|
||||
});
|
||||
g.test('Visibility of bindings can be 0', async t => {
|
||||
const descriptor = {
|
||||
t.device.createBindGroupLayout({
|
||||
bindings: [{
|
||||
binding: 0,
|
||||
visibility: 0,
|
||||
type: 'storage-buffer'
|
||||
}]
|
||||
};
|
||||
t.device.createBindGroupLayout(descriptor);
|
||||
});
|
||||
});
|
||||
g.test('number of dynamic buffers exceeds the maximum value', async t => {
|
||||
const {
|
||||
|
@ -94,17 +94,15 @@ g.test('number of dynamic buffers exceeds the maximum value', async t => {
|
|||
t.device.createBindGroupLayout(badDescriptor);
|
||||
});
|
||||
}).params([{
|
||||
type: 'storage-buffer',
|
||||
type: C.BindingType.StorageBuffer,
|
||||
maxDynamicBufferCount: 4
|
||||
}, {
|
||||
type: 'uniform-buffer',
|
||||
type: C.BindingType.UniformBuffer,
|
||||
maxDynamicBufferCount: 8
|
||||
}]);
|
||||
g.test('dynamic set to true is allowed only for buffers', async t => {
|
||||
const {
|
||||
type,
|
||||
_success
|
||||
} = t.params;
|
||||
const type = t.params.type;
|
||||
const success = bindingTypeInfo[type].type === 'buffer';
|
||||
const descriptor = {
|
||||
bindings: [{
|
||||
binding: 0,
|
||||
|
@ -113,33 +111,8 @@ g.test('dynamic set to true is allowed only for buffers', async t => {
|
|||
hasDynamicOffset: true
|
||||
}]
|
||||
};
|
||||
|
||||
if (_success) {
|
||||
// Control case
|
||||
t.device.createBindGroupLayout(descriptor);
|
||||
} else {
|
||||
// Dynamic set to true is not allowed in some cases.
|
||||
t.expectValidationError(() => {
|
||||
t.device.createBindGroupLayout(descriptor);
|
||||
});
|
||||
}
|
||||
}).params([{
|
||||
type: 'uniform-buffer',
|
||||
_success: true
|
||||
}, {
|
||||
type: 'storage-buffer',
|
||||
_success: true
|
||||
}, {
|
||||
type: 'readonly-storage-buffer',
|
||||
_success: true
|
||||
}, {
|
||||
type: 'sampler',
|
||||
_success: false
|
||||
}, {
|
||||
type: 'sampled-texture',
|
||||
_success: false
|
||||
}, {
|
||||
type: 'storage-texture',
|
||||
_success: false
|
||||
}]);
|
||||
}, !success);
|
||||
}).params(poptions('type', bindingTypes));
|
||||
//# sourceMappingURL=createBindGroupLayout.spec.js.map
|
|
@ -5,7 +5,8 @@
|
|||
export const description = `
|
||||
createPipelineLayout validation tests.
|
||||
`;
|
||||
import { TestGroup, poptions } from '../../../framework/index.js';
|
||||
import { TestGroup, pcombine, poptions } from '../../../framework/index.js';
|
||||
import { bindingTypeInfo, bindingTypes, shaderStageCombinations } from '../format_info.js';
|
||||
import { ValidationTest } from './validation_test.js';
|
||||
|
||||
function clone(descriptor) {
|
||||
|
@ -16,14 +17,15 @@ export const g = new TestGroup(ValidationTest);
|
|||
g.test('number of dynamic buffers exceeds the maximum value', async t => {
|
||||
const {
|
||||
type,
|
||||
_expectedMaxDynamicBufferCount
|
||||
visibility
|
||||
} = t.params;
|
||||
const maxDynamicCount = bindingTypeInfo[type].maxDynamicCount;
|
||||
const maxDynamicBufferBindings = [];
|
||||
|
||||
for (let i = 0; i < _expectedMaxDynamicBufferCount; i++) {
|
||||
for (let binding = 0; binding < maxDynamicCount; binding++) {
|
||||
maxDynamicBufferBindings.push({
|
||||
binding: i,
|
||||
visibility: GPUShaderStage.COMPUTE,
|
||||
binding,
|
||||
visibility,
|
||||
type,
|
||||
hasDynamicOffset: true
|
||||
});
|
||||
|
@ -35,7 +37,7 @@ g.test('number of dynamic buffers exceeds the maximum value', async t => {
|
|||
const goodDescriptor = {
|
||||
bindings: [{
|
||||
binding: 0,
|
||||
visibility: GPUShaderStage.COMPUTE,
|
||||
visibility,
|
||||
type,
|
||||
hasDynamicOffset: false
|
||||
}]
|
||||
|
@ -54,21 +56,44 @@ g.test('number of dynamic buffers exceeds the maximum value', async t => {
|
|||
t.expectValidationError(() => {
|
||||
t.device.createPipelineLayout(badPipelineLayoutDescriptor);
|
||||
});
|
||||
}).params([{
|
||||
type: 'storage-buffer',
|
||||
_expectedMaxDynamicBufferCount: 4
|
||||
}, {
|
||||
type: 'uniform-buffer',
|
||||
_expectedMaxDynamicBufferCount: 8
|
||||
}]);
|
||||
}).params(pcombine(poptions('visibility', [0, 2, 4, 6]), //
|
||||
poptions('type', ['uniform-buffer', 'storage-buffer', 'readonly-storage-buffer'])));
|
||||
g.test('dynamic offsets are only allowed on buffers', t => {
|
||||
const {
|
||||
type,
|
||||
visibility
|
||||
} = t.params;
|
||||
const info = bindingTypeInfo[type];
|
||||
const goodDescriptor = {
|
||||
bindings: [{
|
||||
binding: 0,
|
||||
visibility,
|
||||
type,
|
||||
hasDynamicOffset: false
|
||||
}]
|
||||
};
|
||||
t.device.createPipelineLayout({
|
||||
bindGroupLayouts: [t.device.createBindGroupLayout(goodDescriptor)]
|
||||
});
|
||||
const badDescriptor = clone(goodDescriptor);
|
||||
badDescriptor.bindings[0].hasDynamicOffset = true;
|
||||
const success = info.type === 'buffer';
|
||||
t.expectValidationError(() => {
|
||||
t.device.createPipelineLayout({
|
||||
bindGroupLayouts: [t.device.createBindGroupLayout(badDescriptor)]
|
||||
});
|
||||
}, !success);
|
||||
}).params(pcombine(poptions('visibility', shaderStageCombinations), //
|
||||
poptions('type', bindingTypes)));
|
||||
g.test('number of bind group layouts exceeds the maximum value', async t => {
|
||||
const {
|
||||
visibility,
|
||||
type
|
||||
} = t.params;
|
||||
const bindGroupLayoutDescriptor = {
|
||||
bindings: [{
|
||||
binding: 0,
|
||||
visibility: GPUShaderStage.COMPUTE,
|
||||
visibility,
|
||||
type
|
||||
}]
|
||||
}; // 4 is the maximum number of bind group layouts.
|
||||
|
@ -86,5 +111,5 @@ g.test('number of bind group layouts exceeds the maximum value', async t => {
|
|||
t.expectValidationError(() => {
|
||||
t.device.createPipelineLayout(badPipelineLayoutDescriptor);
|
||||
});
|
||||
}).params(poptions('type', ['storage-buffer', 'uniform-buffer']));
|
||||
}).params(pcombine(poptions('visibility', shaderStageCombinations), poptions('type', bindingTypes)));
|
||||
//# sourceMappingURL=createPipelineLayout.spec.js.map
|
|
@ -5,8 +5,8 @@
|
|||
export const description = `
|
||||
createRenderPipeline validation tests.
|
||||
`;
|
||||
import { TestGroup } from '../../../framework/index.js';
|
||||
import { textureFormatInfo, textureFormatParams } from '../format_info.js';
|
||||
import { TestGroup, poptions } from '../../../framework/index.js';
|
||||
import { textureFormatInfo, textureFormats } from '../format_info.js';
|
||||
import { ValidationTest } from './validation_test.js';
|
||||
|
||||
class F extends ValidationTest {
|
||||
|
@ -49,7 +49,7 @@ class F extends ValidationTest {
|
|||
* `
|
||||
* )
|
||||
*/
|
||||
new Uint32Array([119734787, 66304, 524295, 21, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 393231, 0, 4, 1852399981, 0, 13, 196611, 2, 450, 262149, 4, 1852399981, 0, 393221, 11, 1348430951, 1700164197, 2019914866, 0, 393222, 11, 0, 1348430951, 1953067887, 7237481, 458758, 11, 1, 1348430951, 1953393007, 1702521171, 0, 458758, 11, 2, 1130327143, 1148217708, 1635021673, 6644590, 458758, 11, 3, 1130327143, 1147956341, 1635021673, 6644590, 196613, 13, 0, 327752, 11, 0, 11, 0, 327752, 11, 1, 11, 1, 327752, 11, 2, 11, 3, 327752, 11, 3, 11, 4, 196679, 11, 2, 131091, 2, 196641, 3, 2, 196630, 6, 32, 262167, 7, 6, 4, 262165, 8, 32, 0, 262187, 8, 9, 1, 262172, 10, 6, 9, 393246, 11, 7, 6, 10, 10, 262176, 12, 3, 11, 262203, 12, 13, 3, 262165, 14, 32, 1, 262187, 14, 15, 0, 262187, 6, 16, 0, 262187, 6, 17, 1065353216, 458796, 7, 18, 16, 16, 16, 17, 262176, 19, 3, 7, 327734, 2, 4, 0, 3, 131320, 5, 327745, 19, 20, 13, 15, 196670, 20, 18, 65789, 65592])
|
||||
new Uint32Array([119734787, 66304, 524296, 21, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 393231, 0, 4, 1852399981, 0, 13, 196611, 2, 450, 262149, 4, 1852399981, 0, 393221, 11, 1348430951, 1700164197, 2019914866, 0, 393222, 11, 0, 1348430951, 1953067887, 7237481, 458758, 11, 1, 1348430951, 1953393007, 1702521171, 0, 458758, 11, 2, 1130327143, 1148217708, 1635021673, 6644590, 458758, 11, 3, 1130327143, 1147956341, 1635021673, 6644590, 196613, 13, 0, 327752, 11, 0, 11, 0, 327752, 11, 1, 11, 1, 327752, 11, 2, 11, 3, 327752, 11, 3, 11, 4, 196679, 11, 2, 131091, 2, 196641, 3, 2, 196630, 6, 32, 262167, 7, 6, 4, 262165, 8, 32, 0, 262187, 8, 9, 1, 262172, 10, 6, 9, 393246, 11, 7, 6, 10, 10, 262176, 12, 3, 11, 262203, 12, 13, 3, 262165, 14, 32, 1, 262187, 14, 15, 0, 262187, 6, 16, 0, 262187, 6, 17, 1065353216, 458796, 7, 18, 16, 16, 16, 17, 262176, 19, 3, 7, 327734, 2, 4, 0, 3, 131320, 5, 327745, 19, 20, 13, 15, 196670, 20, 18, 65789, 65592])
|
||||
}),
|
||||
entryPoint: 'main'
|
||||
};
|
||||
|
@ -126,9 +126,7 @@ g.test('at least one color state is required', async t => {
|
|||
});
|
||||
});
|
||||
g.test('color formats must be renderable', async t => {
|
||||
const {
|
||||
format
|
||||
} = t.params;
|
||||
const format = t.params.format;
|
||||
const info = textureFormatInfo[format];
|
||||
const descriptor = t.getDescriptor({
|
||||
colorStates: [{
|
||||
|
@ -145,7 +143,7 @@ g.test('color formats must be renderable', async t => {
|
|||
t.device.createRenderPipeline(descriptor);
|
||||
});
|
||||
}
|
||||
}).params(textureFormatParams);
|
||||
}).params(poptions('format', textureFormats));
|
||||
g.test('sample count must be valid', async t => {
|
||||
const {
|
||||
sampleCount,
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
export const description = `
|
||||
createTexture validation tests.
|
||||
`;
|
||||
import { TestGroup } from '../../../framework/index.js';
|
||||
import { textureFormatInfo, textureFormatParams } from '../format_info.js';
|
||||
import { TestGroup, poptions } from '../../../framework/index.js';
|
||||
import { textureFormatInfo, textureFormats } from '../format_info.js';
|
||||
import { ValidationTest } from './validation_test.js';
|
||||
|
||||
class F extends ValidationTest {
|
||||
|
@ -124,18 +124,30 @@ g.test('validation of mipLevelCount', async t => {
|
|||
mipLevelCount: 6,
|
||||
_success: true
|
||||
}, // full mip chains are allowed (Mip level sizes: 32, 16, 8, 4, 2, 1)
|
||||
{
|
||||
width: 31,
|
||||
height: 32,
|
||||
mipLevelCount: 6,
|
||||
_success: true
|
||||
}, // full mip chains are allowed (Mip level sizes: 31x32, 15x16, 7x8, 3x4, 1x2, 1x1)
|
||||
{
|
||||
width: 32,
|
||||
height: 31,
|
||||
mipLevelCount: 6,
|
||||
_success: true
|
||||
}, // full mip chains are allowed (Mip level sizes: 32x31, 16x15, 8x7, 4x3, 2x1, 1x1)
|
||||
{
|
||||
width: 31,
|
||||
height: 32,
|
||||
mipLevelCount: 7,
|
||||
_success: false
|
||||
}, // too big mip chains on width are disallowed (Mip level width: 31, 15, 7, 3, 1, 1)
|
||||
}, // too big mip chains on width are disallowed (Mip level sizes: 31x32, 15x16, 7x8, 3x4, 1x2, 1x1, ?x?)
|
||||
{
|
||||
width: 32,
|
||||
height: 31,
|
||||
mipLevelCount: 7,
|
||||
_success: false
|
||||
}, // too big mip chains on height are disallowed (Mip level width: 31, 15, 7, 3, 1, 1)
|
||||
}, // too big mip chains on height are disallowed (Mip level sizes: 32x31, 16x15, 8x7, 4x3, 2x1, 1x1, ?x?)
|
||||
{
|
||||
width: 32,
|
||||
height: 32,
|
||||
|
@ -210,9 +222,7 @@ g.test('it is invalid to submit a destroyed texture before and after encode', as
|
|||
_success: false
|
||||
}]);
|
||||
g.test('it is invalid to have an output attachment texture with non renderable format', async t => {
|
||||
const {
|
||||
format
|
||||
} = t.params;
|
||||
const format = t.params.format;
|
||||
const info = textureFormatInfo[format];
|
||||
const descriptor = t.getDescriptor({
|
||||
width: 1,
|
||||
|
@ -222,5 +232,5 @@ g.test('it is invalid to have an output attachment texture with non renderable f
|
|||
t.expectValidationError(() => {
|
||||
t.device.createTexture(descriptor);
|
||||
}, !info.renderable);
|
||||
}).params(textureFormatParams); // TODO: Add tests for compressed texture formats
|
||||
}).params(poptions('format', textureFormats)); // TODO: Add tests for compressed texture formats
|
||||
//# sourceMappingURL=createTexture.spec.js.map
|
|
@ -32,7 +32,7 @@ class F extends ValidationTest {
|
|||
* `
|
||||
* )
|
||||
*/
|
||||
new Uint32Array([119734787, 66304, 524295, 47, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 458767, 0, 4, 1852399981, 0, 13, 33, 196611, 2, 450, 262149, 4, 1852399981, 0, 393221, 11, 1348430951, 1700164197, 2019914866, 0, 393222, 11, 0, 1348430951, 1953067887, 7237481, 458758, 11, 1, 1348430951, 1953393007, 1702521171, 0, 458758, 11, 2, 1130327143, 1148217708, 1635021673, 6644590, 458758, 11, 3, 1130327143, 1147956341, 1635021673, 6644590, 196613, 13, 0, 458757, 18, 1953654134, 1851095141, 1919903337, 1718960749, 7497062, 393222, 18, 0, 1851880052, 1919903347, 109, 196613, 20, 0, 393221, 33, 1449094247, 1702130277, 1684949368, 30821, 327685, 36, 1701080681, 1818386808, 101, 327752, 11, 0, 11, 0, 327752, 11, 1, 11, 1, 327752, 11, 2, 11, 3, 327752, 11, 3, 11, 4, 196679, 11, 2, 262216, 18, 0, 5, 327752, 18, 0, 35, 0, 327752, 18, 0, 7, 16, 196679, 18, 2, 262215, 20, 34, 0, 262215, 20, 33, 0, 262215, 33, 11, 42, 131091, 2, 196641, 3, 2, 196630, 6, 32, 262167, 7, 6, 4, 262165, 8, 32, 0, 262187, 8, 9, 1, 262172, 10, 6, 9, 393246, 11, 7, 6, 10, 10, 262176, 12, 3, 11, 262203, 12, 13, 3, 262165, 14, 32, 1, 262187, 14, 15, 0, 262167, 16, 6, 2, 262168, 17, 16, 2, 196638, 18, 17, 262176, 19, 2, 18, 262203, 19, 20, 2, 262176, 21, 2, 17, 262187, 8, 24, 3, 262172, 25, 16, 24, 262187, 6, 26, 3212836864, 327724, 16, 27, 26, 26, 262187, 6, 28, 1065353216, 327724, 16, 29, 28, 26, 327724, 16, 30, 26, 28, 393260, 25, 31, 27, 29, 30, 262176, 32, 1, 14, 262203, 32, 33, 1, 262176, 35, 7, 25, 262176, 37, 7, 16, 262187, 6, 41, 0, 262176, 45, 3, 7, 327734, 2, 4, 0, 3, 131320, 5, 262203, 35, 36, 7, 327745, 21, 22, 20, 15, 262205, 17, 23, 22, 262205, 14, 34, 33, 196670, 36, 31, 327745, 37, 38, 36, 34, 262205, 16, 39, 38, 327825, 16, 40, 23, 39, 327761, 6, 42, 40, 0, 327761, 6, 43, 40, 1, 458832, 7, 44, 42, 43, 41, 28, 327745, 45, 46, 13, 15, 196670, 46, 44, 65789, 65592])
|
||||
new Uint32Array([119734787, 66304, 524296, 47, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 458767, 0, 4, 1852399981, 0, 13, 33, 196611, 2, 450, 262149, 4, 1852399981, 0, 393221, 11, 1348430951, 1700164197, 2019914866, 0, 393222, 11, 0, 1348430951, 1953067887, 7237481, 458758, 11, 1, 1348430951, 1953393007, 1702521171, 0, 458758, 11, 2, 1130327143, 1148217708, 1635021673, 6644590, 458758, 11, 3, 1130327143, 1147956341, 1635021673, 6644590, 196613, 13, 0, 458757, 18, 1953654134, 1851095141, 1919903337, 1718960749, 7497062, 393222, 18, 0, 1851880052, 1919903347, 109, 196613, 20, 0, 393221, 33, 1449094247, 1702130277, 1684949368, 30821, 327685, 36, 1701080681, 1818386808, 101, 327752, 11, 0, 11, 0, 327752, 11, 1, 11, 1, 327752, 11, 2, 11, 3, 327752, 11, 3, 11, 4, 196679, 11, 2, 262216, 18, 0, 5, 327752, 18, 0, 35, 0, 327752, 18, 0, 7, 16, 196679, 18, 2, 262215, 20, 34, 0, 262215, 20, 33, 0, 262215, 33, 11, 42, 131091, 2, 196641, 3, 2, 196630, 6, 32, 262167, 7, 6, 4, 262165, 8, 32, 0, 262187, 8, 9, 1, 262172, 10, 6, 9, 393246, 11, 7, 6, 10, 10, 262176, 12, 3, 11, 262203, 12, 13, 3, 262165, 14, 32, 1, 262187, 14, 15, 0, 262167, 16, 6, 2, 262168, 17, 16, 2, 196638, 18, 17, 262176, 19, 2, 18, 262203, 19, 20, 2, 262176, 21, 2, 17, 262187, 8, 24, 3, 262172, 25, 16, 24, 262187, 6, 26, 3212836864, 327724, 16, 27, 26, 26, 262187, 6, 28, 1065353216, 327724, 16, 29, 28, 26, 327724, 16, 30, 26, 28, 393260, 25, 31, 27, 29, 30, 262176, 32, 1, 14, 262203, 32, 33, 1, 262176, 35, 7, 25, 262176, 37, 7, 16, 262187, 6, 41, 0, 262176, 45, 3, 7, 327734, 2, 4, 0, 3, 131320, 5, 262203, 35, 36, 7, 327745, 21, 22, 20, 15, 262205, 17, 23, 22, 262205, 14, 34, 33, 196670, 36, 31, 327745, 37, 38, 36, 34, 262205, 16, 39, 38, 327825, 16, 40, 23, 39, 327761, 6, 42, 40, 0, 327761, 6, 43, 40, 1, 458832, 7, 44, 42, 43, 41, 28, 327745, 45, 46, 13, 15, 196670, 46, 44, 65789, 65592])
|
||||
});
|
||||
const fragmentModule = this.createShaderModule({
|
||||
code:
|
||||
|
@ -48,7 +48,7 @@ class F extends ValidationTest {
|
|||
* `
|
||||
* )
|
||||
*/
|
||||
new Uint32Array([119734787, 66304, 524295, 13, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 393231, 4, 4, 1852399981, 0, 12, 196624, 4, 7, 196611, 2, 450, 262149, 4, 1852399981, 0, 524293, 8, 1734439526, 1953391981, 1718185557, 1114468975, 1701209717, 114, 327686, 8, 0, 1869377379, 114, 196613, 10, 0, 327685, 12, 1734439526, 1869377347, 114, 327752, 8, 0, 35, 0, 196679, 8, 2, 262215, 10, 34, 1, 262215, 10, 33, 0, 262215, 12, 30, 0, 131091, 2, 196641, 3, 2, 196630, 6, 32, 262167, 7, 6, 4, 196638, 8, 7, 262176, 9, 2, 8, 262203, 9, 10, 2, 262176, 11, 3, 7, 262203, 11, 12, 3, 327734, 2, 4, 0, 3, 131320, 5, 65789, 65592])
|
||||
new Uint32Array([119734787, 66304, 524296, 13, 0, 131089, 1, 393227, 1, 1280527431, 1685353262, 808793134, 0, 196622, 0, 1, 393231, 4, 4, 1852399981, 0, 12, 196624, 4, 7, 196611, 2, 450, 262149, 4, 1852399981, 0, 524293, 8, 1734439526, 1953391981, 1718185557, 1114468975, 1701209717, 114, 327686, 8, 0, 1869377379, 114, 196613, 10, 0, 327685, 12, 1734439526, 1869377347, 114, 327752, 8, 0, 35, 0, 196679, 8, 2, 262215, 10, 34, 1, 262215, 10, 33, 0, 262215, 12, 30, 0, 131091, 2, 196641, 3, 2, 196630, 6, 32, 262167, 7, 6, 4, 196638, 8, 7, 262176, 9, 2, 8, 262203, 9, 10, 2, 262176, 11, 3, 7, 262203, 11, 12, 3, 327734, 2, 4, 0, 3, 131320, 5, 65789, 65592])
|
||||
});
|
||||
const pipeline = this.device.createRenderPipeline({
|
||||
vertexStage: {
|
||||
|
|
|
@ -2,19 +2,158 @@
|
|||
* AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts
|
||||
**/
|
||||
|
||||
import { unreachable } from '../../../framework/index.js';
|
||||
import { GPUTest } from '../gpu_test.js';
|
||||
export let BindingResourceType;
|
||||
|
||||
(function (BindingResourceType) {
|
||||
BindingResourceType["error-buffer"] = "error-buffer";
|
||||
BindingResourceType["error-sampler"] = "error-sampler";
|
||||
BindingResourceType["error-textureview"] = "error-textureview";
|
||||
BindingResourceType["uniform-buffer"] = "uniform-buffer";
|
||||
BindingResourceType["storage-buffer"] = "storage-buffer";
|
||||
BindingResourceType["sampler"] = "sampler";
|
||||
BindingResourceType["sampled-textureview"] = "sampled-textureview";
|
||||
BindingResourceType["storage-textureview"] = "storage-textureview";
|
||||
})(BindingResourceType || (BindingResourceType = {}));
|
||||
|
||||
export function resourceBindingMatches(b, r) {
|
||||
switch (b) {
|
||||
case 'storage-buffer':
|
||||
case 'readonly-storage-buffer':
|
||||
return r === 'storage-buffer';
|
||||
|
||||
case 'sampled-texture':
|
||||
return r === 'sampled-textureview';
|
||||
|
||||
case 'sampler':
|
||||
return r === 'sampler';
|
||||
|
||||
case 'storage-texture':
|
||||
return r === 'storage-textureview';
|
||||
|
||||
case 'uniform-buffer':
|
||||
return r === 'uniform-buffer';
|
||||
|
||||
default:
|
||||
unreachable('unknown GPUBindingType');
|
||||
}
|
||||
}
|
||||
export class ValidationTest extends GPUTest {
|
||||
async getErrorBuffer() {
|
||||
getStorageBuffer() {
|
||||
return this.device.createBuffer({
|
||||
size: 1024,
|
||||
usage: GPUBufferUsage.STORAGE
|
||||
});
|
||||
}
|
||||
|
||||
getUniformBuffer() {
|
||||
return this.device.createBuffer({
|
||||
size: 1024,
|
||||
usage: GPUBufferUsage.UNIFORM
|
||||
});
|
||||
}
|
||||
|
||||
getErrorBuffer() {
|
||||
this.device.pushErrorScope('validation');
|
||||
const errorBuffer = this.device.createBuffer({
|
||||
size: 1024,
|
||||
usage: 0xffff // Invalid GPUBufferUsage
|
||||
|
||||
});
|
||||
await this.device.popErrorScope();
|
||||
this.device.popErrorScope();
|
||||
return errorBuffer;
|
||||
}
|
||||
|
||||
getSampler() {
|
||||
return this.device.createSampler();
|
||||
}
|
||||
|
||||
getErrorSampler() {
|
||||
this.device.pushErrorScope('validation');
|
||||
const sampler = this.device.createSampler({
|
||||
lodMinClamp: -1
|
||||
});
|
||||
this.device.popErrorScope();
|
||||
return sampler;
|
||||
}
|
||||
|
||||
getSampledTexture() {
|
||||
return this.device.createTexture({
|
||||
size: {
|
||||
width: 16,
|
||||
height: 16,
|
||||
depth: 1
|
||||
},
|
||||
format: 'rgba8unorm',
|
||||
usage: GPUTextureUsage.SAMPLED
|
||||
});
|
||||
}
|
||||
|
||||
getStorageTexture() {
|
||||
return this.device.createTexture({
|
||||
size: {
|
||||
width: 16,
|
||||
height: 16,
|
||||
depth: 1
|
||||
},
|
||||
format: 'rgba8unorm',
|
||||
usage: GPUTextureUsage.STORAGE
|
||||
});
|
||||
}
|
||||
|
||||
getErrorTextureView() {
|
||||
this.device.pushErrorScope('validation');
|
||||
const view = this.device.createTexture({
|
||||
size: {
|
||||
width: 0,
|
||||
height: 0,
|
||||
depth: 0
|
||||
},
|
||||
format: 'rgba8unorm',
|
||||
usage: GPUTextureUsage.SAMPLED
|
||||
}).createView();
|
||||
this.device.popErrorScope();
|
||||
return view;
|
||||
}
|
||||
|
||||
getBindingResource(bindingType) {
|
||||
switch (bindingType) {
|
||||
case 'error-buffer':
|
||||
return {
|
||||
buffer: this.getErrorBuffer()
|
||||
};
|
||||
|
||||
case 'error-sampler':
|
||||
return this.getErrorSampler();
|
||||
|
||||
case 'error-textureview':
|
||||
return this.getErrorTextureView();
|
||||
|
||||
case 'uniform-buffer':
|
||||
return {
|
||||
buffer: this.getUniformBuffer()
|
||||
};
|
||||
|
||||
case 'storage-buffer':
|
||||
return {
|
||||
buffer: this.getStorageBuffer()
|
||||
};
|
||||
|
||||
case 'sampler':
|
||||
return this.getSampler();
|
||||
|
||||
case 'sampled-textureview':
|
||||
return this.getSampledTexture().createView();
|
||||
|
||||
case 'storage-textureview':
|
||||
return this.getStorageTexture().createView();
|
||||
|
||||
default:
|
||||
unreachable('unknown binding resource type');
|
||||
}
|
||||
}
|
||||
|
||||
expectValidationError(fn, shouldError = true) {
|
||||
// If no error is expected, we let the scope surrounding the test catch it.
|
||||
if (shouldError === false) {
|
||||
|
|
|
@ -5,12 +5,13 @@
|
|||
export const description = `
|
||||
vertexState validation tests.
|
||||
`;
|
||||
import { TestGroup } from '../../../framework/index.js';
|
||||
import { C, TestGroup } from '../../../framework/index.js';
|
||||
import { ValidationTest } from './validation_test.js';
|
||||
const MAX_VERTEX_ATTRIBUTES = 16;
|
||||
const MAX_VERTEX_BUFFER_END = 2048;
|
||||
const MAX_VERTEX_BUFFER_ARRAY_STRIDE = 2048;
|
||||
const MAX_VERTEX_BUFFERS = 16;
|
||||
const SIZEOF_FLOAT = Float32Array.BYTES_PER_ELEMENT;
|
||||
const VERTEX_SHADER_CODE_WITH_NO_INPUT = `
|
||||
#version 450
|
||||
void main() {
|
||||
|
@ -135,7 +136,7 @@ g.test('a null buffer is valid', t => {
|
|||
g.test('pipeline vertex buffers are backed by attributes in vertex input', async t => {
|
||||
const vertexState = {
|
||||
vertexBuffers: [{
|
||||
arrayStride: 2 * Float32Array.BYTES_PER_ELEMENT,
|
||||
arrayStride: 2 * SIZEOF_FLOAT,
|
||||
attributes: [{
|
||||
format: 'float',
|
||||
offset: 0,
|
||||
|
@ -192,7 +193,7 @@ g.test('an arrayStride of 0 is valid', t => {
|
|||
vertexBuffers: [{
|
||||
arrayStride: 0,
|
||||
attributes: [{
|
||||
format: 'float',
|
||||
format: C.VertexFormat.Float,
|
||||
offset: 0,
|
||||
shaderLocation: 0
|
||||
}]
|
||||
|
@ -213,14 +214,14 @@ g.test('an arrayStride of 0 is valid', t => {
|
|||
g.test('offset should be within vertex buffer arrayStride if arrayStride is not zero', async t => {
|
||||
const vertexState = {
|
||||
vertexBuffers: [{
|
||||
arrayStride: 2 * Float32Array.BYTES_PER_ELEMENT,
|
||||
arrayStride: 2 * SIZEOF_FLOAT,
|
||||
attributes: [{
|
||||
format: 'float',
|
||||
format: C.VertexFormat.Float,
|
||||
offset: 0,
|
||||
shaderLocation: 0
|
||||
}, {
|
||||
format: 'float',
|
||||
offset: Float32Array.BYTES_PER_ELEMENT,
|
||||
format: C.VertexFormat.Float,
|
||||
offset: SIZEOF_FLOAT,
|
||||
shaderLocation: 1
|
||||
}]
|
||||
}]
|
||||
|
@ -233,7 +234,7 @@ g.test('offset should be within vertex buffer arrayStride if arrayStride is not
|
|||
{
|
||||
// Test vertex attribute offset exceed vertex buffer arrayStride range
|
||||
const badVertexState = clone(vertexState);
|
||||
badVertexState.vertexBuffers[0].attributes[1].format = 'float2';
|
||||
badVertexState.vertexBuffers[0].attributes[1].format = C.VertexFormat.Float2;
|
||||
const descriptor = t.getDescriptor(badVertexState, VERTEX_SHADER_CODE_WITH_NO_INPUT);
|
||||
t.expectValidationError(() => {
|
||||
t.device.createRenderPipeline(descriptor);
|
||||
|
@ -242,7 +243,7 @@ g.test('offset should be within vertex buffer arrayStride if arrayStride is not
|
|||
{
|
||||
// Test vertex attribute offset exceed vertex buffer arrayStride range
|
||||
const badVertexState = clone(vertexState);
|
||||
badVertexState.vertexBuffers[0].arrayStride = Float32Array.BYTES_PER_ELEMENT;
|
||||
badVertexState.vertexBuffers[0].arrayStride = SIZEOF_FLOAT;
|
||||
const descriptor = t.getDescriptor(badVertexState, VERTEX_SHADER_CODE_WITH_NO_INPUT);
|
||||
t.expectValidationError(() => {
|
||||
t.device.createRenderPipeline(descriptor);
|
||||
|
@ -259,14 +260,14 @@ g.test('offset should be within vertex buffer arrayStride if arrayStride is not
|
|||
g.test('check two attributes overlapping', async t => {
|
||||
const vertexState = {
|
||||
vertexBuffers: [{
|
||||
arrayStride: 2 * Float32Array.BYTES_PER_ELEMENT,
|
||||
arrayStride: 2 * SIZEOF_FLOAT,
|
||||
attributes: [{
|
||||
format: 'float',
|
||||
format: C.VertexFormat.Float,
|
||||
offset: 0,
|
||||
shaderLocation: 0
|
||||
}, {
|
||||
format: 'float',
|
||||
offset: Float32Array.BYTES_PER_ELEMENT,
|
||||
format: C.VertexFormat.Float,
|
||||
offset: SIZEOF_FLOAT,
|
||||
shaderLocation: 1
|
||||
}]
|
||||
}]
|
||||
|
@ -279,7 +280,7 @@ g.test('check two attributes overlapping', async t => {
|
|||
{
|
||||
// Test two attributes overlapping
|
||||
const badVertexState = clone(vertexState);
|
||||
badVertexState.vertexBuffers[0].attributes[0].format = 'int2';
|
||||
badVertexState.vertexBuffers[0].attributes[0].format = C.VertexFormat.Int2;
|
||||
const descriptor = t.getDescriptor(badVertexState, VERTEX_SHADER_CODE_WITH_NO_INPUT);
|
||||
t.expectValidationError(() => {
|
||||
t.device.createRenderPipeline(descriptor);
|
||||
|
@ -430,7 +431,7 @@ g.test('check multiple of 4 bytes constraint on input arrayStride', async t => {
|
|||
vertexBuffers: [{
|
||||
arrayStride: 4,
|
||||
attributes: [{
|
||||
format: 'uchar2',
|
||||
format: C.VertexFormat.Uchar2,
|
||||
offset: 0,
|
||||
shaderLocation: 0
|
||||
}]
|
||||
|
@ -455,7 +456,7 @@ g.test('identical duplicate attributes are invalid', async t => {
|
|||
vertexBuffers: [{
|
||||
arrayStride: 0,
|
||||
attributes: [{
|
||||
format: 'float',
|
||||
format: C.VertexFormat.Float,
|
||||
offset: 0,
|
||||
shaderLocation: 0
|
||||
}]
|
||||
|
@ -469,7 +470,7 @@ g.test('identical duplicate attributes are invalid', async t => {
|
|||
{
|
||||
// Oh no, attribute 0 is set twice
|
||||
vertexState.vertexBuffers[0].attributes.push({
|
||||
format: 'float',
|
||||
format: C.VertexFormat.Float,
|
||||
offset: 0,
|
||||
shaderLocation: 0
|
||||
});
|
||||
|
@ -485,12 +486,12 @@ g.test('we cannot set same shader location', async t => {
|
|||
vertexBuffers: [{
|
||||
arrayStride: 0,
|
||||
attributes: [{
|
||||
format: 'float',
|
||||
format: C.VertexFormat.Float,
|
||||
offset: 0,
|
||||
shaderLocation: 0
|
||||
}, {
|
||||
format: 'float',
|
||||
offset: Float32Array.BYTES_PER_ELEMENT,
|
||||
format: C.VertexFormat.Float,
|
||||
offset: SIZEOF_FLOAT,
|
||||
shaderLocation: 1
|
||||
}]
|
||||
}]
|
||||
|
@ -539,7 +540,7 @@ g.test('check out of bounds condition on attribute shader location', async t =>
|
|||
vertexBuffers: [{
|
||||
arrayStride: 0,
|
||||
attributes: [{
|
||||
format: 'float',
|
||||
format: C.VertexFormat.Float,
|
||||
offset: 0,
|
||||
shaderLocation: MAX_VERTEX_ATTRIBUTES - 1
|
||||
}]
|
||||
|
@ -564,8 +565,8 @@ g.test('check attribute offset out of bounds', async t => {
|
|||
vertexBuffers: [{
|
||||
arrayStride: 0,
|
||||
attributes: [{
|
||||
format: 'float2',
|
||||
offset: MAX_VERTEX_BUFFER_END - 2 * Float32Array.BYTES_PER_ELEMENT,
|
||||
format: C.VertexFormat.Float2,
|
||||
offset: MAX_VERTEX_BUFFER_END - 2 * SIZEOF_FLOAT,
|
||||
shaderLocation: 0
|
||||
}]
|
||||
}]
|
||||
|
@ -595,8 +596,8 @@ g.test('check multiple of 4 bytes constraint on offset', async t => {
|
|||
vertexBuffers: [{
|
||||
arrayStride: 0,
|
||||
attributes: [{
|
||||
format: 'float',
|
||||
offset: Float32Array.BYTES_PER_ELEMENT,
|
||||
format: C.VertexFormat.Float,
|
||||
offset: SIZEOF_FLOAT,
|
||||
shaderLocation: 0
|
||||
}]
|
||||
}]
|
||||
|
@ -609,7 +610,7 @@ g.test('check multiple of 4 bytes constraint on offset', async t => {
|
|||
{
|
||||
// Test offset of 2 bytes with uchar2 format
|
||||
vertexState.vertexBuffers[0].attributes[0].offset = 2;
|
||||
vertexState.vertexBuffers[0].attributes[0].format = 'uchar2';
|
||||
vertexState.vertexBuffers[0].attributes[0].format = C.VertexFormat.Uchar2;
|
||||
const descriptor = t.getDescriptor(vertexState, VERTEX_SHADER_CODE_WITH_NO_INPUT);
|
||||
t.expectValidationError(() => {
|
||||
t.device.createRenderPipeline(descriptor);
|
||||
|
@ -618,7 +619,7 @@ g.test('check multiple of 4 bytes constraint on offset', async t => {
|
|||
{
|
||||
// Test offset of 2 bytes with float format
|
||||
vertexState.vertexBuffers[0].attributes[0].offset = 2;
|
||||
vertexState.vertexBuffers[0].attributes[0].format = 'float';
|
||||
vertexState.vertexBuffers[0].attributes[0].format = C.VertexFormat.Float;
|
||||
const descriptor = t.getDescriptor(vertexState, VERTEX_SHADER_CODE_WITH_NO_INPUT);
|
||||
t.expectValidationError(() => {
|
||||
t.device.createRenderPipeline(descriptor);
|
||||
|
|
|
@ -20,7 +20,11 @@ promise_test(async t => {
|
|||
// Testing of event.errorText can be added later once it's content is
|
||||
// specified in spec with more detail.
|
||||
assert_true(event.errorCode >= 300 && event.errorCode <= 799, "errorCode");
|
||||
assert_true(event.hostCandidate.includes(":"), "hostCandidate");
|
||||
if (event.port == 0) {
|
||||
assert_equals(event.address, null);
|
||||
} else {
|
||||
assert_true(event.address.includes(".") || event.address.includes(":"));
|
||||
}
|
||||
assert_true(event.url.includes("123"), "url");
|
||||
});
|
||||
const stream = await getNoiseStream({audio:true});
|
||||
|
|
|
@ -114,7 +114,7 @@ idl_test(
|
|||
RTCRtpReceiver: [`new RTCPeerConnection().addTransceiver('audio').receiver`],
|
||||
RTCPeerConnectionIceEvent: [`new RTCPeerConnectionIceEvent('ice')`],
|
||||
RTCPeerConnectionIceErrorEvent: [
|
||||
`new RTCPeerConnectionIceErrorEvent('ice-error', { errorCode: 701 });`
|
||||
`new RTCPeerConnectionIceErrorEvent('ice-error', { port: 0, errorCode: 701 });`
|
||||
],
|
||||
RTCTrackEvent: [`initTrackEvent()`],
|
||||
RTCErrorEvent: [`new RTCErrorEvent('error')`],
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
<!DOCTYPE html>
|
||||
<body>
|
||||
<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_asserts.js"></script>
|
||||
<canvas></canvas>
|
||||
|
||||
<script>
|
||||
|
||||
let testName = "XRFrame getViewerPose(refSpace) matches getPose(viewer, refSpace).";
|
||||
|
||||
// Used for viewer origin, the actual values should not matter for the test.
|
||||
const poseTransform = {
|
||||
position: [1, 2, 3],
|
||||
orientation: [0.5, 0.5, 0.5, 0.5] // 120 degrees around [1, 1, 1] axis
|
||||
};
|
||||
|
||||
// Use the same device as tracked immersive device, but modify the viewer origin.
|
||||
const deviceInitParams = Object.assign({}, TRACKED_IMMERSIVE_DEVICE, {viewerOrigin: poseTransform});
|
||||
|
||||
// Used when creating a reference space that is offset from local space.
|
||||
// Actual values should not matter for the test.
|
||||
const offsetSpaceTransform = new XRRigidTransform(
|
||||
{ x: 1.00, y: -1.50, z: 10.00, w: 1.0 },
|
||||
{ x: 0.27, y: 0.00, z: 0.27, w: 0.92}, // 45 degrees around [1, 0, 1] axis
|
||||
);
|
||||
|
||||
const testFunction = function(session, fakeDeviceController, t) {
|
||||
return Promise.all([
|
||||
session.requestReferenceSpace('local'),
|
||||
session.requestReferenceSpace('viewer'),
|
||||
]).then(([referenceSpace, viewerRefSpace]) => new Promise((resolve, reject) => {
|
||||
const offsetRefSpace = referenceSpace.getOffsetReferenceSpace(offsetSpaceTransform);
|
||||
|
||||
function onFrame(time, frame){
|
||||
t.step(() => {
|
||||
const pose1 = frame.getViewerPose(referenceSpace);
|
||||
const pose2 = frame.getPose(viewerRefSpace, referenceSpace);
|
||||
assert_not_equals(pose1, null);
|
||||
assert_not_equals(pose2, null);
|
||||
assert_matrix_approx_equals(pose1.transform.matrix, pose2.transform.matrix);
|
||||
|
||||
const pose3 = frame.getViewerPose(offsetRefSpace);
|
||||
const pose4 = frame.getPose(viewerRefSpace, offsetRefSpace);
|
||||
assert_not_equals(pose3, null);
|
||||
assert_not_equals(pose4, null);
|
||||
assert_matrix_approx_equals(pose3.transform.matrix, pose4.transform.matrix);
|
||||
});
|
||||
|
||||
resolve();
|
||||
}
|
||||
|
||||
session.requestAnimationFrame(onFrame);
|
||||
}));
|
||||
};
|
||||
|
||||
xr_session_promise_test(testName, testFunction,
|
||||
deviceInitParams, 'immersive-vr');
|
||||
|
||||
</script>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue