diff --git a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini index 76b398963ae..a9e46713244 100644 --- a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -7,7 +7,7 @@ expected: FAIL [Opening a blob URL in a new window immediately before revoking it works.] - expected: FAIL + expected: TIMEOUT [Opening a blob URL in a noopener about:blank window immediately before revoking it works.] expected: FAIL diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 0942f7eec75..a502e5cdf0a 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -148065,6 +148065,42 @@ {} ] ], + "css/css-text-decor/text-decoration-subelements-001.html": [ + [ + "css/css-text-decor/text-decoration-subelements-001.html", + [ + [ + "/css/css-text-decor/reference/text-decoration-subelements-001-notref.html", + "!=" + ] + ], + {} + ] + ], + "css/css-text-decor/text-decoration-subelements-002.html": [ + [ + "css/css-text-decor/text-decoration-subelements-002.html", + [ + [ + "/css/css-text-decor/reference/text-decoration-subelements-002-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-text-decor/text-decoration-subelements-003.html": [ + [ + "css/css-text-decor/text-decoration-subelements-003.html", + [ + [ + "/css/css-text-decor/reference/text-decoration-subelements-003-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-text-decor/text-decoration-thickness-001.html": [ [ "css/css-text-decor/text-decoration-thickness-001.html", @@ -169321,6 +169357,18 @@ {} ] ], + "css/css-ui/resize-change-margin.html": [ + [ + "css/css-ui/resize-change-margin.html", + [ + [ + "/css/css-ui/resize-change-margin-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-ui/text-overflow-001.html": [ [ "css/css-ui/text-overflow-001.html", @@ -232466,6 +232514,18 @@ "cookies/README.md": [ [] ], + "cookies/domain/domain-attribute-host-with-and-without-leading-period.sub.html.sub.headers": [ + [] + ], + "cookies/domain/domain-attribute-host-with-leading-period.sub.html.sub.headers": [ + [] + ], + "cookies/domain/domain-attribute-matches-host.sub.html.sub.headers": [ + [] + ], + "cookies/domain/domain-attribute-missing.sub.html.headers": [ + [] + ], "cookies/http-state/resources/all-tests.html.py-str": [ [] ], @@ -259043,6 +259103,15 @@ "css/css-text-decor/reference/text-decoration-style-recalc-ref.html": [ [] ], + "css/css-text-decor/reference/text-decoration-subelements-001-notref.html": [ + [] + ], + "css/css-text-decor/reference/text-decoration-subelements-002-ref.html": [ + [] + ], + "css/css-text-decor/reference/text-decoration-subelements-003-ref.html": [ + [] + ], "css/css-text-decor/reference/text-decoration-thickness-001-notref.html": [ [] ], @@ -262277,6 +262346,9 @@ "css/css-ui/reference/text-overflow-ellipsis-indent-001-ref.html": [ [] ], + "css/css-ui/resize-change-margin-ref.html": [ + [] + ], "css/css-ui/support/1x1-red.png": [ [] ], @@ -276260,6 +276332,9 @@ "html/infrastructure/safe-passing-of-structured-data/resources/echo-worker.js.headers": [ [] ], + "html/infrastructure/safe-passing-of-structured-data/resources/post-parent-type-error.html": [ + [] + ], "html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/broadcastchannel-success-and-failure.https.html.headers": [ [] ], @@ -291845,6 +291920,9 @@ "tools/wptrunner/wptrunner/metadata.py": [ [] ], + "tools/wptrunner/wptrunner/process.py": [ + [] + ], "tools/wptrunner/wptrunner/products.py": [ [] ], @@ -292271,6 +292349,12 @@ "trusted-types/default-policy.tentative.html.headers": [ [] ], + "trusted-types/empty-default-policy-report-only.tentative.html.headers": [ + [] + ], + "trusted-types/empty-default-policy.tentative.html.headers": [ + [] + ], "trusted-types/support/WorkerGlobalScope-importScripts.https.js": [ [] ], @@ -292934,6 +293018,27 @@ "web-animations/timing-model/animations/update-playback-rate-zero-ref.html": [ [] ], + "web-bundle/META.yml": [ + [] + ], + "web-bundle/README.md": [ + [] + ], + "web-bundle/resources/generate-test-wbns.sh": [ + [] + ], + "web-bundle/resources/location/location.html": [ + [] + ], + "web-bundle/resources/location/location.js": [ + [] + ], + "web-bundle/resources/wbn/__dir__.headers": [ + [] + ], + "web-bundle/resources/wbn/location.wbn": [ + [] + ], "web-locks/META.yml": [ [] ], @@ -293594,6 +293699,9 @@ "webgpu/suites/cts/command_buffer/render/storeop.spec.js": [ [] ], + "webgpu/suites/cts/copyImageBitmapToTexture.spec.js": [ + [] + ], "webgpu/suites/cts/examples.spec.js": [ [] ], @@ -311275,6 +311383,41 @@ {} ] ], + "WebCryptoAPI/historical.any.js": [ + [ + "WebCryptoAPI/historical.any.html", + { + "script_metadata": [ + [ + "global", + "window,dedicatedworker,sharedworker" + ] + ] + } + ], + [ + "WebCryptoAPI/historical.any.sharedworker.html", + { + "script_metadata": [ + [ + "global", + "window,dedicatedworker,sharedworker" + ] + ] + } + ], + [ + "WebCryptoAPI/historical.any.worker.html", + { + "script_metadata": [ + [ + "global", + "window,dedicatedworker,sharedworker" + ] + ] + } + ] + ], "WebCryptoAPI/idlharness.https.any.js": [ [ "WebCryptoAPI/idlharness.https.any.html", @@ -311343,12 +311486,6 @@ {} ] ], - "WebCryptoAPI/secure_context/crypto-subtle-non-secure-context-not-available.sub.html": [ - [ - "WebCryptoAPI/secure_context/crypto-subtle-non-secure-context-not-available.sub.html", - {} - ] - ], "WebCryptoAPI/secure_context/crypto-subtle-secure-context-available.https.sub.html": [ [ "WebCryptoAPI/secure_context/crypto-subtle-secure-context-available.https.sub.html", @@ -319961,6 +320098,30 @@ {} ] ], + "cookies/domain/domain-attribute-host-with-and-without-leading-period.sub.html": [ + [ + "cookies/domain/domain-attribute-host-with-and-without-leading-period.sub.html", + {} + ] + ], + "cookies/domain/domain-attribute-host-with-leading-period.sub.html": [ + [ + "cookies/domain/domain-attribute-host-with-leading-period.sub.html", + {} + ] + ], + "cookies/domain/domain-attribute-matches-host.sub.html": [ + [ + "cookies/domain/domain-attribute-matches-host.sub.html", + {} + ] + ], + "cookies/domain/domain-attribute-missing.sub.html": [ + [ + "cookies/domain/domain-attribute-missing.sub.html", + {} + ] + ], "cookies/http-state/attribute-tests.html": [ [ "cookies/http-state/attribute-tests.html", @@ -323190,6 +323351,12 @@ {} ] ], + "css/css-content/computed-value.html": [ + [ + "css/css-content/computed-value.html", + {} + ] + ], "css/css-content/inheritance.html": [ [ "css/css-content/inheritance.html", @@ -342381,6 +342548,12 @@ {} ] ], + "dom/nodes/Node-appendChild-cereactions-vs-script.window.js": [ + [ + "dom/nodes/Node-appendChild-cereactions-vs-script.window.html", + {} + ] + ], "dom/nodes/Node-appendChild.html": [ [ "dom/nodes/Node-appendChild.html", @@ -362527,6 +362700,12 @@ {} ] ], + "html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-extra.html": [ + [ + "html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-extra.html", + {} + ] + ], "html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js": [ [ "html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.html", @@ -367620,6 +367799,18 @@ {} ] ], + "html/semantics/forms/the-button-element/button-submit-remove-children-jssubmit.html": [ + [ + "html/semantics/forms/the-button-element/button-submit-remove-children-jssubmit.html", + {} + ] + ], + "html/semantics/forms/the-button-element/button-submit-remove-children.html": [ + [ + "html/semantics/forms/the-button-element/button-submit-remove-children.html", + {} + ] + ], "html/semantics/forms/the-button-element/button-type.html": [ [ "html/semantics/forms/the-button-element/button-type.html", @@ -421588,6 +421779,18 @@ {} ] ], + "trusted-types/empty-default-policy-report-only.tentative.html": [ + [ + "trusted-types/empty-default-policy-report-only.tentative.html", + {} + ] + ], + "trusted-types/empty-default-policy.tentative.html": [ + [ + "trusted-types/empty-default-policy.tentative.html", + {} + ] + ], "trusted-types/eval-csp-no-tt.tentative.html": [ [ "trusted-types/eval-csp-no-tt.tentative.html", @@ -429414,6 +429617,12 @@ } ] ], + "web-bundle/wbn-location.tentative.html": [ + [ + "web-bundle/wbn-location.tentative.html", + {} + ] + ], "web-locks/acquire.tentative.https.any.js": [ [ "web-locks/acquire.tentative.https.any.html", @@ -432060,6 +432269,10 @@ "webgpu/cts.html?q=cts:command_buffer/render/storeop:", {} ], + [ + "webgpu/cts.html?q=cts:copyImageBitmapToTexture:", + {} + ], [ "webgpu/cts.html?q=cts:examples:", {} @@ -471413,6 +471626,10 @@ "dd970ebfa60cdc96c64da1c9d7f326bc1bcaad01", "testharness" ], + "WebCryptoAPI/historical.any.js": [ + "67ca9d9767df9d37c841bece0127f04cc5218f56", + "testharness" + ], "WebCryptoAPI/idlharness.https.any.js": [ "b0ccebd9f48999284ec36dbfb11a35314efa3135", "testharness" @@ -471453,10 +471670,6 @@ "e82c4d78f6baf44d5abeeafeb5a439508a65eaaf", "testharness" ], - "WebCryptoAPI/secure_context/crypto-subtle-non-secure-context-not-available.sub.html": [ - "79bcec7a4dae8bce505e0dad690a47e44b087c7b", - "testharness" - ], "WebCryptoAPI/secure_context/crypto-subtle-secure-context-available.https.sub.html": [ "67f7ff0b2b8038b14faa32a16a1a06f12ab9577f", "testharness" @@ -497313,6 +497526,38 @@ "539d715ebd5344de4cf02b6485462b31bc167525", "testharness" ], + "cookies/domain/domain-attribute-host-with-and-without-leading-period.sub.html": [ + "8144b2f6940bec720b02e64e5c6d92d867c7971d", + "testharness" + ], + "cookies/domain/domain-attribute-host-with-and-without-leading-period.sub.html.sub.headers": [ + "4365b7dfe8a753a39dfdf69f75b63dc17b5f9c1f", + "support" + ], + "cookies/domain/domain-attribute-host-with-leading-period.sub.html": [ + "1a020d6e32d914dec275b9d292efd473fda14417", + "testharness" + ], + "cookies/domain/domain-attribute-host-with-leading-period.sub.html.sub.headers": [ + "3813417dbd9e94dc7620d38591e0628459de08c2", + "support" + ], + "cookies/domain/domain-attribute-matches-host.sub.html": [ + "8244c8f5045f9982b2e8efc7099e1e86a30d290e", + "testharness" + ], + "cookies/domain/domain-attribute-matches-host.sub.html.sub.headers": [ + "3544e221f76acea7808bc0f0d2e43d74ff4d8ce4", + "support" + ], + "cookies/domain/domain-attribute-missing.sub.html": [ + "c4ed6ab200bb8a3cceca793cd862bc6f52a26dda", + "testharness" + ], + "cookies/domain/domain-attribute-missing.sub.html.headers": [ + "e391056503306f622a7ce2cacfab1f9bac156bb0", + "support" + ], "cookies/http-state/attribute-tests.html": [ "8cb820564f455ea545ce0124bb477a211141bc5d", "testharness" @@ -567297,6 +567542,10 @@ "e0cf16bd42aac09242cf10830b0885407348cf92", "reftest" ], + "css/css-content/computed-value.html": [ + "505d4b4d006e7788345e765fe1d278cd4b176214", + "testharness" + ], "css/css-content/element-replacement-alt-ref.html": [ "ef8a6f3953c239733026c92541789ca5b942178b", "support" @@ -583342,7 +583591,7 @@ "testharness" ], "css/css-grid/grid-definition/grid-inline-support-flexible-lengths-001.html": [ - "3a2c94238987b84fc99bee3c80e2ddc7fd04793c", + "42bbb43cf6ae229222375f3af822246c8bdb8d97", "testharness" ], "css/css-grid/grid-definition/grid-inline-support-grid-template-areas-001.html": [ @@ -583350,19 +583599,19 @@ "testharness" ], "css/css-grid/grid-definition/grid-inline-support-grid-template-columns-rows-001.html": [ - "32733e238fad58677447b44be9c5fcc934fe803d", + "cbcdc2c345400235f777974c05a041b13c332b1b", "testharness" ], "css/css-grid/grid-definition/grid-inline-support-named-grid-lines-001.html": [ - "fc4caf282349776da41ee63c6a07c3a834243fdc", + "a405f0557c94cdab2a0bd6803c38b1d790947adc", "testharness" ], "css/css-grid/grid-definition/grid-inline-support-repeat-001.html": [ - "465e5e8cd826306ce2c5b6661e086df6eb9e96a1", + "67a0c6611223f1f610ee575b0dc230027e3105c9", "testharness" ], "css/css-grid/grid-definition/grid-inline-template-columns-rows-resolved-values-001.html": [ - "ff1f814309603c13248b7045d9ca0f9900bd04fe", + "4b1390687dcdb07399b88dad5c93adbd908067e4", "testharness" ], "css/css-grid/grid-definition/grid-layout-auto-tracks.html": [ @@ -583390,7 +583639,7 @@ "testharness" ], "css/css-grid/grid-definition/grid-support-flexible-lengths-001.html": [ - "0dae45b39d1acc556ed79fac3ff58562e8ce8e78", + "db9488af25876a439d20b3a93de6be66a2729d43", "testharness" ], "css/css-grid/grid-definition/grid-support-grid-template-areas-001.html": [ @@ -583398,15 +583647,15 @@ "testharness" ], "css/css-grid/grid-definition/grid-support-grid-template-columns-rows-001.html": [ - "bf818cd85eaff5b659165021e317c23b00d71f77", + "cb0dbffe1614e286d2b179b75dd0aaf3f195cd98", "testharness" ], "css/css-grid/grid-definition/grid-support-named-grid-lines-001.html": [ - "bff5e8151c782060f08f8fdcf59ccd142d65547e", + "5357855b0474b8036f72de77ead519104ae1fb3d", "testharness" ], "css/css-grid/grid-definition/grid-support-repeat-001.html": [ - "c2c8be0c5910f6bb0b16f33ac536955b63cca0c3", + "54d230cca9d2be3509d7af79c83eb213075d14de", "testharness" ], "css/css-grid/grid-definition/grid-support-repeat-002.html": [ @@ -583422,7 +583671,7 @@ "reftest" ], "css/css-grid/grid-definition/grid-template-columns-rows-resolved-values-001.html": [ - "c992bf66d269d0923e78b59f90da4e34395bebe2", + "df91cebf63ee0a251e1c8da56567f7684bf4b1f9", "testharness" ], "css/css-grid/grid-definition/grid-template-rows-fit-content-001-ref.html": [ @@ -583918,7 +584167,7 @@ "reftest" ], "css/css-grid/grid-items/grid-minimum-size-grid-items-021.html": [ - "922223ae445282b91305b7d7e823f0040a898c70", + "ab66d70a9732cc2ea270feaa222c9efe88c70886", "testharness" ], "css/css-grid/grid-items/grid-minimum-size-grid-items-022.html": [ @@ -584486,7 +584735,7 @@ "testharness" ], "css/css-grid/parsing/grid-template-columns-computed-withcontent.html": [ - "9b7cd030a7c145a9300ef7d6700ca6a8dd4e3e5e", + "a788ca22f77c188e6a574852ca23936bd6349071", "testharness" ], "css/css-grid/parsing/grid-template-columns-computed.html": [ @@ -584506,7 +584755,7 @@ "testharness" ], "css/css-grid/parsing/grid-template-rows-computed-withcontent.html": [ - "693cf338c0dc42406336ccd99a605b1cf0d4f9be", + "1e85f16d9338a5b74bd54be79e42a4007ffd715b", "testharness" ], "css/css-grid/parsing/grid-template-rows-computed.html": [ @@ -592818,11 +593067,11 @@ "reftest" ], "css/css-pseudo/marker-content-013-ref.html": [ - "7657cfbd710763325972f860af7744eda98a236a", + "c46f8db136c208ec3c88317bc65b92fbddfd9799", "support" ], "css/css-pseudo/marker-content-013.html": [ - "427578f9c5abfd1be809ea71cfcfdac4298def44", + "3b2ce6fa50abac5cd44a75880eb18dad3aae485c", "reftest" ], "css/css-pseudo/marker-content-014-ref.html": [ @@ -599737,6 +599986,18 @@ "30592b44cec51eb7f0835c7abc9aaafe7458ceff", "support" ], + "css/css-text-decor/reference/text-decoration-subelements-001-notref.html": [ + "9994674abeff3e644ac29afec64d1aece767ebdf", + "support" + ], + "css/css-text-decor/reference/text-decoration-subelements-002-ref.html": [ + "000a909ea58571bbd93c3826a3a66d72d499cc6c", + "support" + ], + "css/css-text-decor/reference/text-decoration-subelements-003-ref.html": [ + "5e229a9b72f65cc3863232a489ffe8dea17c8760", + "support" + ], "css/css-text-decor/reference/text-decoration-thickness-001-notref.html": [ "4e7db88ce5b41e28aa43fc339c35438855abb928", "support" @@ -600205,6 +600466,18 @@ "d4538e7c7b45356d08cf5dc90273b6aee77c49fa", "reftest" ], + "css/css-text-decor/text-decoration-subelements-001.html": [ + "d24749e66722aa6a627e5955f225327f729601f7", + "reftest" + ], + "css/css-text-decor/text-decoration-subelements-002.html": [ + "c3af8e62df553c10a27c0522fe619a56740eb729", + "reftest" + ], + "css/css-text-decor/text-decoration-subelements-003.html": [ + "4d808390703a70a935493f74014665bab982b139", + "reftest" + ], "css/css-text-decor/text-decoration-thickness-001.html": [ "8f314793f2634406c8ad5d3fa268bf56eb864406", "reftest" @@ -616001,6 +616274,14 @@ "709551f15903ac671ba78284885c56c277984d7b", "manual" ], + "css/css-ui/resize-change-margin-ref.html": [ + "b326c5f8d2c52f08bc2a09e651ae87f6c005979d", + "support" + ], + "css/css-ui/resize-change-margin.html": [ + "a957ac931e8647958baf0d1891d3e69dd4435c0d", + "reftest" + ], "css/css-ui/select-cursor-001-manual.html": [ "30aa9b20f8d23c6f0985db4b09b921c850973d0b", "manual" @@ -626174,7 +626455,7 @@ "testharness" ], "css/cssom/CSSStyleSheet-constructable.html": [ - "c30e764152deddcfcb3311636aa8cadcb5295dee", + "d7be1677f8c3afffbb7fcea3536969fd083d0fe9", "testharness" ], "css/cssom/CSSStyleSheet.html": [ @@ -641338,7 +641619,7 @@ "testharness" ], "dom/historical.html": [ - "921fa07b3f6de0f9a579b75b14d6509039765205", + "8a71e364e5ef30a0f9d9621d3eb018a34d42ae4c", "testharness" ], "dom/idlharness.any.js": [ @@ -641478,15 +641759,15 @@ "testharness" ], "dom/nodes/Document-constructor-svg.svg": [ - "28aaf16bdcd182f0a754e197d9b250475e59c762", + "77e3d8996e6bbc71bd1521903115b34302e23d36", "testharness" ], "dom/nodes/Document-constructor-xml.xml": [ - "9aada512c895b9ad91516892007ba1d4ab8d9c1c", + "c9fc77580648653750a488994abc314a6b409967", "testharness" ], "dom/nodes/Document-constructor.html": [ - "ceb41926f85869c996e2cb248e4a1853198b8d3c", + "e17de28471d75ea83b9b95ae144a3e3f2c3f1cd4", "testharness" ], "dom/nodes/Document-contentType/contentType/contenttype_bmp.html": [ @@ -641782,7 +642063,7 @@ "support" ], "dom/nodes/Document-createEvent.https.html": [ - "8108f20f6593e721e132ca16bbe509fd1e06dfd2", + "bdc1895879bfa613e72229b44d535f76f785c5a2", "testharness" ], "dom/nodes/Document-createEvent.js": [ @@ -642097,6 +642378,10 @@ "6a27ef77ecacf55a7eaaae18cdd007e017e42cd9", "testharness" ], + "dom/nodes/Node-appendChild-cereactions-vs-script.window.js": [ + "bc0b8ad6dca55d83f1cfb9788e6ff33df96ab22a", + "testharness" + ], "dom/nodes/Node-appendChild.html": [ "684607961a7eeaefb17b3a49dbf9ed36a3d7aee6", "testharness" @@ -642110,7 +642395,7 @@ "testharness" ], "dom/nodes/Node-cloneNode.html": [ - "08d620b3b80c483835f5e339c19b885ad036ea27", + "d977b2a7ae3ec2ee1ad9eec3c64abc86cc2e2500", "testharness" ], "dom/nodes/Node-compareDocumentPosition.html": [ @@ -653290,7 +653575,7 @@ "testharness" ], "html/browsers/windows/browsing-context.html": [ - "5e99bb522f194e67b78bda958359f8ace011a59c", + "430598fb21236c877ff693d63a8c1135e010dae0", "testharness" ], "html/browsers/windows/document-access/document_access_parent_access.tentative.html": [ @@ -653498,7 +653783,7 @@ "support" ], "html/cross-origin-embedder-policy/none.https.html": [ - "f13a7523011674b0bab6b265d481b58649dc5531", + "7f296e60441458a5f38dfd351d717845677ce30b", "testharness" ], "html/cross-origin-embedder-policy/none.https.html.headers": [ @@ -654854,7 +655139,7 @@ "testharness" ], "html/dom/usvstring-reflection.https.html": [ - "162d58c50c449da07912fbce7ffa9ad9b7674d0a", + "d3c90e593400c69c61d433898cd68cc55d633573", "testharness" ], "html/editing/activation/click-manual.html": [ @@ -658897,6 +659182,10 @@ "6604450991a122e3e241e40b1b9e0516c525389d", "support" ], + "html/infrastructure/safe-passing-of-structured-data/resources/post-parent-type-error.html": [ + "d6713c4192e5721f7ad07bf5de1d14ced934f8cc", + "support" + ], "html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/broadcastchannel-success-and-failure.https.html": [ "8902de49cfb10293ddb6246dc834268621e0dcad", "testharness" @@ -659193,6 +659482,10 @@ "63b60e490f47f4db77d33d7a4ca2f5b9a4181de8", "support" ], + "html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-extra.html": [ + "5ff10cbc10e8f39a80d25ad5db323e3746bf0bcc", + "testharness" + ], "html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js": [ "2fb2f7d266096fe58f2e8de9c9311b6d5a611278", "testharness" @@ -659210,7 +659503,7 @@ "testharness" ], "html/infrastructure/safe-passing-of-structured-data/structuredclone_0.html": [ - "babf514bf9e4d7cd7807fde2c1be644508e17ef7", + "fbb48db03838addca28181629070d57b1ea81f24", "testharness" ], "html/infrastructure/safe-passing-of-structured-data/transfer-errors.window.js": [ @@ -664510,7 +664803,7 @@ "testharness" ], "html/semantics/forms/constraints/form-validation-validity-patternMismatch.html": [ - "d8677898ff135a7db42bc050d2d1dad582477af4", + "4ca64aac68983c50297fe48b5cb9423baabab4a4", "testharness" ], "html/semantics/forms/constraints/form-validation-validity-rangeOverflow.html": [ @@ -664546,7 +664839,7 @@ "testharness" ], "html/semantics/forms/constraints/form-validation-willValidate.html": [ - "6c66559a09a0168070f2520d672de79f3a1261da", + "ccd1cf09b907bf91f0454f8bb84d04cdf83a18bd", "testharness" ], "html/semantics/forms/constraints/infinite_backtracking.html": [ @@ -664873,6 +665166,14 @@ "06218f4fc9e99efe2d87a9eb85582d3dc84434a1", "testharness" ], + "html/semantics/forms/the-button-element/button-submit-remove-children-jssubmit.html": [ + "26ce16dd2d0df51b4dad3e41e8b22b9ffa05ca48", + "testharness" + ], + "html/semantics/forms/the-button-element/button-submit-remove-children.html": [ + "1dc259564cadadb99105a329b62dc12eea6bd878", + "testharness" + ], "html/semantics/forms/the-button-element/button-type.html": [ "6cfd6687c707479600534de03156afa698daa314", "testharness" @@ -670834,7 +671135,7 @@ "testharness" ], "imagebitmap-renderingcontext/context-preserves-canvas.html": [ - "9c3a1fb39f2a75db8cd89c1b2225ce469a1caeec", + "b0753a7348d1fe8d45b7cd9311ae0670535f06a3", "testharness" ], "imagebitmap-renderingcontext/toBlob-origin-clean-offscreen.sub.html": [ @@ -672382,7 +672683,7 @@ "support" ], "interfaces/dom.idl": [ - "d1557a676ef0f7c458c8654c59ec713a42833d0a", + "f7a10d890ab892e990bf9a81b87884e54089dcaa", "support" ], "interfaces/element-timing.idl": [ @@ -672526,7 +672827,7 @@ "support" ], "interfaces/mst-content-hint.idl": [ - "15e17cf5364c83fc70bf373cd7f500c13b153b5f", + "f7d3f20e72364a1bf7df019e3115c34c10d811ba", "support" ], "interfaces/navigation-timing.idl": [ @@ -672614,7 +672915,7 @@ "support" ], "interfaces/requestidlecallback.idl": [ - "b485dc07805fe864cf79abd1ec11a7e3ffb68d41", + "c763b50bde782bb484564b49e25068fff88f782b", "support" ], "interfaces/resize-observer.idl": [ @@ -672714,7 +673015,7 @@ "support" ], "interfaces/web-nfc.idl": [ - "de23fac0c118c2a773a5e9627c6b1af99c861838", + "12ea9d58bc055ee57efb65ae1495ebf4301427a5", "support" ], "interfaces/web-share.idl": [ @@ -672758,7 +673059,7 @@ "support" ], "interfaces/webrtc.idl": [ - "49ed6bb0333020a6eee8d5411ae88a4e3a7dbd9a", + "badbe4df1dccd4113cb76e47f4a842f20d0d8963", "support" ], "interfaces/webusb.idl": [ @@ -673546,7 +673847,7 @@ "testharness" ], "lint.whitelist": [ - "b5a8f80687044b596e449e357f7e731895b3a94d", + "62644762ce2bce2cbf0c3c8527cac8384ce00256", "support" ], "loading/lazyload/META.yml": [ @@ -675930,7 +676231,7 @@ "testharness" ], "mediacapture-record/MediaRecorder-stop.html": [ - "5dd9aa637305f1ac65208b0e5f956831b8c22cb4", + "1cc18f4c854d368bf3508ade3bcfd3514ca409ec", "testharness" ], "mediacapture-record/idlharness.window.js": [ @@ -679490,91 +679791,91 @@ "support" ], "offscreen-canvas/compositing/2d.composite.canvas.copy.html": [ - "6cf8779ab0b2a1c822e3ccc1d26ff195c904516f", + "824e1ecaeaae675f87d5632d853be2b6c9f03692", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.copy.worker.js": [ - "aa0f39dd2bcbdbf115729f7a245c5b14e9444100", + "13f85bc5f7907bbfc86bdeb89a3d5113c7b64b86", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.destination-atop.html": [ - "b086a5429bad0b316c37215508db707aef9e632f", + "49dc643f082ec3258a85782c89abf553551d8600", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.destination-atop.worker.js": [ - "18785d75070043f02066638501808344eb68a6e2", + "7cdac8753dd023e7e99b28e0009b8898159ddc98", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.destination-in.html": [ - "402f2c3931ad32689a53e43ce32a3b9a6d7b558c", + "647e4866f60753cb55b13402c69e9fe047d0de25", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.destination-in.worker.js": [ - "a2e403bf77b3763c150b688da73841f8b48f078a", + "0fbfc761c5b30ffda449c8ec8f05e8e4d4b59217", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.destination-out.html": [ - "bccc50aea397c2daa7e09404b3e2d66167ddf5fc", + "46114c6556557c9f3f81bf09e1758ac3a7a32066", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.destination-out.worker.js": [ - "3ae91e39592d596470a3c3e93658f7830bc485ad", + "659d0efee46361851a67ffb466f57a61c41a2b42", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.destination-over.html": [ - "8128e1108349414a1ece262ea01ae623257aedc3", + "a7cfc306c51ea7b73b47385f1b3cab5a3076d4d8", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.destination-over.worker.js": [ - "35827d4ea9bdcb4f8300856de777c1ec0e73f051", + "648da78ce9bf62a6e896c5ab275343497923de71", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.lighter.html": [ - "20083b575851ad6ca335190b1a5060f790094e98", + "15012f2232bb15b39a3108382778195c12317173", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.lighter.worker.js": [ - "474c299d1a245c969761647bb990dddf0db8afd1", + "5450fc31ca2de411af207d4df8a4d2c5458326aa", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.source-atop.html": [ - "16fb9fb3c8747f77a8b1c76905cece22c41dae75", + "30afb49476296ff2770c78cad32d62b8f2285025", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.source-atop.worker.js": [ - "689152ae6f4142bc9956949ce4b26734617f8bbf", + "8b8d183213cb6be19bd276cc6b5d5712194ed8c5", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.source-in.html": [ - "bf69b2dc0a1b132e85afe3b439d6891a4a857620", + "73ae7b710e101cdae57afbc58d3de73f0b98418c", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.source-in.worker.js": [ - "d68068bd9f5741741987ac70143ff0dc36a5f2e0", + "a4b9a5b98aec554b69f6260de88a156de2021b1a", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.source-out.html": [ - "21514d32e5ddf7a095ac513dfb80e4b4ea99e31a", + "5f9f3fa228b7b23466fae5e8fb3708c8c7d27d1c", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.source-out.worker.js": [ - "f30bcd163991dfbdb5beb9025da1d44fc335d72a", + "0fff033b09aff0acf38c2331b37cb9fe8b49df8a", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.source-over.html": [ - "54810af7f953663d9b15fdee7b3a06e426f01f68", + "ed428466cfce6253ce6440e1d9e92ae52ee2dae3", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.source-over.worker.js": [ - "5a90aedc2c7ea1e8b08c1bb8e91c66a5956b524b", + "b0bc5c513454f563a47b6fbdeac62515ac3121e0", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.xor.html": [ - "1c5ada787d458fcefc58f53f9a8750aee87012da", + "2df51323328c181d5516079c323a20a903b667f6", "testharness" ], "offscreen-canvas/compositing/2d.composite.canvas.xor.worker.js": [ - "16d1e9be9b0a5a2f25167a9bfcbc1f0c83be448e", + "9fa550575c13f12daccc1b49d3f8b14c0861d867", "testharness" ], "offscreen-canvas/compositing/2d.composite.clip.copy.html": [ @@ -679706,19 +680007,19 @@ "testharness" ], "offscreen-canvas/compositing/2d.composite.globalAlpha.image.html": [ - "2f7a5e684da46c4281d048efdf79d8e9be3bff29", + "5d586a191eef9bcd6d5f7880222bb614af95d7f2", "testharness" ], "offscreen-canvas/compositing/2d.composite.globalAlpha.image.worker.js": [ - "143d2ee3a245322f4faea474426ca08bb67edb1d", + "f645a8e55640cc8fe501b0a819e60e99d272a166", "testharness" ], "offscreen-canvas/compositing/2d.composite.globalAlpha.imagepattern.html": [ - "c577b5bf9e9893d24b4a28b8d679f63f67568e2f", + "0c77965f7a8b50da5a62ea916b1ed3412cf9b5a9", "testharness" ], "offscreen-canvas/compositing/2d.composite.globalAlpha.imagepattern.worker.js": [ - "cc765b4731ec1cbbc940acb8c352d46184b8d2d5", + "8441dc275d5a15eefdc453120842552f935fc9c5", "testharness" ], "offscreen-canvas/compositing/2d.composite.globalAlpha.invalid.html": [ @@ -679738,91 +680039,91 @@ "testharness" ], "offscreen-canvas/compositing/2d.composite.image.copy.html": [ - "322f6cfd0a778a4164b8e7408fe85b47a868ed47", + "b4944a76c1059caeabf7ab42b1a592b03f38cedf", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.copy.worker.js": [ - "b6f842569074b0591e0586a5cbe8dc8183dba1af", + "493ee0b4015aa5b77de2d7ed559f5727093145c2", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.destination-atop.html": [ - "3c54ac26fb5fc9d73c3cef3bed1ab75b99916995", + "79ecfcdf95f31f3684e7fcd18d39336d595fea55", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.destination-atop.worker.js": [ - "48f472bee8c203860d1542016c4b83d08bc0476b", + "d36ed50a0349d5864b6a423d1389c671acc403a9", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.destination-in.html": [ - "1edbcdcf46f47430fbaacf334705bfb805d31476", + "ef205f1b955ab1779cf5a7448a2a4f5f160e24ac", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.destination-in.worker.js": [ - "622b35b7946e4a6ba6a258ad316f045706f8f16d", + "60eb61951cbc978b0a8500a854738cbf2a052e81", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.destination-out.html": [ - "e1d0cbad8ced8db0bd14e393c081ddd5866ea642", + "ecfeeed6bfdae2954c72624b7c17a33796864731", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.destination-out.worker.js": [ - "52c142efc7ee34ca0eadd7366d153e9e632ef5bc", + "ee97dccf7bd306d1ee06ecc6d7068d9a55d27b9d", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.destination-over.html": [ - "c591a6559f1f10cdbdff55e8f2636c4ee313fb9f", + "eb58b3159659e42acae71feb859a3ceb2bb9d905", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.destination-over.worker.js": [ - "fb200df3ff46ff337d663301da17ddebc857a399", + "274c32c8906ac1ec74568bdf65428ed9cfde9bda", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.lighter.html": [ - "4ba8cf7d39ceb507d98d327f14c90eb9c1d5c377", + "4935ca3c4114378113c0e5d85efd7fdb19e4244d", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.lighter.worker.js": [ - "212446e51264a04cd08dbb330698922924cc31f9", + "05e39f95649873687883483cca33fb9b962ce481", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.source-atop.html": [ - "15e057dbe57a0aa9bcf59ef632e71dccbb526902", + "93a527de24d984de6761404a79a091d94e6f5617", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.source-atop.worker.js": [ - "82ca5794e4600a6d8ba15118d2066dcc770b670e", + "5fddfcfd8a879c0f01ed95d1a328be48a99d3819", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.source-in.html": [ - "b8190d3662d09f97981ee13d20e31656a334d293", + "2519fe72d779b97fba1d51ef401f4ddb6b8625e4", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.source-in.worker.js": [ - "9169f57986dafdfc05a05980a029e6b25fb27943", + "a5ca8d92e9428d9027bd5798a13b254ac13fd9f9", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.source-out.html": [ - "7a305ba7d8832131a352de4e96ff9859a17a2b21", + "f57393b8c1b948fd7a39ceb29f4fbd3a8509adfb", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.source-out.worker.js": [ - "56cc13e6c139f18c2ba27622e25a1cfd0c5fbfbd", + "1038ec5bcfd849eaf976245bb466ab37b452fc09", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.source-over.html": [ - "5a3a67647b45069c7dd508c15ecd0617f85ba0d1", + "96c5252eb48faae88cd64912ef44e405706d49f9", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.source-over.worker.js": [ - "210af01ba54ed87bf74d6947d42bbf523f33c8da", + "55c0f0eb9c4bbf1c382252f73f49d3d5e6a3952a", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.xor.html": [ - "b40cda82e8a3004a10981975f37f3a5dde15a0a5", + "6039275bf06b4a9236d56b6e765d9b4a746a6f62", "testharness" ], "offscreen-canvas/compositing/2d.composite.image.xor.worker.js": [ - "ed6b7df3eee147019ded79188630c7f69f018f8f", + "c4e20ffe51c4e2e129cfc9a9173f0c2780942c34", "testharness" ], "offscreen-canvas/compositing/2d.composite.operation.casesensitive.html": [ @@ -680114,43 +680415,43 @@ "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.image.copy.html": [ - "ae9196b7afd452be201c6ea794a4f875b7621df7", + "1e1cab64b72c8a10edb0fb5481c61fef143e3629", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.image.copy.worker.js": [ - "50f3c8256b739acb4a7e5682dc5a4e4b6d6f7d02", + "7019270cd696ed017d5076b460831757b207e5f2", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.image.destination-atop.html": [ - "a1d9c33c6ed206e9aa131c210095a6af578c1d97", + "bc6ac3ee2c1ef1c6fdab546d773b60234f2d03ed", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.image.destination-atop.worker.js": [ - "93bcd94c63235a3c4424e6ead372051175f3ea5b", + "aaae19827eebcd2321f49c2f685a244bbd9bf886", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.image.destination-in.html": [ - "2268f93885bdbbe5bee33972ffd357c532484a63", + "3410aa42ab9a5c103d15f34b44fbd21aac974007", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.image.destination-in.worker.js": [ - "7bf112ca944fa27c9d08f1067304f9b227da7880", + "140e21d8eadf4a21675db8c0a39e7a5f1c518750", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.image.source-in.html": [ - "8f544237168bee0b2577561c3fcdcfa6b4b8d757", + "979f0aa93ed936fd79e125bf54aaf178e11a2ac9", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.image.source-in.worker.js": [ - "600bc2f61595ea43ed3e1df56da621443ff4f33a", + "4a91470aa01152cc6d2010209bae666a6ed4af35", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.image.source-out.html": [ - "d15616d6bc4036b0a03085eda3d2209e85700386", + "ce72032c582bb62a2ed43e8edf90cf130680df05", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.image.source-out.worker.js": [ - "d027bf3c1178ead59641519555d59150f53c5e8e", + "4c054cb29dff36f30e63c506222dc372715e8f5d", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.nocontext.copy.html": [ @@ -680194,43 +680495,43 @@ "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.pattern.copy.html": [ - "16d69485653d4df448a023fcc6460c427425ada1", + "84a538878f688d99ba4b5065844624a2fe0e8d74", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.pattern.copy.worker.js": [ - "5e2d6590fa47ef7ca4a46f928ba03446c26076f2", + "b8a2e203423867843c508f5eb0e71d3630d6bc16", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-atop.html": [ - "9f5b8e8751a9720249de944fe0f2d7ff3819b90f", + "c7c20bb392bb2bcafc0cb8a2df3cfb0210303683", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js": [ - "7c4fb96a3722a9b9e6234a52920d4d7566caca02", + "a1a2eb8548f805ea87593e25e7028a5eeaa1a5f9", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-in.html": [ - "6c08dd1ae226b033498c916318cb04918bf298ea", + "5058c75bcd810ab2b8a1bd09ec13200d3f7a81d9", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-in.worker.js": [ - "006268dcf6407a8040b8f5d7e314afea56738c6c", + "2ab713b941bec2d7d63c9f10a5fc78339ca9198d", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-in.html": [ - "3cf0ac91c02914a189484adaa7d2ac579cf22a6d", + "4beb3fb24b472c35a57953803c7933698cb6bff5", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-in.worker.js": [ - "1472e20a2d1fcb0e95dfd14f86f034d092d7d56f", + "c4e6c85cd23076d60428e02418c0b9fea69fa94e", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-out.html": [ - "7b8dd8ac35890fa01531cb616adb328302bef791", + "907c77aa46dd07ab4c3e2a5de1827d02c14fd0a3", "testharness" ], "offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-out.worker.js": [ - "c9f71f237804e25903d67e5526faa122b1efbbf1", + "6abb66a951a0039e892d6fe27fcc8b54f2fedf81", "testharness" ], "offscreen-canvas/conformance-requirements/2d.coordinatespace.html": [ @@ -680266,83 +680567,83 @@ "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.3arg.html": [ - "44f33cf5e2ffe9b61a30d8c0617daadb9308d686", + "f3ede9a81eecfa09703599dce0c5389e24121c00", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.3arg.worker.js": [ - "a600e2f28f2cce1f903f13eb8aea221c8e97c512", + "6be6bdf96ee115bb8f2d9b330eb31446a555ca24", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.5arg.html": [ - "d82aa2d45d2367dfaf3e68d4a5a0b8b7b85bc254", + "7671f3a493426c322286ddf758456e41e46e5722", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.5arg.worker.js": [ - "6fafc4e4f69b69eb83d24c5db899e4dad7660262", + "5917615f3978a334b57b491cb56968709e2a6757", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html": [ - "44da5d5e5bbda3dde5b71d023b3f704a96e92fe0", + "829fc6b4a67458faf7bd766c8eb439bc89500227", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js": [ - "697449f6dfe6fdfba2c58ee33e871782523fae80", + "afa730b9f7cb0f07e8e37f7cc7210026999a5714", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html": [ - "aad38fee72f09f0e4988df0643441747dfc6a51c", + "a01ace172a7a767bd8317b47c0c4a7a340e0fad7", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.worker.js": [ - "19f4bbcb30673856703231c1e5338121151e9520", + "687f0244f25b35a477c2131c70b54b7fb0399f1a", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html": [ - "ce7f835bc8d57e5cc0392a65c0448557da082ccc", + "ddea3857568db7ad0afd8d48606b91676ee5caca", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.worker.js": [ - "3b85461f71f7f0df332929aa569cc2c1b6c196ba", + "7f586ef0558e6ae0b4adfb80ef7bcd8f53828f30", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html": [ - "c18a47ff34f241f975dab49b5a10ba11020527c0", + "6541d762bf1df8f0f76078888f7f1351578fa8b7", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js": [ - "8525ee99efa916c811c8709b164ac875eb87967d", + "7cefad92dd69a62f8264ddf58d2cb97c0472a975", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html": [ - "4b43d5fb08eedf17783eb5787df588716cb956f7", + "3c718c8da45c8ca1eca4c325ef9f22a620d103c9", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js": [ - "d73e3b952dd14753314b354b224a40dd85b03b71", + "dac1c7a0a9ab58b27988020a2f27bbb9a5710a3a", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.alpha.html": [ - "33b2502f65b0898811d4b79e3bff20b603b11723", + "f1a1f083232149929d0e6fd2778e18c7bac9eb33", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js": [ - "5f29c1a1cca110bb9aff7f683aec514e6ec21cbc", + "6828af9225e6e18f7295e6c7127904e3b295b8d1", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html": [ - "16e9f791b2a8e2b2f95ce15706de853c27a4cc1e", + "28708941b466146f46cd5f096f9201405d795409", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js": [ - "c3b566e844a7a33a724dc362b632b114e50249e9", + "ce6e8ee4f55f21445c1a1476f08f2757d365e805", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.broken.html": [ - "a64d20e731e80a59fda6845f9a373a630b7903a7", + "531376aaab7e50f94fb2a1416413a56ecb547063", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js": [ - "63163bd60aaac084413f7daa09018a705236710b", + "4acc40b49e68b5e7ddfe675333a8abcdc91c683a", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.canvas.html": [ @@ -680354,67 +680655,67 @@ "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.clip.html": [ - "51651e56f390d1174469778811d16f2b1f07f766", + "562a9c5d0b840d82773e6ce3bbb41b0b000929ea", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js": [ - "90d0aad3ff8c61178e2934f7df104e7f1a3a050f", + "1741f15b6822c53ff8125063d3968878d4fad73f", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.composite.html": [ - "ba56e366f5a8f1864ae3555582fb66ab3abbcc48", + "de37739993f99dff7739d785bede999b5da35f4e", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js": [ - "09e3b3a00af164a01b2716e99c6008d32b937f89", + "eecc8914e3b5a039f9a298b0f4db4c1b89eeb09d", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.floatsource.html": [ - "49a88fab035f2c68dadabacfb73ff8eac9c44195", + "f90b41d3f30aa90b34adf477767494dc6c7afd9e", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js": [ - "45398e83191593eb07af4481eeb2f70a1da14ecf", + "d154a12b0a6ce523b4b3fe30b5fae82a85b52501", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedest.html": [ - "9466738bcf5c221bf13b099b635fe1f634ad8c7d", + "d018e943d7739e2736bffe487f8883869cb44962", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js": [ - "284b45840677af97a04f2211dc485893d5776cc2", + "0185dd4a4529153038bd060404d7740598358fd9", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedir.html": [ - "4cbd37445c18f2deee6cc46950400f2f2765b87f", + "2f0a91dacc7cfa56a644ca3a89bf3526ee87a52f", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js": [ - "00f0e7ec0661659ace3d69f7be306d86ffb4d6f6", + "b29cdad740ee0d27d43d8443c3d8a1a5a69e6dc6", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativesource.html": [ - "66e9c2122312e6427746dcb27f235d8e191a078d", + "c2f78e5a952621be409f2377fd5213286b568705", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js": [ - "0f24542d928568e45161cf128f43dab84c8b88ec", + "2171f692f5303ca6ceb8535850cd28e4a2edf5fd", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html": [ - "9ca1a884b609bd2b745a1f1d39ec9db4225b3a89", + "c6bab2ea43df63d282882276c651936e2b4fd13a", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js": [ - "f5d26785800a268867df360b90686fd1f9084dde", + "eaf58aa4909fd4b0434a33344671afd52e453933", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nowrap.html": [ - "4d71c21bfb92adfd75a825df872be24d9ee9c5fa", + "f0dfb298f28a8cdf6eb0ca5d6c07e532e42587c8", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js": [ - "6f6b1e93a393064a7991a80d9e29211b6473144b", + "aab08771db443348d193238edc60c1e14d0425eb", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.null.html": [ @@ -680426,11 +680727,11 @@ "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.path.html": [ - "47763cdb434466c3b28dfa87249e0ff4d746810c", + "10daf12cd23e0ea254c6561c69a2898e706ee536", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.path.worker.js": [ - "ba8302b5e1e8a0d97c970a41619644cb942e00e0", + "45a082974904f12248bec16565ca6e276fc9b14d", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.self.1.html": [ @@ -680450,19 +680751,19 @@ "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.svg.html": [ - "ff83aa0330f7f37934833712f5055649c2d162df", + "72ba2ec7ba49bdd345b2524c29ab291b2cbe09f5", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js": [ - "382190e6cd31c4122b825424468a84b510903e57", + "50892c2b4a0af0b05667bc1cd36577e3c1c403a8", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.transform.html": [ - "2adcf02142233de19404eef6e2a965b7b07c5e8e", + "b782ba87e68abd39928aeeb9c0d3401699ce6f1b", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js": [ - "5e1095bc74efbfddfd7fe8cc00cb244cf5721182", + "a4cb865dc1e550820d1225cceae605e2a15bfb1c", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html": [ @@ -680482,19 +680783,19 @@ "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.html": [ - "645e2c9711f5ea2448b237abc271571a9adc2d50", + "b941f3aa3aaa89322b40017d029274dcec264c85", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html": [ - "a38e98208b7b5b5df0c46acafacbad4d512d4fd8", + "1abcb6abf495ae8f6959393dd3496d6041b6cc75", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js": [ - "304acdc11732c3ee9c106587dcbf41fb7d270c68", + "cf472ac4179c9903261f8c72f11d49bc610778b9", "testharness" ], "offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js": [ - "1e6f54f3882d40419c7f7d27c95f9b4c871e2c06", + "b3b6a59cb7af150863f483de43837eb914dfafc6", "testharness" ], "offscreen-canvas/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html": [ @@ -682154,11 +682455,11 @@ "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.image.html": [ - "1e0585ec104e89885bb86fb384497efac19e8a74", + "c1e356519b36308191954bb3acfa494500631a61", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.image.worker.js": [ - "adf6b7d580253f9a499bfa6fbd474ebeb9e81e34", + "543aaef20f201433cbfe95744b06340806519459", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.nocontext.html": [ @@ -682178,11 +682479,11 @@ "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.crosscanvas.html": [ - "d3c8cd636b4baa840195c21fa4e3c17154d363e9", + "daf2fd268d9003b6b14ee9c0272f506f5e7ea19f", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.js": [ - "f660f213d6ae3d44bff95c0dc069e3dc25017102", + "ea719d423597b1a2794e5ff51f9c25e99dd8e195", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.image.null.html": [ @@ -682226,43 +682527,43 @@ "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html": [ - "ea5adcc8fe4b934bee37082f70a3c837c7b72575", + "ae3bdb2dba553a277d52e319e70f8cda1e542360", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.js": [ - "042f0c61a715bf1c4b8be0e04b88bba89c45ff48", + "903cab7174a269486a9cc1c5cc66eb09cb10f2bb", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html": [ - "8fcab2b0c9ab3d6fb017e66311460dd242be544b", + "953861cde8cb4ce4ba1504fe95fc6de34e4b6ca1", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js": [ - "fae7427b58d120c745870c817b4facdb4912fe25", + "f8432144cdb4d21355ac8df785636ec158a3164c", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html": [ - "191f0bde3e189b9ac511ae4ab1900174dbff136b", + "f475aae99a369217a40e065f23acad53433c43a5", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js": [ - "5c6c5c1c21e3fcb091df9234a14334500c9698b6", + "abf6195c48a694d3a387459a7edc506de9ba81c2", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html": [ - "966fac841238aa0a01248736b025c4d96ad588fc", + "2c54ad40c58ebf3c3ff69caad36195ae7d489e45", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js": [ - "8cc326b733ac8175e1ea234029d5a58721de1657", + "a1a438af1eb6d861885df634ad9b0e39e44d229f", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html": [ - "7fbee4db8babecaf16a63c1e41263ae03ce71ff2", + "3a7374d9d3c4c86b7d67348a47ccc24b6ca82fce", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.js": [ - "85594b6370eb85db023419c7df4c1695e72048f3", + "0b2c58d52e647f357deff50ab2fc208a8a6be0d2", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html": [ @@ -682274,99 +682575,99 @@ "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html": [ - "02ffc97632e521144b82c9a76990a0ff8b1ec859", + "ca0bb3351443ca1ef15a4bf28dc1373d273a07af", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.js": [ - "e365dd6bbec9fc0d92557756794d99ca88acbae5", + "f771b226cd7c6238722f091676118f078b235022", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html": [ - "8149d8938ea2b11a9a7aae8887b149b46cc0be3b", + "8fcfb71d376c8da43dbe856eac6d9c6726bd41e1", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.js": [ - "d6bad4c2240e30198424fc75c1e54aa345ea1393", + "fa094c35b4830389d717c6c6a278ff10c0c313ee", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html": [ - "63d30dba51ed1ca77311e5e7b19b1b74c3b63235", + "1a9731aa08b3c27ef9b2944385f4c263f6b6ae6b", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.js": [ - "b31ebcb665642f147d240d0910fe5356330a9394", + "8ca59610fec063397fec0ba7cea6c8c384665b29", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html": [ - "404a51d727b90dc32bff93a2f12ec25d4d6f2344", + "63b1cac13b63499b453a7635302fec8116c56a50", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.js": [ - "3ab6b4068af3de97218afc4954e11eecb38517ea", + "5ac23fecd91e9df4c35fbbafcd4e11e8d46ef433", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html": [ - "70028f7b9fbf2a5d3c8c2566d2b2635b737e55ac", + "7e14e00d6f3a9ea12404a1e4e35ec32be2c07af5", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.js": [ - "3ae9dc9a7aa98993df946f57aeea609d196b22df", + "2b8941a0eb162b87a2a104d7b3d022c1c171e046", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html": [ - "7af8e2dfe19b71056ebd2832c8b3eb155989b62c", + "862a80e7dc16fe9dd3df18e4b5605b74eed4a0cc", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js": [ - "3db708229dd930f0388b8f009c8c2a95c4a6542d", + "1d6fb4b9f7d5e9e12d57dabe6e9854cb9b6cb5cf", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html": [ - "45e36a403ca9a84d329081ff062de138b3a06a93", + "ccd6ca5841a012bc91c0affc882a166f04a0dc26", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js": [ - "209427ea824be71c82098da9671f121b313fbcb4", + "1dfa11a9a84ad9ff4ad33ba063f32bacb2805ba8", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html": [ - "7818db33ec304467d4c96473c1395febf30eba61", + "b5fbeec3b7399c7e330e8b1e603094bb5dbe06ae", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.js": [ - "080887b105138813674613b72f4d8cf95d1bd70d", + "3e07c9f9717af923736bd05b0052167740dca9fe", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html": [ - "f2fcaac9cbf7091e39f4c766674854341a56ebc4", + "1805608d1ec242e5efb9b821ca82db5d42ce9728", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js": [ - "6c43646e1e9bfae724ad4ac90d88e97887f07c72", + "e2cb046d2883c31e9c11e10e158e4f7750699b41", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html": [ - "813f7f3a581abca6ecc753fb2c95f47318b38142", + "259c5a5d1780884e1f72d286b103dc58329c2b81", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js": [ - "d9f53a00eb414a6693e0d94dd10796a4723e4375", + "aa886ef9610cf152feb25152a0b3a13b108da455", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html": [ - "6102405784f0d252148f0df1988f72db74705c33", + "373fafea8a66ad6a4cfd6837c95cb572c348ecd6", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.js": [ - "92c39e2f967b75c7a8cf62385b3df256b9663337", + "4fbedca9e73441c70e67e3273f303518103066c4", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html": [ - "67c4061c753af15266fd79c48145727b2da55975", + "1ef52dd8d108466f79bba52788706dac0b3f0654", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js": [ - "dd6d243ba5a46b44c5af47907532e03e66d8ff21", + "50a15179897ec0fea1ff00283cba81972d1feb61", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.case.html": [ @@ -682378,11 +682679,11 @@ "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.empty.html": [ - "426c069a446ca4337e100884c2bad2e681f96cb7", + "9f40fe695777d73f27bb84e7de9fe406becd31d2", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.js": [ - "5338663f9f5e33b8d51e6a4a0d0562bbef1acae6", + "a31afa7139b7f961ea07f16576bee0c334c38395", "testharness" ], "offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.null.html": [ @@ -684442,51 +684743,51 @@ "testharness" ], "offscreen-canvas/shadows/2d.shadow.image.alpha.html": [ - "205e32de01c6b012989b042c4f8627dc69b93ed0", + "25ce1c1b107ba3ea2639e3e51c76ee5d0c69282a", "testharness" ], "offscreen-canvas/shadows/2d.shadow.image.alpha.worker.js": [ - "b40be65f5cd34c533c03d353d428af74504ccf0a", + "17fc5a7dad337eef680fb37bf4a7e744bac95c1e", "testharness" ], "offscreen-canvas/shadows/2d.shadow.image.basic.html": [ - "9f16324a861413fbec0b8deb82a88b01e172147c", + "e1198acd10c18ee07ed4b9b0ed4da00f590b51a2", "testharness" ], "offscreen-canvas/shadows/2d.shadow.image.basic.worker.js": [ - "e55f2d64c47f06bb0a84dbb812ded32c5824b361", + "45126a218f95ae28a35d318615b57a40af0ec7cb", "testharness" ], "offscreen-canvas/shadows/2d.shadow.image.scale.html": [ - "a1197f21828ca1924a76a12691bb6fadb1fdbc91", + "7f3057b60220d23f4e141e1a29e4ea72621385dd", "testharness" ], "offscreen-canvas/shadows/2d.shadow.image.scale.worker.js": [ - "e1d6198f344e30b7c71137f0a63e66b2c82a3d34", + "9ca1d7948a05eb33550431f6744c7e5b18e7ea8e", "testharness" ], "offscreen-canvas/shadows/2d.shadow.image.section.html": [ - "b3f9ab17f04dffa76bda6f8d7062ea7d12ba8743", + "1abc7558e12134821e008209481ebb6418953428", "testharness" ], "offscreen-canvas/shadows/2d.shadow.image.section.worker.js": [ - "a278f4666dc8c6e4c47b4a4c7f9afa2de9e81536", + "3b4deaa657d925f5ac3cb126fd34650ce2846e66", "testharness" ], "offscreen-canvas/shadows/2d.shadow.image.transparent.1.html": [ - "05c125a376fbc7815743913753f586b442a4c559", + "1d54ae599b7edcf3e92abdcc86ca97798a73c03a", "testharness" ], "offscreen-canvas/shadows/2d.shadow.image.transparent.1.worker.js": [ - "599140ec83aa04a7e0d00b17ae000020968b36d1", + "76dc8ff58f641b384f88580e4cb0690c06920c86", "testharness" ], "offscreen-canvas/shadows/2d.shadow.image.transparent.2.html": [ - "32fa486b3f489622448cfef9fd96373220c9a2e4", + "2e2230b02bf56867978265a7da0176834400b46a", "testharness" ], "offscreen-canvas/shadows/2d.shadow.image.transparent.2.worker.js": [ - "5b8862c0c8ae56721479bcc210efbebd644cee63", + "5f54763d129f42005cd64d185845bbebe0bea366", "testharness" ], "offscreen-canvas/shadows/2d.shadow.offset.negativeX.html": [ @@ -684530,35 +684831,35 @@ "testharness" ], "offscreen-canvas/shadows/2d.shadow.pattern.alpha.html": [ - "3e55eb40003a92d6f01cfc96a6c32f4f211ed46c", + "3f11789c88adbec169a918567b11b0d2f8e2b159", "testharness" ], "offscreen-canvas/shadows/2d.shadow.pattern.alpha.worker.js": [ - "fc6fdbeb03e38ecd012b40777ea2800d2e37af59", + "616169f823cf10be0fe4fcd59317ad17c1446f07", "testharness" ], "offscreen-canvas/shadows/2d.shadow.pattern.basic.html": [ - "d70f2fce6b3058ba2e391f87f106fcf2d68e0367", + "8c4ff934b93315692edaf21d78d1be3f7e9cf7d2", "testharness" ], "offscreen-canvas/shadows/2d.shadow.pattern.basic.worker.js": [ - "5c2a7c97f94da7ebcfc692f47b6cba20f74ad570", + "91e9fe9f1808566f7f4e8b6472a79056493de736", "testharness" ], "offscreen-canvas/shadows/2d.shadow.pattern.transparent.1.html": [ - "29103ad6214f41ff12195a9554ae9e1616fd4918", + "26b50578c1e3801cb57c9e468614116f7f26b2ee", "testharness" ], "offscreen-canvas/shadows/2d.shadow.pattern.transparent.1.worker.js": [ - "bf8781b3eda120c7f3b553a65e5f2cd01d1c456e", + "70ca9a8128dac8baf966080494225fe8677bab03", "testharness" ], "offscreen-canvas/shadows/2d.shadow.pattern.transparent.2.html": [ - "6509bae1f55867618e6cbac98e1eadce35e158f3", + "983b9ff1fac2ecde4f869e9c77ec7d496fd8af7c", "testharness" ], "offscreen-canvas/shadows/2d.shadow.pattern.transparent.2.worker.js": [ - "8a2b7165e78e35b6e15ece3fbce50cb5e521f51a", + "db88180fc30d5758b99c891586fc9cbfc6218b54", "testharness" ], "offscreen-canvas/shadows/2d.shadow.stroke.basic.html": [ @@ -685658,7 +685959,7 @@ "support" ], "offscreen-canvas/tools/tests2d.yaml": [ - "6662668f37397145e93eee51e0e4be80f170278f", + "645d6847bdf670ff9e2adb4258a675c8a3d2d3a4", "support" ], "offscreen-canvas/transformations/2d.transformation.getTransform.html": [ @@ -700774,27 +701075,27 @@ "support" ], "remote-playback/cancel-watch-availability.html": [ - "e4b633066a4c0a257adc30996c8424a37b6a1b20", + "d83c8cecb006d738be1280f44d7d8d302f85003f", "testharness" ], "remote-playback/disable-remote-playback-cancel-watch-availability-throws.html": [ - "fdcc734346ed5825f572536877175f2c6dbddda5", + "bdd35d8101bdf0e4ae96e63de9f51b1ba6a7b5d4", "testharness" ], "remote-playback/disable-remote-playback-prompt-throws.html": [ - "7ddc2ad13f3691e1b40a89bf0494b06c6da8cb5d", + "076b1630606f658be2ee574fba2fb15d9f6741c0", "testharness" ], "remote-playback/disable-remote-playback-watch-availability-throws.html": [ - "3c21f017b48293f778eca1061a7215187fda9eac", + "1cec5278d522afd986a772eb3fffe11650b6b97d", "testharness" ], "remote-playback/idlharness.window.js": [ - "73bc998f7433be4ea77fc18a62c7445d9688d907", + "ba40f199633165111ab2bfd37624eb94871052d6", "testharness" ], "remote-playback/watch-availability-initial-callback.html": [ - "851558b06f211ac2cda5d38b1d447a2e0475586d", + "352321b06ae66c5a3e31c1d3d7cf40a5e3b4c460", "testharness" ], "reporting/META.yml": [ @@ -713042,7 +713343,7 @@ "support" ], "tools/manifest/sourcefile.py": [ - "800d1f981cc3b8a924351ada9ac303e300546474", + "2131c703e04dcbe8de3993df3123d8a342a22e95", "support" ], "tools/manifest/testpaths.py": [ @@ -713066,7 +713367,7 @@ "support" ], "tools/manifest/tests/test_sourcefile.py": [ - "1200ce59a26dce914cf49363c7e5a6d42e52e21d", + "9738906fa2db1c4cc7f40de5208d12eb4b24a901", "support" ], "tools/manifest/tests/test_utils.py": [ @@ -717882,11 +718183,11 @@ "support" ], "tools/wptrunner/wptrunner/browsers/firefox.py": [ - "b6ee0f4998e9a2189cfca99b3cce1a6b11ea858c", + "641e0daa89519eabb6d958e22334d69c075547e9", "support" ], "tools/wptrunner/wptrunner/browsers/firefox_android.py": [ - "fee528071f68843ab056f513295146685f8f78f4", + "d6c8c4796615c1d33f15eea861defe25d78df2ee", "support" ], "tools/wptrunner/wptrunner/browsers/ie.py": [ @@ -717918,7 +718219,7 @@ "support" ], "tools/wptrunner/wptrunner/browsers/servodriver.py": [ - "2953de18174ef75d505db0b8d518fe3339f7065e", + "02b796b7560385cd00902bbfc1b361a542249f85", "support" ], "tools/wptrunner/wptrunner/browsers/webkit.py": [ @@ -717978,7 +718279,7 @@ "support" ], "tools/wptrunner/wptrunner/executors/executorservo.py": [ - "9eebfa59febf991bd41db25f2b02ea4c8c00195e", + "2b8e865fa9bd1f0f62a1b9cbd6f79ffd0bcb8d46", "support" ], "tools/wptrunner/wptrunner/executors/executorservodriver.py": [ @@ -717986,7 +718287,7 @@ "support" ], "tools/wptrunner/wptrunner/executors/executorwebdriver.py": [ - "9b5f39764025ebd912f9fd080ad05dd0deea827c", + "0b329210fc546f9ee50a8a4d0ae02133e3446106", "support" ], "tools/wptrunner/wptrunner/executors/executorwebkit.py": [ @@ -718077,6 +718378,10 @@ "aafc7d52250f62fdcd7025858f2273290c77d49e", "support" ], + "tools/wptrunner/wptrunner/process.py": [ + "26e11ddfc8758e95d7f5048596ab8cae4f4bb546", + "support" + ], "tools/wptrunner/wptrunner/products.py": [ "abd84094bb33dbd13b3594a7acbe8467512a99ce", "support" @@ -718202,7 +718507,7 @@ "support" ], "tools/wptrunner/wptrunner/webdriver_server.py": [ - "162ffae3fc93aeeb29a2535e829af45b9e15c1f3", + "7ee1911727652b31aabf3556ee82543afa0c3b32", "support" ], "tools/wptrunner/wptrunner/wptcommandline.py": [ @@ -718857,6 +719162,22 @@ "1bc33add09b4b34ce2cba21f488f8ed53345a27a", "support" ], + "trusted-types/empty-default-policy-report-only.tentative.html": [ + "1ba9c5ec18e5da33725aaa9499977930563c4ba9", + "testharness" + ], + "trusted-types/empty-default-policy-report-only.tentative.html.headers": [ + "fa87952ae486b3a902eca0257eadace8e25e881f", + "support" + ], + "trusted-types/empty-default-policy.tentative.html": [ + "2d3a10addbc25221babc37550e36acb8c7252a4b", + "testharness" + ], + "trusted-types/empty-default-policy.tentative.html.headers": [ + "1bc33add09b4b34ce2cba21f488f8ed53345a27a", + "support" + ], "trusted-types/eval-csp-no-tt.tentative.html": [ "e8ed57708ef158d36cff2c0d0883910c84bb75e8", "testharness" @@ -724509,6 +724830,38 @@ "255e013f27a729858310cb545b22d12da283ade5", "testharness" ], + "web-bundle/META.yml": [ + "0f1912b23a4d109139af314b82263cd31ed8b347", + "support" + ], + "web-bundle/README.md": [ + "03b42ab340a2c0cdc774b78f203c80d5eee5539f", + "support" + ], + "web-bundle/resources/generate-test-wbns.sh": [ + "820bb12267c7cd1886d3f9771f24fec46433a370", + "support" + ], + "web-bundle/resources/location/location.html": [ + "e272dad23da00cfee24c3054c83f48f64fe8d3e2", + "support" + ], + "web-bundle/resources/location/location.js": [ + "a1dbba73661f87b20895ed90c6cf96451ed5cc1c", + "support" + ], + "web-bundle/resources/wbn/__dir__.headers": [ + "21e57b9caca1183ecda6f5d4fb9ebd556abf769a", + "support" + ], + "web-bundle/resources/wbn/location.wbn": [ + "1129cc1e92c89b5b33c86dde61bab7e66c8379bd", + "support" + ], + "web-bundle/wbn-location.tentative.html": [ + "e0604af6d1e19ac0661e518ba56574a587f3ffc5", + "testharness" + ], "web-locks/META.yml": [ "24e7d28340606d9a6290af9ceac4f4fb9156abf0", "support" @@ -726894,7 +727247,7 @@ "support" ], "webdriver/tests/take_screenshot/iframe.py": [ - "4cf8ad06b56d8f44af06550af4c4a1b7715b908b", + "66df6ec94935554340f916e4c2d9bb88012de1b5", "wdspec" ], "webdriver/tests/take_screenshot/screenshot.py": [ @@ -726942,7 +727295,7 @@ "testharness" ], "webgpu/cts.html": [ - "6099f7318f12dc784f4009f6e659df4247afba61", + "5c529e90401ce3523ab210739da616047c93c8eb", "testharness" ], "webgpu/framework/allowed_characters.js": [ @@ -727050,7 +727403,7 @@ "support" ], "webgpu/framework/version.js": [ - "9d1c0810c9d3c3dde6de9182c6aec0e12a5f70e7", + "8dd830276b92cd74c0a911ff5e328cbfb50e4463", "support" ], "webgpu/runtime/helper/options.js": [ @@ -727117,6 +727470,10 @@ "ae92995aa6b73eadd52b3342ff6737b91b413431", "support" ], + "webgpu/suites/cts/copyImageBitmapToTexture.spec.js": [ + "c9b07e83a81bad7b809c8b80f754ba3dbbe1f0e1", + "support" + ], "webgpu/suites/cts/examples.spec.js": [ "e57de1bfc8d9cf0c8d2264b77e68b56c6c2659f8", "support" @@ -727130,11 +727487,11 @@ "support" ], "webgpu/suites/cts/gpu_test.js": [ - "67429b9a2551628ab3c8623570dfdfb79104d385", + "cf52a6cacf82581d3d04aa28f01d057c8118957d", "support" ], "webgpu/suites/cts/index.js": [ - "9fb8395d5b52521d3bf392410fe7cd67c64afe03", + "e566792357a874aa3fb106479179c26c0357c188", "support" ], "webgpu/suites/cts/resource_init/sampled_texture_clear.spec.js": [ diff --git a/tests/wpt/metadata/WebCryptoAPI/historical.any.js.ini b/tests/wpt/metadata/WebCryptoAPI/historical.any.js.ini new file mode 100644 index 00000000000..3966665d524 --- /dev/null +++ b/tests/wpt/metadata/WebCryptoAPI/historical.any.js.ini @@ -0,0 +1,6 @@ +[historical.any.html] + +[historical.any.worker.html] + +[historical.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/metadata/css/css-text-decor/text-decoration-subelements-001.html.ini b/tests/wpt/metadata/css/css-text-decor/text-decoration-subelements-001.html.ini new file mode 100644 index 00000000000..e1bbdb7fc9d --- /dev/null +++ b/tests/wpt/metadata/css/css-text-decor/text-decoration-subelements-001.html.ini @@ -0,0 +1,2 @@ +[text-decoration-subelements-001.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text-decor/text-decoration-subelements-002.html.ini b/tests/wpt/metadata/css/css-text-decor/text-decoration-subelements-002.html.ini new file mode 100644 index 00000000000..e35013fc45e --- /dev/null +++ b/tests/wpt/metadata/css/css-text-decor/text-decoration-subelements-002.html.ini @@ -0,0 +1,2 @@ +[text-decoration-subelements-002.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-ui/resize-change-margin.html.ini b/tests/wpt/metadata/css/css-ui/resize-change-margin.html.ini new file mode 100644 index 00000000000..65dbf895460 --- /dev/null +++ b/tests/wpt/metadata/css/css-ui/resize-change-margin.html.ini @@ -0,0 +1,2 @@ +[resize-change-margin.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/css/cssom-view/CaretPosition-001.html.ini b/tests/wpt/metadata/css/cssom-view/CaretPosition-001.html.ini deleted file mode 100644 index 4c79907309b..00000000000 --- a/tests/wpt/metadata/css/cssom-view/CaretPosition-001.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[CaretPosition-001.html] - [Element at (400, 100)] - expected: FAIL - diff --git a/tests/wpt/metadata/fetch/content-type/response.window.js.ini b/tests/wpt/metadata/fetch/content-type/response.window.js.ini index 52662ab4ad3..f548ee23521 100644 --- a/tests/wpt/metadata/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/response.window.js.ini @@ -312,24 +312,27 @@ [ +
+ +
+ + diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-button-element/button-submit-remove-children.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-button-element/button-submit-remove-children.html new file mode 100644 index 00000000000..1dc259564ca --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-button-element/button-submit-remove-children.html @@ -0,0 +1,32 @@ + + + + + + + + + +
+ +
+ + diff --git a/tests/wpt/web-platform-tests/imagebitmap-renderingcontext/context-preserves-canvas.html b/tests/wpt/web-platform-tests/imagebitmap-renderingcontext/context-preserves-canvas.html index 9c3a1fb39f2..b0753a7348d 100644 --- a/tests/wpt/web-platform-tests/imagebitmap-renderingcontext/context-preserves-canvas.html +++ b/tests/wpt/web-platform-tests/imagebitmap-renderingcontext/context-preserves-canvas.html @@ -5,19 +5,18 @@ diff --git a/tests/wpt/web-platform-tests/interfaces/dom.idl b/tests/wpt/web-platform-tests/interfaces/dom.idl index d1557a676ef..f7a10d890ab 100644 --- a/tests/wpt/web-platform-tests/interfaces/dom.idl +++ b/tests/wpt/web-platform-tests/interfaces/dom.idl @@ -263,7 +263,6 @@ interface Document : Node { [SameObject] readonly attribute DOMImplementation implementation; readonly attribute USVString URL; readonly attribute USVString documentURI; - readonly attribute USVString origin; readonly attribute DOMString compatMode; readonly attribute DOMString characterSet; readonly attribute DOMString charset; // historical alias of .characterSet diff --git a/tests/wpt/web-platform-tests/interfaces/mst-content-hint.idl b/tests/wpt/web-platform-tests/interfaces/mst-content-hint.idl index 15e17cf5364..f7d3f20e723 100644 --- a/tests/wpt/web-platform-tests/interfaces/mst-content-hint.idl +++ b/tests/wpt/web-platform-tests/interfaces/mst-content-hint.idl @@ -6,3 +6,13 @@ partial interface MediaStreamTrack { attribute DOMString contentHint; }; + +enum RTCDegradationPreference { + "maintain-framerate", + "maintain-resolution", + "balanced" +}; + +partial dictionary RTCRtpSendParameters { + RTCDegradationPreference degradationPreference; +}; diff --git a/tests/wpt/web-platform-tests/interfaces/requestidlecallback.idl b/tests/wpt/web-platform-tests/interfaces/requestidlecallback.idl index b485dc07805..c763b50bde7 100644 --- a/tests/wpt/web-platform-tests/interfaces/requestidlecallback.idl +++ b/tests/wpt/web-platform-tests/interfaces/requestidlecallback.idl @@ -11,8 +11,10 @@ partial interface Window { dictionary IdleRequestOptions { unsigned long timeout; }; + [Exposed=Window] interface IdleDeadline { DOMHighResTimeStamp timeRemaining(); readonly attribute boolean didTimeout; }; + callback IdleRequestCallback = void (IdleDeadline deadline); diff --git a/tests/wpt/web-platform-tests/interfaces/web-nfc.idl b/tests/wpt/web-platform-tests/interfaces/web-nfc.idl index de23fac0c11..12ea9d58bc0 100644 --- a/tests/wpt/web-platform-tests/interfaces/web-nfc.idl +++ b/tests/wpt/web-platform-tests/interfaces/web-nfc.idl @@ -3,7 +3,7 @@ // (https://github.com/tidoust/reffy-reports) // Source: Web NFC (https://w3c.github.io/web-nfc/) -[Exposed=Window] +[SecureContext, Exposed=Window] interface NDEFMessage { constructor(NDEFMessageInit messageInit); readonly attribute FrozenArray records; @@ -15,7 +15,7 @@ dictionary NDEFMessageInit { typedef (DOMString or BufferSource or NDEFMessageInit) NDEFRecordDataSource; -[Exposed=Window] +[SecureContext, Exposed=Window] interface NDEFRecord { constructor(NDEFRecordInit recordInit); @@ -27,7 +27,7 @@ interface NDEFRecord { readonly attribute USVString? encoding; readonly attribute USVString? lang; - sequence toRecords(); + sequence? toRecords(); }; dictionary NDEFRecordInit { @@ -89,6 +89,6 @@ enum NDEFPushTarget { dictionary NDEFScanOptions { USVString id; USVString recordType; - USVString mediaType = ""; + USVString mediaType; AbortSignal? signal; }; diff --git a/tests/wpt/web-platform-tests/interfaces/webrtc.idl b/tests/wpt/web-platform-tests/interfaces/webrtc.idl index 49ed6bb0333..badbe4df1dc 100644 --- a/tests/wpt/web-platform-tests/interfaces/webrtc.idl +++ b/tests/wpt/web-platform-tests/interfaces/webrtc.idl @@ -19,6 +19,7 @@ enum RTCIceCredentialType { dictionary RTCIceServer { required (DOMString or sequence) urls; DOMString username; + DOMString credential; RTCIceCredentialType credentialType = "password"; }; diff --git a/tests/wpt/web-platform-tests/lint.whitelist b/tests/wpt/web-platform-tests/lint.whitelist index b5a8f806870..62644762ce2 100644 --- a/tests/wpt/web-platform-tests/lint.whitelist +++ b/tests/wpt/web-platform-tests/lint.whitelist @@ -691,6 +691,10 @@ WEB-PLATFORM.TEST:signed-exchange/resources/*.sxg WEB-PLATFORM.TEST:signed-exchange/appcache/resources/*.sxg WEB-PLATFORM.TEST:signed-exchange/resources/generate-test-sxgs.sh +# Web Bundle files have hard-coded URLs +WEB-PLATFORM.TEST:web-bundle/resources/generate-test-wbns.sh +WEB-PLATFORM.TEST:web-bundle/resources/wbn/*.wbn + # Tests that depend on resources in /gen/ in Chromium: # https://github.com/web-platform-tests/wpt/issues/16455 # Please consult with ecosystem-infra@chromium.org before adding more. diff --git a/tests/wpt/web-platform-tests/mediacapture-record/MediaRecorder-stop.html b/tests/wpt/web-platform-tests/mediacapture-record/MediaRecorder-stop.html index 5dd9aa63730..1cc18f4c854 100644 --- a/tests/wpt/web-platform-tests/mediacapture-record/MediaRecorder-stop.html +++ b/tests/wpt/web-platform-tests/mediacapture-record/MediaRecorder-stop.html @@ -32,7 +32,6 @@ assert_equals(video.getVideoTracks().length, 1, "video mediastream starts with one track"); recorder.start(); assert_equals(recorder.state, "recording", "MediaRecorder has been started successfully"); - video.getVideoTracks()[0].stop(); assert_equals(recorder.state, "recording", "MediaRecorder state should be recording immediately following last track ending"); let event = await new Promise(r => recorder.onstop = r); @@ -43,13 +42,6 @@ assert_array_equals(events, ["start", "dataavailable", "stop"], "Should have gotten expected events"); - - recorder.stop(); - await Promise.race([ - new Promise((_, reject) => recorder.onstop = - _ => reject(new Error("stop() is idempotent"))), - new Promise(r => t.step_timeout(r, 0)) - ]); }, "MediaRecorder will stop recording and fire a stop event when all tracks are ended"); promise_test(async t => { @@ -59,7 +51,6 @@ ["start", "stop", "dataavailable", "pause", "resume", "error"]); recorder.start(); assert_equals(recorder.state, "recording", "MediaRecorder has been started successfully"); - recorder.stop(); assert_equals(recorder.state, "inactive", "MediaRecorder state should be inactive immediately following stop() call"); @@ -70,14 +61,42 @@ assert_array_equals(events, ["start", "dataavailable", "stop"], "Should have gotten expected events"); + }, "MediaRecorder will stop recording and fire a stop event when stop() is called"); - recorder.stop(); + promise_test(async t => { + const recorder = new MediaRecorder(createVideoStream()); + assert_throws("InvalidStateError", () => { recorder.stop(); }); await Promise.race([ new Promise((_, reject) => recorder.onstop = - _ => reject(new Error("stop() is idempotent"))), - new Promise(r => t.step_timeout(r, 0)) - ]); - }, "MediaRecorder will stop recording and fire a stop event when stop() is called"); + _ => reject(new Error("onstop should never have been called"))), + new Promise(r => t.step_timeout(r, 0))]); + }, "MediaRecorder will fire an exception when stopped after creation"); + + promise_test(async t => { + const recorder = new MediaRecorder(createVideoStream()); + recorder.start(); + recorder.stop(); + let event = await new Promise(r => recorder.onstop = r); + assert_throws("InvalidStateError", () => { recorder.stop(); }); + await Promise.race([ + new Promise((_, reject) => recorder.onstop = + _ => reject(new Error("onstop should never have been called"))), + new Promise(r => t.step_timeout(r, 0))]); + }, "MediaRecorder will fire an exception when stopped after having just been stopped"); + + promise_test(async t => { + const stream = createVideoStream(); + const recorder = new MediaRecorder(stream); + recorder.start(); + stream.getVideoTracks()[0].stop(); + let event = await new Promise(r => recorder.onstop = r); + assert_throws("InvalidStateError", () => { recorder.stop(); }); + await Promise.race([ + new Promise((_, reject) => recorder.onstop = + _ => reject(new Error("onstop should never have been called"))), + new Promise(r => t.step_timeout(r, 0))]); + }, "MediaRecorder will fire an exception when stopped after having just been spontaneously stopped"); + diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.copy.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.copy.html index 6cf8779ab0b..824e1ecaeaa 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.copy.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.copy.html @@ -33,12 +33,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'copy'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.copy.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.copy.worker.js index aa0f39dd2bc..13f85bc5f79 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.copy.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.copy.worker.js @@ -29,12 +29,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'copy'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-atop.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-atop.html index b086a5429ba..49dc643f082 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-atop.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-atop.html @@ -33,12 +33,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'destination-atop'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 128,255,128,191, "50,25", "128,255,128,191", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 128,255,128,191, "50,25", "128,255,128,191", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-atop.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-atop.worker.js index 18785d75070..7cdac8753dd 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-atop.worker.js @@ -29,12 +29,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'destination-atop'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 128,255,128,191, "50,25", "128,255,128,191", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 128,255,128,191, "50,25", "128,255,128,191", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-in.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-in.html index 402f2c3931a..647e4866f60 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-in.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-in.html @@ -33,12 +33,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'destination-in'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-in.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-in.worker.js index a2e403bf77b..0fbfc761c5b 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-in.worker.js @@ -29,12 +29,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'destination-in'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-out.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-out.html index bccc50aea39..46114c65565 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-out.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-out.html @@ -33,12 +33,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'destination-out'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-out.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-out.worker.js index 3ae91e39592..659d0efee46 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-out.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-out.worker.js @@ -29,12 +29,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'destination-out'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-over.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-over.html index 8128e110834..a7cfc306c51 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-over.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-over.html @@ -33,12 +33,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'destination-over'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 109,255,146,223, "50,25", "109,255,146,223", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 109,255,146,223, "50,25", "109,255,146,223", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-over.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-over.worker.js index 35827d4ea9b..648da78ce9b 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-over.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.destination-over.worker.js @@ -29,12 +29,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'destination-over'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 109,255,146,223, "50,25", "109,255,146,223", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 109,255,146,223, "50,25", "109,255,146,223", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.lighter.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.lighter.html index 20083b57585..15012f2232b 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.lighter.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.lighter.html @@ -33,12 +33,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'lighter'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.lighter.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.lighter.worker.js index 474c299d1a2..5450fc31ca2 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.lighter.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.lighter.worker.js @@ -29,12 +29,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'lighter'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-atop.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-atop.html index 16fb9fb3c87..30afb494762 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-atop.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-atop.html @@ -33,12 +33,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'source-atop'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-atop.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-atop.worker.js index 689152ae6f4..8b8d183213c 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-atop.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-atop.worker.js @@ -29,12 +29,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'source-atop'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-in.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-in.html index bf69b2dc0a1..73ae7b710e1 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-in.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-in.html @@ -33,12 +33,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'source-in'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-in.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-in.worker.js index d68068bd9f5..a4b9a5b98ae 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-in.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-in.worker.js @@ -29,12 +29,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'source-in'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-out.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-out.html index 21514d32e5d..5f9f3fa228b 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-out.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-out.html @@ -33,12 +33,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'source-out'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-out.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-out.worker.js index f30bcd16399..0fff033b09a 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-out.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-out.worker.js @@ -29,12 +29,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'source-out'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-over.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-over.html index 54810af7f95..ed428466cfc 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-over.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-over.html @@ -33,12 +33,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'source-over'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 219,255,36,223, "50,25", "219,255,36,223", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 219,255,36,223, "50,25", "219,255,36,223", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-over.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-over.worker.js index 5a90aedc2c7..b0bc5c51345 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-over.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.source-over.worker.js @@ -29,12 +29,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'source-over'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 219,255,36,223, "50,25", "219,255,36,223", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 219,255,36,223, "50,25", "219,255,36,223", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.xor.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.xor.html index 1c5ada787d4..2df51323328 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.xor.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.xor.html @@ -33,12 +33,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'xor'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.xor.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.xor.worker.js index 16d1e9be9b0..9fa550575c1 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.xor.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.canvas.xor.worker.js @@ -29,12 +29,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'xor'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5); + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.image.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.image.html index 2f7a5e684da..5d586a191ee 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.image.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.image.html @@ -33,8 +33,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.image.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.image.worker.js index 143d2ee3a24..f645a8e5564 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.image.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.image.worker.js @@ -29,8 +29,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.imagepattern.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.imagepattern.html index c577b5bf9e9..0c77965f7a8 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.imagepattern.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.imagepattern.html @@ -32,10 +32,12 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.fillStyle = ctx.createPattern(response, 'no-repeat'); - ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations - ctx.fillRect(0, 0, 100, 50); - _assertPixelApprox(offscreenCanvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(offscreenCanvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.imagepattern.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.imagepattern.worker.js index cc765b4731e..8441dc275d5 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.imagepattern.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.imagepattern.worker.js @@ -28,10 +28,12 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.fillStyle = ctx.createPattern(response, 'no-repeat'); - ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations - ctx.fillRect(0, 0, 100, 50); - _assertPixelApprox(offscreenCanvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(offscreenCanvas, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.copy.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.copy.html index 322f6cfd0a7..b4944a76c10 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.copy.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.copy.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.copy.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.copy.worker.js index b6f84256907..493ee0b4015 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.copy.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.copy.worker.js @@ -30,8 +30,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-atop.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-atop.html index 3c54ac26fb5..79ecfcdf95f 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-atop.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-atop.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 128,255,128,191, "50,25", "128,255,128,191", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 128,255,128,191, "50,25", "128,255,128,191", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-atop.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-atop.worker.js index 48f472bee8c..d36ed50a034 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-atop.worker.js @@ -30,8 +30,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 128,255,128,191, "50,25", "128,255,128,191", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 128,255,128,191, "50,25", "128,255,128,191", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-in.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-in.html index 1edbcdcf46f..ef205f1b955 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-in.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-in.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-in.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-in.worker.js index 622b35b7946..60eb61951cb 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-in.worker.js @@ -30,8 +30,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-out.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-out.html index e1d0cbad8ce..ecfeeed6bfd 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-out.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-out.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-out.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-out.worker.js index 52c142efc7e..ee97dccf7bd 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-out.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-out.worker.js @@ -30,8 +30,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-over.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-over.html index c591a6559f1..eb58b315965 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-over.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-over.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 109,255,146,223, "50,25", "109,255,146,223", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 109,255,146,223, "50,25", "109,255,146,223", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-over.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-over.worker.js index fb200df3ff4..274c32c8906 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-over.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.destination-over.worker.js @@ -30,8 +30,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 109,255,146,223, "50,25", "109,255,146,223", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 109,255,146,223, "50,25", "109,255,146,223", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.lighter.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.lighter.html index 4ba8cf7d39c..4935ca3c411 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.lighter.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.lighter.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.lighter.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.lighter.worker.js index 212446e5126..05e39f95649 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.lighter.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.lighter.worker.js @@ -30,8 +30,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-atop.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-atop.html index 15e057dbe57..93a527de24d 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-atop.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-atop.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-atop.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-atop.worker.js index 82ca5794e46..5fddfcfd8a8 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-atop.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-atop.worker.js @@ -30,8 +30,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-in.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-in.html index b8190d3662d..2519fe72d77 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-in.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-in.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-in.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-in.worker.js index 9169f57986d..a5ca8d92e94 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-in.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-in.worker.js @@ -30,8 +30,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-out.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-out.html index 7a305ba7d88..f57393b8c1b 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-out.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-out.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-out.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-out.worker.js index 56cc13e6c13..1038ec5bcfd 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-out.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-out.worker.js @@ -30,8 +30,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-over.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-over.html index 5a3a67647b4..96c5252eb48 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-over.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-over.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 219,255,36,223, "50,25", "219,255,36,223", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 219,255,36,223, "50,25", "219,255,36,223", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-over.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-over.worker.js index 210af01ba54..55c0f0eb9c4 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-over.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.source-over.worker.js @@ -30,8 +30,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 219,255,36,223, "50,25", "219,255,36,223", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 219,255,36,223, "50,25", "219,255,36,223", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.xor.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.xor.html index b40cda82e8a..6039275bf06 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.xor.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.xor.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.xor.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.xor.worker.js index ed6b7df3eee..c4e20ffe51c 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.xor.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.image.xor.worker.js @@ -30,8 +30,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.copy.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.copy.html index ae9196b7afd..1e1cab64b72 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.copy.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.copy.html @@ -34,9 +34,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.copy.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.copy.worker.js index 50f3c8256b7..7019270cd69 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.copy.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.copy.worker.js @@ -30,9 +30,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.destination-atop.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.destination-atop.html index a1d9c33c6ed..bc6ac3ee2c1 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.destination-atop.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.destination-atop.html @@ -34,9 +34,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.destination-atop.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.destination-atop.worker.js index 93bcd94c632..aaae19827ee 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.destination-atop.worker.js @@ -30,9 +30,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.destination-in.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.destination-in.html index 2268f93885b..3410aa42ab9 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.destination-in.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.destination-in.html @@ -34,9 +34,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.destination-in.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.destination-in.worker.js index 7bf112ca944..140e21d8ead 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.destination-in.worker.js @@ -30,9 +30,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.source-in.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.source-in.html index 8f544237168..979f0aa93ed 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.source-in.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.source-in.html @@ -34,9 +34,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.source-in.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.source-in.worker.js index 600bc2f6159..4a91470aa01 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.source-in.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.source-in.worker.js @@ -30,9 +30,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.source-out.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.source-out.html index d15616d6bc4..ce72032c582 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.source-out.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.source-out.html @@ -34,9 +34,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.source-out.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.source-out.worker.js index d027bf3c117..4c054cb29df 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.source-out.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.image.source-out.worker.js @@ -30,9 +30,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(offscreenCanvas, 15,15, 0,0,0,0, "15,15", "0,0,0,0", 5); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.copy.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.copy.html index 16d69485653..84a538878f6 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.copy.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.copy.html @@ -34,9 +34,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.fillStyle = ctx.createPattern(response, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.copy.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.copy.worker.js index 5e2d6590fa4..b8a2e203423 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.copy.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.copy.worker.js @@ -30,9 +30,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.fillStyle = ctx.createPattern(response, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-atop.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-atop.html index 9f5b8e8751a..c7c20bb392b 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-atop.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-atop.html @@ -34,9 +34,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.fillStyle = ctx.createPattern(response, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js index 7c4fb96a372..a1a2eb8548f 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js @@ -30,9 +30,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.fillStyle = ctx.createPattern(response, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-in.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-in.html index 6c08dd1ae22..5058c75bcd8 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-in.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-in.html @@ -34,9 +34,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.fillStyle = ctx.createPattern(response, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-in.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-in.worker.js index 006268dcf64..2ab713b941b 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.destination-in.worker.js @@ -30,9 +30,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.fillStyle = ctx.createPattern(response, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-in.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-in.html index 3cf0ac91c02..4beb3fb24b4 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-in.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-in.html @@ -34,9 +34,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.fillStyle = ctx.createPattern(response, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-in.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-in.worker.js index 1472e20a2d1..c4e6c85cd23 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-in.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-in.worker.js @@ -30,9 +30,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.fillStyle = ctx.createPattern(response, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-out.html b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-out.html index 7b8dd8ac358..907c77aa46d 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-out.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-out.html @@ -34,9 +34,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.fillStyle = ctx.createPattern(response, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-out.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-out.worker.js index c9f71f23780..6abb66a951a 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-out.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.pattern.source-out.worker.js @@ -30,9 +30,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.fillStyle = ctx.createPattern(response, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.3arg.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.3arg.html index 44f33cf5e2f..f3ede9a81ee 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.3arg.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.3arg.html @@ -40,15 +40,19 @@ var promise2 = new Promise(function(resolve, reject) { }; }); Promise.all([promise1, promise2]).then(function(response1, response2) { - ctx.drawImage(response2, 0, 0); - ctx.drawImage(response1, -100, 0); - ctx.drawImage(response1, 100, 0); - ctx.drawImage(response1, 0, -50); - ctx.drawImage(response1, 0, 50); - _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + var promise3 = createImageBitmap(response1); + var promise4 = createImageBitmap(response2); + Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) { + ctx.drawImage(bitmap2, 0, 0); + ctx.drawImage(bitmap1, -100, 0); + ctx.drawImage(bitmap1, 100, 0); + ctx.drawImage(bitmap1, 0, -50); + ctx.drawImage(bitmap1, 0, 50); + _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.3arg.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.3arg.worker.js index a600e2f28f2..6be6bdf96ee 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.3arg.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.3arg.worker.js @@ -35,15 +35,19 @@ var promise2 = new Promise(function(resolve, reject) { }; }); Promise.all([promise1, promise2]).then(function(response1, response2) { - ctx.drawImage(response2, 0, 0); - ctx.drawImage(response1, -100, 0); - ctx.drawImage(response1, 100, 0); - ctx.drawImage(response1, 0, -50); - ctx.drawImage(response1, 0, 50); - _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + var promise3 = createImageBitmap(response1); + var promise4 = createImageBitmap(response2); + Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) { + ctx.drawImage(bitmap2, 0, 0); + ctx.drawImage(bitmap1, -100, 0); + ctx.drawImage(bitmap1, 100, 0); + ctx.drawImage(bitmap1, 0, -50); + ctx.drawImage(bitmap1, 0, 50); + _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.5arg.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.5arg.html index d82aa2d45d2..7671f3a4934 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.5arg.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.5arg.html @@ -42,14 +42,18 @@ var promise2 = new Promise(function(resolve, reject) { }; }); Promise.all([promise1, promise2]).then(function(response1, response2) { - ctx.drawImage(response2, 50, 0, 50, 50); - ctx.drawImage(response1, 0, 0, 50, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 50, 50); - _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + var promise3 = createImageBitmap(response1); + var promise4 = createImageBitmap(response2); + Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) { + ctx.drawImage(bitmap2, 50, 0, 50, 50); + ctx.drawImage(bitmap1, 0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.5arg.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.5arg.worker.js index 6fafc4e4f69..5917615f397 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.5arg.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.5arg.worker.js @@ -37,14 +37,18 @@ var promise2 = new Promise(function(resolve, reject) { }; }); Promise.all([promise1, promise2]).then(function(response1, response2) { - ctx.drawImage(response2, 50, 0, 50, 50); - ctx.drawImage(response1, 0, 0, 50, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 50, 50); - _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + var promise3 = createImageBitmap(response1); + var promise4 = createImageBitmap(response2); + Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) { + ctx.drawImage(bitmap2, 50, 0, 50, 50); + ctx.drawImage(bitmap1, 0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html index 44da5d5e5bb..829fc6b4a67 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html @@ -33,11 +33,13 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0, 100, 50, 0, 0, 100, 50); - _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, 50); + _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js index 697449f6dfe..afa730b9f7c 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js @@ -28,11 +28,13 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0, 100, 50, 0, 0, 100, 50); - _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, 50); + _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html index aad38fee72f..a01ace172a7 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html @@ -42,15 +42,19 @@ var promise2 = new Promise(function(resolve, reject) { }; }); Promise.all([promise1, promise2]).then(function(response1, response2) { - ctx.drawImage(response2, 0, 0, 100, 50, 0, 0, 100, 50); - ctx.drawImage(response1, 0, 0, 100, 50, -100, 0, 100, 50); - ctx.drawImage(response1, 0, 0, 100, 50, 100, 0, 100, 50); - ctx.drawImage(response1, 0, 0, 100, 50, 0, -50, 100, 50); - ctx.drawImage(response1, 0, 0, 100, 50, 0, 50, 100, 50); - _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + var promise3 = createImageBitmap(response1); + var promise4 = createImageBitmap(response2); + Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) { + ctx.drawImage(bitmap2, 0, 0, 100, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, -100, 0, 100, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 100, 0, 100, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, -50, 100, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, 50, 100, 50); + _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.worker.js index 19f4bbcb306..687f0244f25 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.worker.js @@ -37,15 +37,19 @@ var promise2 = new Promise(function(resolve, reject) { }; }); Promise.all([promise1, promise2]).then(function(response1, response2) { - ctx.drawImage(response2, 0, 0, 100, 50, 0, 0, 100, 50); - ctx.drawImage(response1, 0, 0, 100, 50, -100, 0, 100, 50); - ctx.drawImage(response1, 0, 0, 100, 50, 100, 0, 100, 50); - ctx.drawImage(response1, 0, 0, 100, 50, 0, -50, 100, 50); - ctx.drawImage(response1, 0, 0, 100, 50, 0, 50, 100, 50); - _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + var promise3 = createImageBitmap(response1); + var promise4 = createImageBitmap(response2); + Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) { + ctx.drawImage(bitmap2, 0, 0, 100, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, -100, 0, 100, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 100, 0, 100, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, -50, 100, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, 50, 100, 50); + _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html index ce7f835bc8d..ddea3857568 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html @@ -42,15 +42,19 @@ var promise2 = new Promise(function(resolve, reject) { }; }); Promise.all([promise1, promise2]).then(function(response1, response2) { - ctx.drawImage(response2, 1, 1, 1, 1, 0, 0, 100, 50); - ctx.drawImage(response1, 0, 0, 100, 50, -50, 0, 50, 50); - ctx.drawImage(response1, 0, 0, 100, 50, 100, 0, 50, 50); - ctx.drawImage(response1, 0, 0, 100, 50, 0, -25, 100, 25); - ctx.drawImage(response1, 0, 0, 100, 50, 0, 50, 100, 25); - _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + var promise3 = createImageBitmap(response1); + var promise4 = createImageBitmap(response2); + Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) { + ctx.drawImage(bitmap2, 1, 1, 1, 1, 0, 0, 100, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, -50, 0, 50, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 100, 0, 50, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, -25, 100, 25); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, 50, 100, 25); + _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.worker.js index 3b85461f71f..7f586ef0558 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.worker.js @@ -37,15 +37,19 @@ var promise2 = new Promise(function(resolve, reject) { }; }); Promise.all([promise1, promise2]).then(function(response1, response2) { - ctx.drawImage(response2, 1, 1, 1, 1, 0, 0, 100, 50); - ctx.drawImage(response1, 0, 0, 100, 50, -50, 0, 50, 50); - ctx.drawImage(response1, 0, 0, 100, 50, 100, 0, 50, 50); - ctx.drawImage(response1, 0, 0, 100, 50, 0, -25, 100, 25); - ctx.drawImage(response1, 0, 0, 100, 50, 0, 50, 100, 25); - _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + var promise3 = createImageBitmap(response1); + var promise4 = createImageBitmap(response2); + Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) { + ctx.drawImage(bitmap2, 1, 1, 1, 1, 0, 0, 100, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, -50, 0, 50, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 100, 0, 50, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, -25, 100, 25); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, 50, 100, 25); + _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html index c18a47ff34f..6541d762bf1 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html @@ -33,11 +33,13 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 140, 20, 100, 50, 0, 0, 100, 50); - _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 140, 20, 100, 50, 0, 0, 100, 50); + _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js index 8525ee99efa..7cefad92dd6 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js @@ -28,11 +28,13 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 140, 20, 100, 50, 0, 0, 100, 50); - _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 140, 20, 100, 50, 0, 0, 100, 50); + _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html index 4b43d5fb08e..3c718c8da45 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html @@ -33,18 +33,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0, 256, 256, 0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 51, 26); - ctx.fillRect(49, 24, 51, 26); - _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 20,20, 0,255,0,255, "20,20", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 80,20, 0,255,0,255, "80,20", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 20,30, 0,255,0,255, "20,30", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 80,30, 0,255,0,255, "80,30", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0, 256, 256, 0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 51, 26); + ctx.fillRect(49, 24, 51, 26); + _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 20,20, 0,255,0,255, "20,20", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 80,20, 0,255,0,255, "80,20", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 20,30, 0,255,0,255, "20,30", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 80,30, 0,255,0,255, "80,30", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js index d73e3b952dd..dac1c7a0a9a 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js @@ -28,18 +28,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0, 256, 256, 0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 51, 26); - ctx.fillRect(49, 24, 51, 26); - _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 20,20, 0,255,0,255, "20,20", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 80,20, 0,255,0,255, "80,20", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 20,30, 0,255,0,255, "20,30", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 80,30, 0,255,0,255, "80,30", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0, 256, 256, 0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 51, 26); + ctx.fillRect(49, 24, 51, 26); + _assertPixelApprox(offscreenCanvas, 0,0, 0,255,0,255, "0,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,0, 0,255,0,255, "99,0", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 0,49, 0,255,0,255, "0,49", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 99,49, 0,255,0,255, "99,49", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 20,20, 0,255,0,255, "20,20", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 80,20, 0,255,0,255, "80,20", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 20,30, 0,255,0,255, "20,30", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 80,30, 0,255,0,255, "80,30", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.alpha.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.alpha.html index 33b2502f65b..f1a1f083232 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.alpha.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.alpha.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js index 5f29c1a1cca..6828af9225e 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js @@ -29,8 +29,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html index 16e9f791b2a..28708941b46 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html @@ -31,8 +31,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js index c3b566e844a..ce6e8ee4f55 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js @@ -26,8 +26,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.broken.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.broken.html index a64d20e731e..531376aaab7 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.broken.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.broken.html @@ -31,10 +31,12 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js index 63163bd60aa..4acc40b49e6 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js @@ -26,10 +26,12 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.clip.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.clip.html index 51651e56f39..562a9c5d0b8 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.clip.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.clip.html @@ -35,8 +35,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js index 90d0aad3ff8..1741f15b682 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js @@ -30,8 +30,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.composite.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.composite.html index ba56e366f5a..de37739993f 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.composite.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.composite.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js index 09e3b3a00af..eecc8914e3b 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js @@ -29,8 +29,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.floatsource.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.floatsource.html index 49a88fab035..f90b41d3f30 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.floatsource.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.floatsource.html @@ -31,8 +31,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js index 45398e83191..d154a12b0a6 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js @@ -26,8 +26,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedest.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedest.html index 9466738bcf5..d018e943d77 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedest.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedest.html @@ -33,18 +33,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 100, 78, 50, 50, 0, 50, 50, -50); - ctx.drawImage(response, 100, 128, 50, -50, 100, 50, -50, -50); - _assertPixelApprox(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 100, 78, 50, 50, 0, 50, 50, -50); + ctx.drawImage(bitmap, 100, 128, 50, -50, 100, 50, -50, -50); + _assertPixelApprox(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js index 284b4584067..0185dd4a452 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js @@ -28,18 +28,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 100, 78, 50, 50, 0, 50, 50, -50); - ctx.drawImage(response, 100, 128, 50, -50, 100, 50, -50, -50); - _assertPixelApprox(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 100, 78, 50, 50, 0, 50, 50, -50); + ctx.drawImage(bitmap, 100, 128, 50, -50, 100, 50, -50, -50); + _assertPixelApprox(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedir.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedir.html index 4cbd37445c1..2f0a91dacc7 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedir.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedir.html @@ -33,18 +33,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 178, 50, -100, 0, 0, 50, 100); - ctx.drawImage(response, 0, 78, 50, 100, 50, 100, 50, -100); - _assertPixelApprox(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 178, 50, -100, 0, 0, 50, 100); + ctx.drawImage(bitmap, 0, 78, 50, 100, 50, 100, 50, -100); + _assertPixelApprox(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js index 00f0e7ec066..b29cdad740e 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js @@ -28,18 +28,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 178, 50, -100, 0, 0, 50, 100); - ctx.drawImage(response, 0, 78, 50, 100, 50, 100, 50, -100); - _assertPixelApprox(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 178, 50, -100, 0, 0, 50, 100); + ctx.drawImage(bitmap, 0, 78, 50, 100, 50, 100, 50, -100); + _assertPixelApprox(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativesource.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativesource.html index 66e9c212231..c2f78e5a952 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativesource.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativesource.html @@ -33,18 +33,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 100, 78, -100, 50, 0, 0, 50, 50); - ctx.drawImage(response, 100, 128, -100, -50, 50, 0, 50, 50); - _assertPixelApprox(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 100, 78, -100, 50, 0, 0, 50, 50); + ctx.drawImage(bitmap, 100, 128, -100, -50, 50, 0, 50, 50); + _assertPixelApprox(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js index 0f24542d928..2171f692f53 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js @@ -28,18 +28,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 100, 78, -100, 50, 0, 0, 50, 50); - ctx.drawImage(response, 100, 128, -100, -50, 50, 0, 50, 50); - _assertPixelApprox(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 100, 78, -100, 50, 0, 0, 50, 50); + ctx.drawImage(bitmap, 100, 128, -100, -50, 50, 0, 50, 50); + _assertPixelApprox(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 51,1, 0,255,0,255, "51,1", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 51,48, 0,255,0,255, "51,48", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html index 9ca1a884b60..c6bab2ea43d 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html @@ -33,308 +33,310 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, Infinity, 0); -ctx.drawImage(response, -Infinity, 0); -ctx.drawImage(response, NaN, 0); -ctx.drawImage(response, 0, Infinity); -ctx.drawImage(response, 0, -Infinity); -ctx.drawImage(response, 0, NaN); -ctx.drawImage(response, Infinity, Infinity); - ctx.drawImage(response, Infinity, 0, 100, 50); -ctx.drawImage(response, -Infinity, 0, 100, 50); -ctx.drawImage(response, NaN, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, -Infinity, 100, 50); -ctx.drawImage(response, 0, NaN, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, -Infinity, 50); -ctx.drawImage(response, 0, 0, NaN, 50); -ctx.drawImage(response, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, -Infinity); -ctx.drawImage(response, 0, 0, 100, NaN); -ctx.drawImage(response, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity); - ctx.drawImage(response, Infinity, 0, 100, 50, 0, 0, 100, 50); -ctx.drawImage(response, -Infinity, 0, 100, 50, 0, 0, 100, 50); -ctx.drawImage(response, NaN, 0, 100, 50, 0, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, 50, 0, 0, 100, 50); -ctx.drawImage(response, 0, -Infinity, 100, 50, 0, 0, 100, 50); -ctx.drawImage(response, 0, NaN, 100, 50, 0, 0, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, 50, 0, 0, 100, 50); -ctx.drawImage(response, 0, 0, -Infinity, 50, 0, 0, 100, 50); -ctx.drawImage(response, 0, 0, NaN, 50, 0, 0, 100, 50); -ctx.drawImage(response, 0, 0, 100, Infinity, 0, 0, 100, 50); -ctx.drawImage(response, 0, 0, 100, -Infinity, 0, 0, 100, 50); -ctx.drawImage(response, 0, 0, 100, NaN, 0, 0, 100, 50); -ctx.drawImage(response, 0, 0, 100, 50, Infinity, 0, 100, 50); -ctx.drawImage(response, 0, 0, 100, 50, -Infinity, 0, 100, 50); -ctx.drawImage(response, 0, 0, 100, 50, NaN, 0, 100, 50); -ctx.drawImage(response, 0, 0, 100, 50, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, 0, 100, 50, 0, -Infinity, 100, 50); -ctx.drawImage(response, 0, 0, 100, 50, 0, NaN, 100, 50); -ctx.drawImage(response, 0, 0, 100, 50, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, 100, 50, 0, 0, -Infinity, 50); -ctx.drawImage(response, 0, 0, 100, 50, 0, 0, NaN, 50); -ctx.drawImage(response, 0, 0, 100, 50, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, 50, 0, 0, 100, -Infinity); -ctx.drawImage(response, 0, 0, 100, 50, 0, 0, 100, NaN); -ctx.drawImage(response, Infinity, Infinity, 100, 50, 0, 0, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, 0, 0, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, 0, 0, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, 0, 0, 100, 50); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, 50); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, 0, 0, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, 50, Infinity, 0, 100, 50); -ctx.drawImage(response, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, 50, Infinity, 0, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, 50, 0, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, 50, 0, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, 50, 0, 0, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, 100, 50, 0, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, 50, 0, 0, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, 0, 0, 100, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, 0, 0, 100, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, 0, 0, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, Infinity, 0, 100, 50); -ctx.drawImage(response, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, Infinity, 0, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, 0, Infinity, 100, 50); -ctx.drawImage(response, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, 0, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, 0, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, 50, 0, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, 0, 0, 100, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity, 0, 0, 100, 50); -ctx.drawImage(response, Infinity, 0, 100, Infinity, Infinity, 0, 100, 50); -ctx.drawImage(response, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity, Infinity, 0, 100, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity, 0, Infinity, 100, 50); -ctx.drawImage(response, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity, 0, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity, 0, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, 100, Infinity, 0, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity, 0, 0, 100, Infinity); -ctx.drawImage(response, Infinity, 0, 100, 50, Infinity, 0, 100, 50); -ctx.drawImage(response, Infinity, 0, 100, 50, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, 50, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, 100, 50, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, 100, 50, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, 50, Infinity, 0, 100, Infinity); -ctx.drawImage(response, Infinity, 0, 100, 50, 0, Infinity, 100, 50); -ctx.drawImage(response, Infinity, 0, 100, 50, 0, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, 0, 100, 50, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, 50, 0, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, 100, 50, 0, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, 100, 50, 0, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, 50, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, 0, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, 0, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, Infinity, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, 50); -ctx.drawImage(response, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, 50, 0, 0, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity, 0, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, Infinity, Infinity, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, 50); -ctx.drawImage(response, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, Infinity, 100, Infinity, 0, 0, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, 100, 50, Infinity, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, 50, Infinity, Infinity, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, 50, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, 0, Infinity, 100, 50, Infinity, 0, Infinity, 50); -ctx.drawImage(response, 0, Infinity, 100, 50, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, 50, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, 100, 50, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, 50, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, 100, 50, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, 50, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, Infinity, 100, 50, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, Infinity, 100, 50, 0, 0, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, 50, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity, 0, 0, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, Infinity, Infinity, 0, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, Infinity, Infinity, 0, 0, Infinity, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, 50, Infinity, 0, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, 50, Infinity, Infinity, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, 0, Infinity, 50, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, 50, Infinity, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, Infinity, 50, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, 0, 0, Infinity, 50, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, 50, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, 50, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, 0, Infinity, 50, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, 0, Infinity, 50, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, 50, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, Infinity, 50, 0, 0, Infinity, Infinity); -ctx.drawImage(response, 0, 0, Infinity, 50, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, Infinity, Infinity, 0, 100, 50); -ctx.drawImage(response, 0, 0, 100, Infinity, Infinity, Infinity, 100, 50); -ctx.drawImage(response, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, 0, 100, Infinity, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, Infinity, Infinity, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, 100, Infinity, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, 0, 0, 100, Infinity, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, Infinity, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, 0, 100, Infinity, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, 0, 100, Infinity, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, 0, 100, Infinity, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, Infinity, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, 100, Infinity, 0, 0, Infinity, Infinity); -ctx.drawImage(response, 0, 0, 100, Infinity, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, 50, Infinity, Infinity, 100, 50); -ctx.drawImage(response, 0, 0, 100, 50, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, 0, 0, 100, 50, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, 0, 100, 50, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, 50, Infinity, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, 100, 50, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, 0, 0, 100, 50, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, 50, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, 0, 100, 50, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, 0, 100, 50, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, 50, 0, 0, Infinity, Infinity); - _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, Infinity, 0); +ctx.drawImage(bitmap, -Infinity, 0); +ctx.drawImage(bitmap, NaN, 0); +ctx.drawImage(bitmap, 0, Infinity); +ctx.drawImage(bitmap, 0, -Infinity); +ctx.drawImage(bitmap, 0, NaN); +ctx.drawImage(bitmap, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, -Infinity, 0, 100, 50); +ctx.drawImage(bitmap, NaN, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, -Infinity, 100, 50); +ctx.drawImage(bitmap, 0, NaN, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, -Infinity, 50); +ctx.drawImage(bitmap, 0, 0, NaN, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, -Infinity); +ctx.drawImage(bitmap, 0, 0, 100, NaN); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, -Infinity, 0, 100, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, NaN, 0, 100, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, -Infinity, 100, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, NaN, 100, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, -Infinity, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, NaN, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, -Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, NaN, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, -Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, NaN, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, -Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, NaN, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, -Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, NaN, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, -Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, NaN); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, Infinity); + _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js index f5d26785800..eaf58aa4909 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js @@ -28,308 +28,310 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, Infinity, 0); -ctx.drawImage(response, -Infinity, 0); -ctx.drawImage(response, NaN, 0); -ctx.drawImage(response, 0, Infinity); -ctx.drawImage(response, 0, -Infinity); -ctx.drawImage(response, 0, NaN); -ctx.drawImage(response, Infinity, Infinity); - ctx.drawImage(response, Infinity, 0, 100, 50); -ctx.drawImage(response, -Infinity, 0, 100, 50); -ctx.drawImage(response, NaN, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, -Infinity, 100, 50); -ctx.drawImage(response, 0, NaN, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, -Infinity, 50); -ctx.drawImage(response, 0, 0, NaN, 50); -ctx.drawImage(response, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, -Infinity); -ctx.drawImage(response, 0, 0, 100, NaN); -ctx.drawImage(response, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity); - ctx.drawImage(response, Infinity, 0, 100, 50, 0, 0, 100, 50); -ctx.drawImage(response, -Infinity, 0, 100, 50, 0, 0, 100, 50); -ctx.drawImage(response, NaN, 0, 100, 50, 0, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, 50, 0, 0, 100, 50); -ctx.drawImage(response, 0, -Infinity, 100, 50, 0, 0, 100, 50); -ctx.drawImage(response, 0, NaN, 100, 50, 0, 0, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, 50, 0, 0, 100, 50); -ctx.drawImage(response, 0, 0, -Infinity, 50, 0, 0, 100, 50); -ctx.drawImage(response, 0, 0, NaN, 50, 0, 0, 100, 50); -ctx.drawImage(response, 0, 0, 100, Infinity, 0, 0, 100, 50); -ctx.drawImage(response, 0, 0, 100, -Infinity, 0, 0, 100, 50); -ctx.drawImage(response, 0, 0, 100, NaN, 0, 0, 100, 50); -ctx.drawImage(response, 0, 0, 100, 50, Infinity, 0, 100, 50); -ctx.drawImage(response, 0, 0, 100, 50, -Infinity, 0, 100, 50); -ctx.drawImage(response, 0, 0, 100, 50, NaN, 0, 100, 50); -ctx.drawImage(response, 0, 0, 100, 50, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, 0, 100, 50, 0, -Infinity, 100, 50); -ctx.drawImage(response, 0, 0, 100, 50, 0, NaN, 100, 50); -ctx.drawImage(response, 0, 0, 100, 50, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, 100, 50, 0, 0, -Infinity, 50); -ctx.drawImage(response, 0, 0, 100, 50, 0, 0, NaN, 50); -ctx.drawImage(response, 0, 0, 100, 50, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, 50, 0, 0, 100, -Infinity); -ctx.drawImage(response, 0, 0, 100, 50, 0, 0, 100, NaN); -ctx.drawImage(response, Infinity, Infinity, 100, 50, 0, 0, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, 0, 0, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, Infinity, 50, 0, 0, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, 0, 0, 100, 50); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, 50); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, Infinity, 0, 0, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, 50, Infinity, 0, 100, 50); -ctx.drawImage(response, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, 50, Infinity, 0, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, 50, 0, Infinity, 100, 50); -ctx.drawImage(response, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, 50, 0, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, 50, 0, 0, Infinity, 50); -ctx.drawImage(response, Infinity, Infinity, 100, 50, 0, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, Infinity, 100, 50, 0, 0, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, 0, 0, 100, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, 0, 0, 100, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, Infinity, 0, 0, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, Infinity, 0, 100, 50); -ctx.drawImage(response, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, Infinity, 0, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, 0, Infinity, 100, 50); -ctx.drawImage(response, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, 0, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, 0, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, Infinity, 50, 0, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, Infinity, 50, 0, 0, 100, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity, 0, 0, 100, 50); -ctx.drawImage(response, Infinity, 0, 100, Infinity, Infinity, 0, 100, 50); -ctx.drawImage(response, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity, Infinity, 0, 100, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity, 0, Infinity, 100, 50); -ctx.drawImage(response, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity, 0, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity, 0, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, 100, Infinity, 0, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, Infinity, 0, 0, 100, Infinity); -ctx.drawImage(response, Infinity, 0, 100, 50, Infinity, 0, 100, 50); -ctx.drawImage(response, Infinity, 0, 100, 50, Infinity, Infinity, 100, 50); -ctx.drawImage(response, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, 50, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, 100, 50, Infinity, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, 100, 50, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, 50, Infinity, 0, 100, Infinity); -ctx.drawImage(response, Infinity, 0, 100, 50, 0, Infinity, 100, 50); -ctx.drawImage(response, Infinity, 0, 100, 50, 0, Infinity, Infinity, 50); -ctx.drawImage(response, Infinity, 0, 100, 50, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, 50, 0, Infinity, 100, Infinity); -ctx.drawImage(response, Infinity, 0, 100, 50, 0, 0, Infinity, 50); -ctx.drawImage(response, Infinity, 0, 100, 50, 0, 0, Infinity, Infinity); -ctx.drawImage(response, Infinity, 0, 100, 50, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, 0, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, 0, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, Infinity, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, Infinity, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, 50); -ctx.drawImage(response, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, Infinity, Infinity, 50, 0, 0, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, Infinity, 50, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity, 0, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, Infinity, Infinity, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, 50); -ctx.drawImage(response, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, Infinity, 100, Infinity, 0, 0, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, Infinity, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, 100, 50, Infinity, 0, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, 50, Infinity, Infinity, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, 50, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, 0, Infinity, 100, 50, Infinity, 0, Infinity, 50); -ctx.drawImage(response, 0, Infinity, 100, 50, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, 50, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, Infinity, 100, 50, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, Infinity, 100, 50, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, Infinity, 100, 50, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, 50, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, Infinity, 100, 50, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, Infinity, 100, 50, 0, 0, Infinity, Infinity); -ctx.drawImage(response, 0, Infinity, 100, 50, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity, 0, 0, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, Infinity, Infinity, 0, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, Infinity, Infinity, 0, 0, Infinity, Infinity); -ctx.drawImage(response, 0, 0, Infinity, Infinity, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, 50, Infinity, 0, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, 50, Infinity, Infinity, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, 0, Infinity, 50, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, 50, Infinity, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, Infinity, 50, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, 0, 0, Infinity, 50, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, 50, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, 0, Infinity, 50, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, 0, Infinity, 50, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, 0, Infinity, 50, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, Infinity, 50, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, Infinity, 50, 0, 0, Infinity, Infinity); -ctx.drawImage(response, 0, 0, Infinity, 50, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, Infinity, Infinity, 0, 100, 50); -ctx.drawImage(response, 0, 0, 100, Infinity, Infinity, Infinity, 100, 50); -ctx.drawImage(response, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, 0, 100, Infinity, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, Infinity, Infinity, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, 100, Infinity, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, 0, 0, 100, Infinity, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, Infinity, 0, Infinity, 100, 50); -ctx.drawImage(response, 0, 0, 100, Infinity, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, 0, 100, Infinity, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, 0, 100, Infinity, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, Infinity, 0, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, 100, Infinity, 0, 0, Infinity, Infinity); -ctx.drawImage(response, 0, 0, 100, Infinity, 0, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, 50, Infinity, Infinity, 100, 50); -ctx.drawImage(response, 0, 0, 100, 50, Infinity, Infinity, Infinity, 50); -ctx.drawImage(response, 0, 0, 100, 50, Infinity, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, 0, 100, 50, Infinity, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, 50, Infinity, 0, Infinity, 50); -ctx.drawImage(response, 0, 0, 100, 50, Infinity, 0, Infinity, Infinity); -ctx.drawImage(response, 0, 0, 100, 50, Infinity, 0, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, 50, 0, Infinity, Infinity, 50); -ctx.drawImage(response, 0, 0, 100, 50, 0, Infinity, Infinity, Infinity); -ctx.drawImage(response, 0, 0, 100, 50, 0, Infinity, 100, Infinity); -ctx.drawImage(response, 0, 0, 100, 50, 0, 0, Infinity, Infinity); - _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, Infinity, 0); +ctx.drawImage(bitmap, -Infinity, 0); +ctx.drawImage(bitmap, NaN, 0); +ctx.drawImage(bitmap, 0, Infinity); +ctx.drawImage(bitmap, 0, -Infinity); +ctx.drawImage(bitmap, 0, NaN); +ctx.drawImage(bitmap, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, -Infinity, 0, 100, 50); +ctx.drawImage(bitmap, NaN, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, -Infinity, 100, 50); +ctx.drawImage(bitmap, 0, NaN, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, -Infinity, 50); +ctx.drawImage(bitmap, 0, 0, NaN, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, -Infinity); +ctx.drawImage(bitmap, 0, 0, 100, NaN); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity); + ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, -Infinity, 0, 100, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, NaN, 0, 100, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, -Infinity, 100, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, NaN, 100, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, -Infinity, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, NaN, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, -Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, NaN, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, -Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, NaN, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, -Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, NaN, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, -Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, NaN, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, -Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, NaN); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, 50); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, Infinity); +ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, Infinity); + _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nowrap.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nowrap.html index 4d71c21bfb9..f0dfb298f28 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nowrap.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nowrap.html @@ -33,10 +33,12 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, -1950, 0, 2000, 50); - _assertPixelApprox(offscreenCanvas, 45,25, 0,255,0,255, "45,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 55,25, 0,255,0,255, "55,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, -1950, 0, 2000, 50); + _assertPixelApprox(offscreenCanvas, 45,25, 0,255,0,255, "45,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 55,25, 0,255,0,255, "55,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js index 6f6b1e93a39..aab08771db4 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js @@ -28,10 +28,12 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, -1950, 0, 2000, 50); - _assertPixelApprox(offscreenCanvas, 45,25, 0,255,0,255, "45,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 55,25, 0,255,0,255, "55,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, -1950, 0, 2000, 50); + _assertPixelApprox(offscreenCanvas, 45,25, 0,255,0,255, "45,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 55,25, 0,255,0,255, "55,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.path.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.path.html index 47763cdb434..10daf12cd23 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.path.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.path.html @@ -33,9 +33,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - ctx.fill(); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + ctx.fill(); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.path.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.path.worker.js index ba8302b5e1e..45a08297490 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.path.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.path.worker.js @@ -28,9 +28,11 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - ctx.fill(); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + ctx.fill(); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.svg.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.svg.html index ff83aa0330f..72ba2ec7ba4 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.svg.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.svg.html @@ -31,8 +31,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js index 382190e6cd3..50892c2b4a0 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js @@ -26,8 +26,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.transform.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.transform.html index 2adcf021422..b782ba87e68 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.transform.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.transform.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js index 5e1095bc74e..a4cb865dc1e 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js @@ -29,8 +29,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.html index 645e2c9711f..b941f3aa3aa 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.html @@ -33,10 +33,12 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(response, 10, 10, 0, 1, 0, 0, 100, 50); }); - assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(response, 10, 10, 1, 0, 0, 0, 100, 50); }); - assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(response, 10, 10, 0, 0, 0, 0, 100, 50); }); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(bitmap, 10, 10, 0, 1, 0, 0, 100, 50); }); + assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(bitmap, 10, 10, 1, 0, 0, 0, 100, 50); }); + assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(bitmap, 10, 10, 0, 0, 0, 0, 100, 50); }); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html index a38e98208b7..1abcb6abf49 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html @@ -33,10 +33,12 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(response, 0, 0, 100, 50); }); - assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(response, 0, 0, 100, 50); }); - assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(response, 0, 0, 100, 50); }); - _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(bitmap, 0, 0, 100, 50); }); + assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(bitmap, 0, 0, 100, 50); }); + assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(bitmap, 0, 0, 100, 50); }); + _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js index 304acdc1173..cf472ac4179 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js @@ -28,10 +28,12 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(response, 0, 0, 100, 50); }); - assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(response, 0, 0, 100, 50); }); - assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(response, 0, 0, 100, 50); }); - _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(bitmap, 0, 0, 100, 50); }); + assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(bitmap, 0, 0, 100, 50); }); + assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(bitmap, 0, 0, 100, 50); }); + _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js index 1e6f54f3882..b3b6a59cb7a 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js @@ -28,10 +28,12 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(response, 10, 10, 0, 1, 0, 0, 100, 50); }); - assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(response, 10, 10, 1, 0, 0, 0, 100, 50); }); - assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(response, 10, 10, 0, 0, 0, 0, 100, 50); }); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(bitmap, 10, 10, 0, 1, 0, 0, 100, 50); }); + assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(bitmap, 10, 10, 1, 0, 0, 0, 100, 50); }); + assert_throws("INDEX_SIZE_ERR", function() { ctx.drawImage(bitmap, 10, 10, 0, 0, 0, 0, 100, 50); }); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.image.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.image.html index 1e0585ec104..c1e356519b3 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.image.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.image.html @@ -32,13 +32,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.image.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.image.worker.js index adf6b7d5802..543aaef20f2 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.image.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.image.worker.js @@ -28,13 +28,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.crosscanvas.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.crosscanvas.html index d3c8cd636b4..daf2fd268d9 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.crosscanvas.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.crosscanvas.html @@ -30,13 +30,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var offscreenCanvas2 = new OffscreenCanvas(100, 50); - var pattern = offscreenCanvas2.getContext('2d').createPattern(response, 'no-repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var pattern = offscreenCanvas2.getContext('2d').createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.js index f660f213d6a..ea719d42359 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.js @@ -26,13 +26,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var offscreenCanvas2 = new OffscreenCanvas(100, 50); - var pattern = offscreenCanvas2.getContext('2d').createPattern(response, 'no-repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var pattern = offscreenCanvas2.getContext('2d').createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html index ea5adcc8fe4..ae3bdb2dba5 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html @@ -32,13 +32,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.js index 042f0c61a71..903cab7174a 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.js @@ -28,13 +28,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html index 8fcab2b0c9a..953861cde8c 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html @@ -34,14 +34,16 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(50, 0); - ctx.fillRect(-50, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 0); + ctx.fillRect(-50, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js index fae7427b58d..f8432144cdb 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js @@ -30,14 +30,16 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(50, 0); - ctx.fillRect(-50, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 0); + ctx.fillRect(-50, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html index 191f0bde3e1..f475aae99a3 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html @@ -30,18 +30,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 50, 50); - ctx.fillStyle = '#f00'; - ctx.fillRect(50, 0, 50, 50); - ctx.fillStyle = pattern; - ctx.translate(50, 0); - ctx.fillRect(-50, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.fillStyle = pattern; + ctx.translate(50, 0); + ctx.fillRect(-50, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js index 5c6c5c1c21e..abf6195c48a 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js @@ -26,18 +26,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 50, 50); - ctx.fillStyle = '#f00'; - ctx.fillRect(50, 0, 50, 50); - ctx.fillStyle = pattern; - ctx.translate(50, 0); - ctx.fillRect(-50, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.fillStyle = pattern; + ctx.translate(50, 0); + ctx.fillRect(-50, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html index 966fac84123..2c54ad40c58 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html @@ -32,16 +32,18 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(50, 25); - ctx.fillRect(-50, -25, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 50, 25); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 25); + ctx.fillRect(-50, -25, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 25); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js index 8cc326b733a..a1a438af1eb 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js @@ -28,16 +28,18 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(50, 25); - ctx.fillRect(-50, -25, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 50, 25); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 25); + ctx.fillRect(-50, -25, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 25); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html index 7fbee4db8ba..3a7374d9d3c 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html @@ -32,18 +32,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); - ctx.fillRect(-100, 0, 100, 50); - ctx.fillRect(0, 50, 100, 50); - ctx.fillRect(100, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + ctx.fillRect(-100, 0, 100, 50); + ctx.fillRect(0, 50, 100, 50); + ctx.fillRect(100, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.js index 85594b6370e..0b2c58d52e6 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.js @@ -28,18 +28,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); - ctx.fillRect(-100, 0, 100, 50); - ctx.fillRect(0, 50, 100, 50); - ctx.fillRect(100, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + ctx.fillRect(-100, 0, 100, 50); + ctx.fillRect(0, 50, 100, 50); + ctx.fillRect(100, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html index 02ffc97632e..ca0bb335144 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html @@ -32,18 +32,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.save(); - ctx.translate(0, -103); - ctx.fillRect(0, 103, 100, 50); - ctx.restore(); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 25); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.save(); + ctx.translate(0, -103); + ctx.fillRect(0, 103, 100, 50); + ctx.restore(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 25); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.js index e365dd6bbec..f771b226cd7 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.js @@ -28,18 +28,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.save(); - ctx.translate(0, -103); - ctx.fillRect(0, 103, 100, 50); - ctx.restore(); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 25); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.save(); + ctx.translate(0, -103); + ctx.fillRect(0, 103, 100, 50); + ctx.restore(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 25); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html index 8149d8938ea..8fcfb71d376 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html @@ -32,13 +32,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.js index d6bad4c2240..fa094c35b48 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.js @@ -28,13 +28,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html index 63d30dba51e..1a9731aa08b 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html @@ -32,14 +32,16 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(-128, -78); - ctx.fillRect(128, 78, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(-128, -78); + ctx.fillRect(128, 78, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.js index b31ebcb6656..8ca59610fec 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.js @@ -28,14 +28,16 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(-128, -78); - ctx.fillRect(128, 78, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(-128, -78); + ctx.fillRect(128, 78, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html index 404a51d727b..63b1cac13b6 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html @@ -30,13 +30,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.js index 3ab6b4068af..5ac23fecd91 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.js @@ -26,13 +26,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html index 70028f7b9fb..7e14e00d6f3 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html @@ -30,15 +30,17 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - ctx.translate(-128, -78); - ctx.fillRect(128, 78, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(-128, -78); + ctx.fillRect(128, 78, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.js index 3ae9dc9a7aa..2b8941a0eb1 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.js @@ -26,15 +26,17 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - ctx.translate(-128, -78); - ctx.fillRect(128, 78, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(-128, -78); + ctx.fillRect(128, 78, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html index 7af8e2dfe19..862a80e7dc1 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html @@ -32,14 +32,16 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(50, 25); - ctx.fillRect(-50, -25, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 25); + ctx.fillRect(-50, -25, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js index 3db708229dd..1d6fb4b9f7d 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js @@ -28,14 +28,16 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(50, 25); - ctx.fillRect(-50, -25, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 25); + ctx.fillRect(-50, -25, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html index 45e36a403ca..ccd6ca5841a 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html @@ -34,13 +34,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-x'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js index 209427ea824..1dfa11a9a84 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js @@ -30,13 +30,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-x'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html index 7818db33ec3..b5fbeec3b73 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html @@ -32,18 +32,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-x'); - ctx.fillStyle = pattern; - ctx.translate(0, 16); - ctx.fillRect(0, -16, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 16); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.translate(0, 16); + ctx.fillRect(0, -16, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 16); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.js index 080887b1051..3e07c9f9717 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.js @@ -28,18 +28,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-x'); - ctx.fillStyle = pattern; - ctx.translate(0, 16); - ctx.fillRect(0, -16, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 16); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.translate(0, 16); + ctx.fillRect(0, -16, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 16); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,25, 0,255,0,255, "1,25", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,25, 0,255,0,255, "98,25", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html index f2fcaac9cbf..1805608d1ec 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html @@ -32,15 +32,17 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-x'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 16); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 16); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js index 6c43646e1e9..e2cb046d288 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js @@ -28,15 +28,17 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-x'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 16); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 16); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html index 813f7f3a581..259c5a5d178 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html @@ -34,13 +34,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-y'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js index d9f53a00eb4..aa886ef9610 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js @@ -30,13 +30,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-y'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html index 6102405784f..373fafea8a6 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html @@ -32,18 +32,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-y'); - ctx.fillStyle = pattern; - ctx.translate(48, 0); - ctx.fillRect(-48, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 16, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.translate(48, 0); + ctx.fillRect(-48, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.js index 92c39e2f967..4fbedca9e73 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.js @@ -28,18 +28,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-y'); - ctx.fillStyle = pattern; - ctx.translate(48, 0); - ctx.fillRect(-48, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 16, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.translate(48, 0); + ctx.fillRect(-48, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 50,1, 0,255,0,255, "50,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 50,48, 0,255,0,255, "50,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html index 67c4061c753..1ef52dd8d10 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html @@ -32,15 +32,17 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-y'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 16, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js index dd6d243ba5a..50a15179897 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js @@ -28,15 +28,17 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-y'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 16, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.empty.html b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.empty.html index 426c069a446..9f40fe69577 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.empty.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.empty.html @@ -32,13 +32,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, ""); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 200, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, ""); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 200, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.js index 5338663f9f5..a31afa7139b 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.js @@ -28,13 +28,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, ""); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 200, 50); - _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); - _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); - _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, ""); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 200, 50); + _assertPixel(offscreenCanvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,1, 0,255,0,255, "98,1", "0,255,0,255"); + _assertPixel(offscreenCanvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255"); + _assertPixel(offscreenCanvas, 98,48, 0,255,0,255, "98,48", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.alpha.html b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.alpha.html index 205e32de01c..25ce1c1b107 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.alpha.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.alpha.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, -50); - _assertPixelApprox(offscreenCanvas, 50,25, 127,0,127,255, "50,25", "127,0,127,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, -50); + _assertPixelApprox(offscreenCanvas, 50,25, 127,0,127,255, "50,25", "127,0,127,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.alpha.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.alpha.worker.js index b40be65f5cd..17fc5a7dad3 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.alpha.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.alpha.worker.js @@ -30,8 +30,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, -50); - _assertPixelApprox(offscreenCanvas, 50,25, 127,0,127,255, "50,25", "127,0,127,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, -50); + _assertPixelApprox(offscreenCanvas, 50,25, 127,0,127,255, "50,25", "127,0,127,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.basic.html b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.basic.html index 9f16324a861..e1198acd10c 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.basic.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.basic.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, -50); - _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, -50); + _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.basic.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.basic.worker.js index e55f2d64c47..45126a218f9 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.basic.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.basic.worker.js @@ -30,8 +30,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, -50); - _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, -50); + _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.scale.html b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.scale.html index a1197f21828..7f3057b6022 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.scale.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.scale.html @@ -34,10 +34,12 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0, 100, 50, -10, -50, 240, 50); - _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0, 100, 50, -10, -50, 240, 50); + _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.scale.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.scale.worker.js index e1d6198f344..9ca1d7948a0 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.scale.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.scale.worker.js @@ -30,10 +30,12 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0, 100, 50, -10, -50, 240, 50); - _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0, 100, 50, -10, -50, 240, 50); + _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.section.html b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.section.html index b3f9ab17f04..1abc7558e12 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.section.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.section.html @@ -34,10 +34,12 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 50, 0, 50, 50, 0, -50, 50, 50); - _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 50, 0, 50, 50, 0, -50, 50, 50); + _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.section.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.section.worker.js index a278f4666dc..3b4deaa657d 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.section.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.section.worker.js @@ -30,10 +30,12 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 50, 0, 50, 50, 0, -50, 50, 50); - _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); - _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 50, 0, 50, 50, 0, -50, 50, 50); + _assertPixelApprox(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); + _assertPixelApprox(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 2); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.transparent.1.html b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.transparent.1.html index 05c125a376f..1d54ae599b7 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.transparent.1.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.transparent.1.html @@ -34,8 +34,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, -50); - _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, -50); + _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.transparent.1.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.transparent.1.worker.js index 599140ec83a..76dc8ff58f6 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.transparent.1.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.transparent.1.worker.js @@ -30,8 +30,10 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 0, -50); - _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, -50); + _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.transparent.2.html b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.transparent.2.html index 32fa486b3f4..2e2230b02bf 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.transparent.2.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.transparent.2.html @@ -36,12 +36,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 50, -50); - ctx.shadowColor = '#f00'; - ctx.drawImage(response, -50, -50); - _assertPixel(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255"); - _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); - _assertPixel(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 50, -50); + ctx.shadowColor = '#f00'; + ctx.drawImage(bitmap, -50, -50); + _assertPixel(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255"); + _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + _assertPixel(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.transparent.2.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.transparent.2.worker.js index 5b8862c0c8a..5f54763d129 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.transparent.2.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.image.transparent.2.worker.js @@ -32,12 +32,14 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - ctx.drawImage(response, 50, -50); - ctx.shadowColor = '#f00'; - ctx.drawImage(response, -50, -50); - _assertPixel(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255"); - _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); - _assertPixel(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 50, -50); + ctx.shadowColor = '#f00'; + ctx.drawImage(bitmap, -50, -50); + _assertPixel(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255"); + _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + _assertPixel(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.alpha.html b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.alpha.html index 3e55eb40003..3f11789c88a 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.alpha.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.alpha.html @@ -30,13 +30,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.shadowOffsetY = 50; - ctx.shadowColor = '#00f'; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.alpha.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.alpha.worker.js index fc6fdbeb03e..616169f823c 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.alpha.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.alpha.worker.js @@ -26,13 +26,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.shadowOffsetY = 50; - ctx.shadowColor = '#00f'; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.basic.html b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.basic.html index d70f2fce6b3..8c4ff934b93 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.basic.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.basic.html @@ -30,13 +30,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.shadowColor = '#0f0'; - ctx.shadowOffsetY = 50; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.basic.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.basic.worker.js index 5c2a7c97f94..91e9fe9f180 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.basic.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.basic.worker.js @@ -26,13 +26,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.shadowColor = '#0f0'; - ctx.shadowOffsetY = 50; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.transparent.1.html b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.transparent.1.html index 29103ad6214..26b50578c1e 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.transparent.1.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.transparent.1.html @@ -30,13 +30,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat'); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - ctx.shadowColor = '#f00'; - ctx.shadowOffsetY = 50; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.transparent.1.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.transparent.1.worker.js index bf8781b3eda..70ca9a8128d 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.transparent.1.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.transparent.1.worker.js @@ -26,13 +26,15 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat'); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - ctx.shadowColor = '#f00'; - ctx.shadowOffsetY = 50; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.transparent.2.html b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.transparent.2.html index 6509bae1f55..983b9ff1fac 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.transparent.2.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.transparent.2.html @@ -30,18 +30,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 50, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(50, 0, 50, 50); - ctx.shadowOffsetY = 50; - ctx.shadowColor = '#0f0'; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); - _assertPixel(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255"); - _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); - _assertPixel(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + _assertPixel(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255"); + _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + _assertPixel(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.transparent.2.worker.js b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.transparent.2.worker.js index 8a2b7165e78..db88180fc30 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.transparent.2.worker.js +++ b/tests/wpt/web-platform-tests/offscreen-canvas/shadows/2d.shadow.pattern.transparent.2.worker.js @@ -26,18 +26,20 @@ var promise = new Promise(function(resolve, reject) { }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 50, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(50, 0, 50, 50); - ctx.shadowOffsetY = 50; - ctx.shadowColor = '#0f0'; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); - _assertPixel(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255"); - _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); - _assertPixel(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255"); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + _assertPixel(offscreenCanvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255"); + _assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); + _assertPixel(offscreenCanvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255"); + }, t_fail); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/tools/tests2d.yaml b/tests/wpt/web-platform-tests/offscreen-canvas/tools/tests2d.yaml index 6662668f373..645d6847bdf 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/tools/tests2d.yaml +++ b/tests/wpt/web-platform-tests/offscreen-canvas/tools/tests2d.yaml @@ -595,8 +595,10 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - @assert pixel 50,25 ==~ 2,253,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + @assert pixel 50,25 ==~ 2,253,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.composite.globalAlpha.canvas @@ -630,10 +632,12 @@ }; }); promise.then(function(response) { - ctx.fillStyle = ctx.createPattern(response, 'no-repeat'); - ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations - ctx.fillRect(0, 0, 100, 50); - @assert pixel 50,25 ==~ 2,253,0,255; + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 ==~ 2,253,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.composite.globalAlpha.canvaspattern @@ -762,8 +766,10 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - @assert pixel 50,25 ==~ %s +/- 5; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + @assert pixel 50,25 ==~ %s +/- 5; + }, t_fail); }).then(t_pass, t_fail); """ % (dest, op, to_test(expected)), } ) @@ -788,12 +794,14 @@ }; }); promise.then(function(response) { - ctx2.drawImage(response, 0, 0); - ctx.fillStyle = 'rgba%s'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = '%s'; - ctx.drawImage(offscreenCanvas2, 0, 0); - @assert pixel 50,25 ==~ %s +/- 5; + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba%s'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = '%s'; + ctx.drawImage(offscreenCanvas2, 0, 0); + @assert pixel 50,25 ==~ %s +/- 5; + }, t_fail); }).then(t_pass, t_fail); """ % (dest, op, to_test(expected)), } ) @@ -844,9 +852,11 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 40, 40, 10, 10, 40, 50, 10, 10); - @assert pixel 15,15 ==~ %s +/- 5; - @assert pixel 50,25 ==~ %s +/- 5; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + @assert pixel 15,15 ==~ %s +/- 5; + @assert pixel 50,25 ==~ %s +/- 5; + }, t_fail); }).then(t_pass, t_fail); """ % (dest, op, to_test(expected0), to_test(expected0)), } ) @@ -893,9 +903,11 @@ }; }); promise.then(function(response) { - ctx.fillStyle = ctx.createPattern(response, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - @assert pixel 50,25 ==~ %s +/- 5; + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + @assert pixel 50,25 ==~ %s +/- 5; + }, t_fail); }).then(t_pass, t_fail); """ % (dest, op, to_test(expected0)), } ) @@ -2131,13 +2143,15 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.basic.canvas @@ -2239,13 +2253,15 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, ""); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 200, 50); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, ""); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 200, 50); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.repeat.null @@ -2344,13 +2360,15 @@ }; }); promise.then(function(response) { - var offscreenCanvas2 = new OffscreenCanvas(100, 50); - var pattern = offscreenCanvas2.getContext('2d').createPattern(response, 'no-repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - @assert pixel 50,25 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var pattern = offscreenCanvas2.getContext('2d').createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.norepeat.basic @@ -2369,13 +2387,15 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.norepeat.outside @@ -2394,18 +2414,20 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); - ctx.fillRect(-100, 0, 100, 50); - ctx.fillRect(0, 50, 100, 50); - ctx.fillRect(100, 0, 100, 50); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + ctx.fillRect(-100, 0, 100, 50); + ctx.fillRect(0, 50, 100, 50); + ctx.fillRect(100, 0, 100, 50); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.norepeat.coord1 @@ -2426,14 +2448,16 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(50, 0); - ctx.fillRect(-50, 0, 100, 50); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 0); + ctx.fillRect(-50, 0, 100, 50); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.norepeat.coord2 @@ -2450,18 +2474,20 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 50, 50); - ctx.fillStyle = '#f00'; - ctx.fillRect(50, 0, 50, 50); - ctx.fillStyle = pattern; - ctx.translate(50, 0); - ctx.fillRect(-50, 0, 100, 50); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.fillStyle = pattern; + ctx.translate(50, 0); + ctx.fillRect(-50, 0, 100, 50); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.norepeat.coord3 @@ -2480,16 +2506,18 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(50, 25); - ctx.fillRect(-50, -25, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 50, 25); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 25); + ctx.fillRect(-50, -25, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 25); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeat.basic @@ -2508,13 +2536,15 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeat.outside @@ -2533,14 +2563,16 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(50, 25); - ctx.fillRect(-50, -25, 100, 50); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 25); + ctx.fillRect(-50, -25, 100, 50); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeat.coord1 @@ -2559,14 +2591,16 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(-128, -78); - ctx.fillRect(128, 78, 100, 50); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(-128, -78); + ctx.fillRect(128, 78, 100, 50); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeat.coord2 @@ -2583,13 +2617,15 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeat.coord3 @@ -2606,15 +2642,17 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - ctx.translate(-128, -78); - ctx.fillRect(128, 78, 100, 50); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(-128, -78); + ctx.fillRect(128, 78, 100, 50); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeatx.basic @@ -2635,13 +2673,15 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-x'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeatx.outside @@ -2660,15 +2700,17 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-x'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 16); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 16); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeatx.coord1 @@ -2687,18 +2729,20 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-x'); - ctx.fillStyle = pattern; - ctx.translate(0, 16); - ctx.fillRect(0, -16, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 16); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,25 == 0,255,0,255; - @assert pixel 98,25 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.translate(0, 16); + ctx.fillRect(0, -16, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 16); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,25 == 0,255,0,255; + @assert pixel 98,25 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeaty.basic @@ -2719,13 +2763,15 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-y'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeaty.outside @@ -2744,15 +2790,17 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-y'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 16, 50); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 50); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeaty.coord1 @@ -2773,18 +2821,20 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat-y'); - ctx.fillStyle = pattern; - ctx.translate(48, 0); - ctx.fillRect(-48, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 16, 50); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 50,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 50,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.translate(48, 0); + ctx.fillRect(-48, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 50); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 50,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 50,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.orientation.image @@ -2804,18 +2854,20 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.save(); - ctx.translate(0, -103); - ctx.fillRect(0, 103, 100, 50); - ctx.restore(); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 25); - @assert pixel 1,1 == 0,255,0,255; - @assert pixel 98,1 == 0,255,0,255; - @assert pixel 1,48 == 0,255,0,255; - @assert pixel 98,48 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.save(); + ctx.translate(0, -103); + ctx.fillRect(0, 103, 100, 50); + ctx.restore(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 25); + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.pattern.paint.orientation.canvas @@ -3349,8 +3401,10 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 0, -50); - @assert pixel 50,25 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, -50); + @assert pixel 50,25 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.shadow.image.transparent.1 @@ -3374,8 +3428,10 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 0, -50); - @assert pixel 50,25 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, -50); + @assert pixel 50,25 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.shadow.image.transparent.2 @@ -3401,12 +3457,14 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 50, -50); - ctx.shadowColor = '#f00'; - ctx.drawImage(response, -50, -50); - @assert pixel 25,25 == 0,255,0,255; - @assert pixel 50,25 == 0,255,0,255; - @assert pixel 75,25 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 50, -50); + ctx.shadowColor = '#f00'; + ctx.drawImage(bitmap, -50, -50); + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.shadow.image.alpha @@ -3430,8 +3488,10 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 0, -50); - @assert pixel 50,25 ==~ 127,0,127,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, -50); + @assert pixel 50,25 ==~ 127,0,127,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.shadow.image.section @@ -3455,10 +3515,12 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 50, 0, 50, 50, 0, -50, 50, 50); - @assert pixel 25,25 ==~ 0,255,0,255; - @assert pixel 50,25 ==~ 0,255,0,255; - @assert pixel 75,25 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 50, 0, 50, 50, 0, -50, 50, 50); + @assert pixel 25,25 ==~ 0,255,0,255; + @assert pixel 50,25 ==~ 0,255,0,255; + @assert pixel 75,25 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.shadow.image.scale @@ -3482,10 +3544,12 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0, 100, 50, -10, -50, 240, 50); - @assert pixel 25,25 ==~ 0,255,0,255; - @assert pixel 50,25 ==~ 0,255,0,255; - @assert pixel 75,25 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0, 100, 50, -10, -50, 240, 50); + @assert pixel 25,25 ==~ 0,255,0,255; + @assert pixel 50,25 ==~ 0,255,0,255; + @assert pixel 75,25 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.shadow.canvas.basic @@ -3577,13 +3641,15 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.shadowColor = '#0f0'; - ctx.shadowOffsetY = 50; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + }, t_fail); }).then(t_pass, t_fail); - name: 2d.shadow.pattern.transparent.1 @@ -3604,13 +3670,15 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat'); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - ctx.shadowColor = '#f00'; - ctx.shadowOffsetY = 50; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + }, t_fail); }).then(t_pass, t_fail); - name: 2d.shadow.pattern.transparent.2 @@ -3630,18 +3698,20 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 50, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(50, 0, 50, 50); - ctx.shadowOffsetY = 50; - ctx.shadowColor = '#0f0'; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); - @assert pixel 25,25 == 0,255,0,255; - @assert pixel 50,25 == 0,255,0,255; - @assert pixel 75,25 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + @assert pixel 25,25 == 0,255,0,255; + @assert pixel 50,25 == 0,255,0,255; + @assert pixel 75,25 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.shadow.pattern.alpha @@ -3661,13 +3731,15 @@ }; }); promise.then(function(response) { - var pattern = ctx.createPattern(response, 'repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.shadowOffsetY = 50; - ctx.shadowColor = '#00f'; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + }, t_fail); }).then(t_pass, t_fail); - name: 2d.shadow.gradient.basic @@ -4356,15 +4428,19 @@ }; }); Promise.all([promise1, promise2]).then(function(response1, response2) { - ctx.drawImage(response2, 0, 0); - ctx.drawImage(response1, -100, 0); - ctx.drawImage(response1, 100, 0); - ctx.drawImage(response1, 0, -50); - ctx.drawImage(response1, 0, 50); - @assert pixel 0,0 ==~ 0,255,0,255; - @assert pixel 99,0 ==~ 0,255,0,255; - @assert pixel 0,49 ==~ 0,255,0,255; - @assert pixel 99,49 ==~ 0,255,0,255; + var promise3 = createImageBitmap(response1); + var promise4 = createImageBitmap(response2); + Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) { + ctx.drawImage(bitmap2, 0, 0); + ctx.drawImage(bitmap1, -100, 0); + ctx.drawImage(bitmap1, 100, 0); + ctx.drawImage(bitmap1, 0, -50); + ctx.drawImage(bitmap1, 0, 50); + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.5arg @@ -4396,14 +4472,18 @@ }; }); Promise.all([promise1, promise2]).then(function(response1, response2) { - ctx.drawImage(response2, 50, 0, 50, 50); - ctx.drawImage(response1, 0, 0, 50, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 50, 50); - @assert pixel 0,0 ==~ 0,255,0,255; - @assert pixel 99,0 ==~ 0,255,0,255; - @assert pixel 0,49 ==~ 0,255,0,255; - @assert pixel 99,49 ==~ 0,255,0,255; + var promise3 = createImageBitmap(response1); + var promise4 = createImageBitmap(response2); + Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) { + ctx.drawImage(bitmap2, 50, 0, 50, 50); + ctx.drawImage(bitmap1, 0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.9arg.basic @@ -4425,11 +4505,13 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0, 100, 50, 0, 0, 100, 50); - @assert pixel 0,0 ==~ 0,255,0,255; - @assert pixel 99,0 ==~ 0,255,0,255; - @assert pixel 0,49 ==~ 0,255,0,255; - @assert pixel 99,49 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, 50); + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.9arg.sourcepos @@ -4451,11 +4533,13 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 140, 20, 100, 50, 0, 0, 100, 50); - @assert pixel 0,0 ==~ 0,255,0,255; - @assert pixel 99,0 ==~ 0,255,0,255; - @assert pixel 0,49 ==~ 0,255,0,255; - @assert pixel 99,49 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 140, 20, 100, 50, 0, 0, 100, 50); + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.9arg.sourcesize @@ -4477,18 +4561,20 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0, 256, 256, 0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 51, 26); - ctx.fillRect(49, 24, 51, 26); - @assert pixel 0,0 ==~ 0,255,0,255; - @assert pixel 99,0 ==~ 0,255,0,255; - @assert pixel 0,49 ==~ 0,255,0,255; - @assert pixel 99,49 ==~ 0,255,0,255; - @assert pixel 20,20 ==~ 0,255,0,255; - @assert pixel 80,20 ==~ 0,255,0,255; - @assert pixel 20,30 ==~ 0,255,0,255; - @assert pixel 80,30 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0, 256, 256, 0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 51, 26); + ctx.fillRect(49, 24, 51, 26); + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + @assert pixel 20,20 ==~ 0,255,0,255; + @assert pixel 80,20 ==~ 0,255,0,255; + @assert pixel 20,30 ==~ 0,255,0,255; + @assert pixel 80,30 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.9arg.destpos @@ -4520,15 +4606,19 @@ }; }); Promise.all([promise1, promise2]).then(function(response1, response2) { - ctx.drawImage(response2, 0, 0, 100, 50, 0, 0, 100, 50); - ctx.drawImage(response1, 0, 0, 100, 50, -100, 0, 100, 50); - ctx.drawImage(response1, 0, 0, 100, 50, 100, 0, 100, 50); - ctx.drawImage(response1, 0, 0, 100, 50, 0, -50, 100, 50); - ctx.drawImage(response1, 0, 0, 100, 50, 0, 50, 100, 50); - @assert pixel 0,0 ==~ 0,255,0,255; - @assert pixel 99,0 ==~ 0,255,0,255; - @assert pixel 0,49 ==~ 0,255,0,255; - @assert pixel 99,49 ==~ 0,255,0,255; + var promise3 = createImageBitmap(response1); + var promise4 = createImageBitmap(response2); + Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) { + ctx.drawImage(bitmap2, 0, 0, 100, 50, 0, 0, 100, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, -100, 0, 100, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 100, 0, 100, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, -50, 100, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, 50, 100, 50); + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.9arg.destsize @@ -4560,15 +4650,19 @@ }; }); Promise.all([promise1, promise2]).then(function(response1, response2) { - ctx.drawImage(response2, 1, 1, 1, 1, 0, 0, 100, 50); - ctx.drawImage(response1, 0, 0, 100, 50, -50, 0, 50, 50); - ctx.drawImage(response1, 0, 0, 100, 50, 100, 0, 50, 50); - ctx.drawImage(response1, 0, 0, 100, 50, 0, -25, 100, 25); - ctx.drawImage(response1, 0, 0, 100, 50, 0, 50, 100, 25); - @assert pixel 0,0 ==~ 0,255,0,255; - @assert pixel 99,0 ==~ 0,255,0,255; - @assert pixel 0,49 ==~ 0,255,0,255; - @assert pixel 99,49 ==~ 0,255,0,255; + var promise3 = createImageBitmap(response1); + var promise4 = createImageBitmap(response2); + Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) { + ctx.drawImage(bitmap2, 1, 1, 1, 1, 0, 0, 100, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, -50, 0, 50, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 100, 0, 50, 50); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, -25, 100, 25); + ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, 50, 100, 25); + @assert pixel 0,0 ==~ 0,255,0,255; + @assert pixel 99,0 ==~ 0,255,0,255; + @assert pixel 0,49 ==~ 0,255,0,255; + @assert pixel 99,49 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.canvas @@ -4673,8 +4767,10 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50); - @assert pixel 50,25 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50); + @assert pixel 50,25 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.zerosource @@ -4697,10 +4793,12 @@ }; }); promise.then(function(response) { - @assert throws INDEX_SIZE_ERR ctx.drawImage(response, 10, 10, 0, 1, 0, 0, 100, 50); - @assert throws INDEX_SIZE_ERR ctx.drawImage(response, 10, 10, 1, 0, 0, 0, 100, 50); - @assert throws INDEX_SIZE_ERR ctx.drawImage(response, 10, 10, 0, 0, 0, 0, 100, 50); - @assert pixel 50,25 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap, 10, 10, 0, 1, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap, 10, 10, 1, 0, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap, 10, 10, 0, 0, 0, 0, 100, 50); + @assert pixel 50,25 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.zerosource.image @@ -4725,10 +4823,12 @@ }; }); promise.then(function(response) { - @assert throws INDEX_SIZE_ERR ctx.drawImage(response, 0, 0, 100, 50); - @assert throws INDEX_SIZE_ERR ctx.drawImage(response, 0, 0, 100, 50); - @assert throws INDEX_SIZE_ERR ctx.drawImage(response, 0, 0, 100, 50); - @assert pixel 50,25 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap, 0, 0, 100, 50); + @assert pixel 50,25 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.negativesource @@ -4752,18 +4852,20 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 100, 78, -100, 50, 0, 0, 50, 50); - ctx.drawImage(response, 100, 128, -100, -50, 50, 0, 50, 50); - @assert pixel 1,1 ==~ 0,255,0,255; - @assert pixel 1,48 ==~ 0,255,0,255; - @assert pixel 98,1 ==~ 0,255,0,255; - @assert pixel 98,48 ==~ 0,255,0,255; - @assert pixel 48,1 ==~ 0,255,0,255; - @assert pixel 48,48 ==~ 0,255,0,255; - @assert pixel 51,1 ==~ 0,255,0,255; - @assert pixel 51,48 ==~ 0,255,0,255; - @assert pixel 25,25 ==~ 0,255,0,255; - @assert pixel 75,25 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 100, 78, -100, 50, 0, 0, 50, 50); + ctx.drawImage(bitmap, 100, 128, -100, -50, 50, 0, 50, 50); + @assert pixel 1,1 ==~ 0,255,0,255; + @assert pixel 1,48 ==~ 0,255,0,255; + @assert pixel 98,1 ==~ 0,255,0,255; + @assert pixel 98,48 ==~ 0,255,0,255; + @assert pixel 48,1 ==~ 0,255,0,255; + @assert pixel 48,48 ==~ 0,255,0,255; + @assert pixel 51,1 ==~ 0,255,0,255; + @assert pixel 51,48 ==~ 0,255,0,255; + @assert pixel 25,25 ==~ 0,255,0,255; + @assert pixel 75,25 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.negativedest @@ -4787,18 +4889,20 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 100, 78, 50, 50, 0, 50, 50, -50); - ctx.drawImage(response, 100, 128, 50, -50, 100, 50, -50, -50); - @assert pixel 1,1 ==~ 0,255,0,255; - @assert pixel 1,48 ==~ 0,255,0,255; - @assert pixel 98,1 ==~ 0,255,0,255; - @assert pixel 98,48 ==~ 0,255,0,255; - @assert pixel 48,1 ==~ 0,255,0,255; - @assert pixel 48,48 ==~ 0,255,0,255; - @assert pixel 51,1 ==~ 0,255,0,255; - @assert pixel 51,48 ==~ 0,255,0,255; - @assert pixel 25,25 ==~ 0,255,0,255; - @assert pixel 75,25 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 100, 78, 50, 50, 0, 50, 50, -50); + ctx.drawImage(bitmap, 100, 128, 50, -50, 100, 50, -50, -50); + @assert pixel 1,1 ==~ 0,255,0,255; + @assert pixel 1,48 ==~ 0,255,0,255; + @assert pixel 98,1 ==~ 0,255,0,255; + @assert pixel 98,48 ==~ 0,255,0,255; + @assert pixel 48,1 ==~ 0,255,0,255; + @assert pixel 48,48 ==~ 0,255,0,255; + @assert pixel 51,1 ==~ 0,255,0,255; + @assert pixel 51,48 ==~ 0,255,0,255; + @assert pixel 25,25 ==~ 0,255,0,255; + @assert pixel 75,25 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.negativedir @@ -4822,18 +4926,20 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 178, 50, -100, 0, 0, 50, 100); - ctx.drawImage(response, 0, 78, 50, 100, 50, 100, 50, -100); - @assert pixel 1,1 ==~ 0,255,0,255; - @assert pixel 1,48 ==~ 0,255,0,255; - @assert pixel 98,1 ==~ 0,255,0,255; - @assert pixel 98,48 ==~ 0,255,0,255; - @assert pixel 48,1 ==~ 0,255,0,255; - @assert pixel 48,48 ==~ 0,255,0,255; - @assert pixel 51,1 ==~ 0,255,0,255; - @assert pixel 51,48 ==~ 0,255,0,255; - @assert pixel 25,25 ==~ 0,255,0,255; - @assert pixel 75,25 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 178, 50, -100, 0, 0, 50, 100); + ctx.drawImage(bitmap, 0, 78, 50, 100, 50, 100, 50, -100); + @assert pixel 1,1 ==~ 0,255,0,255; + @assert pixel 1,48 ==~ 0,255,0,255; + @assert pixel 98,1 ==~ 0,255,0,255; + @assert pixel 98,48 ==~ 0,255,0,255; + @assert pixel 48,1 ==~ 0,255,0,255; + @assert pixel 48,48 ==~ 0,255,0,255; + @assert pixel 51,1 ==~ 0,255,0,255; + @assert pixel 51,48 ==~ 0,255,0,255; + @assert pixel 25,25 ==~ 0,255,0,255; + @assert pixel 75,25 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.outsidesource @@ -4860,18 +4966,22 @@ }; }); Promise.all([promise1, promise2]).then(function(response1, response2) { - ctx.drawImage(response2, 10.5, 10.5, 89.5, 39.5, 0, 0, 100, 50); - ctx.drawImage(response2, 5.5, 5.5, -5.5, -5.5, 0, 0, 100, 50); - ctx.drawImage(response2, 100, 50, -5, -5, 0, 0, 100, 50); - @assert throws INDEX_SIZE_ERR ctx.drawImage(response1, -0.001, 0, 100, 50, 0, 0, 100, 50); - @assert throws INDEX_SIZE_ERR ctx.drawImage(response1, 0, -0.001, 100, 50, 0, 0, 100, 50); - @assert throws INDEX_SIZE_ERR ctx.drawImage(response1, 0, 0, 100.001, 50, 0, 0, 100, 50); - @assert throws INDEX_SIZE_ERR ctx.drawImage(response1, 0, 0, 100, 50.001, 0, 0, 100, 50); - @assert throws INDEX_SIZE_ERR ctx.drawImage(response1, 50, 0, 50.001, 50, 0, 0, 100, 50); @moz-todo - @assert throws INDEX_SIZE_ERR ctx.drawImage(response1, 0, 0, -5, 5, 0, 0, 100, 50); - @assert throws INDEX_SIZE_ERR ctx.drawImage(response1, 0, 0, 5, -5, 0, 0, 100, 50); - @assert throws INDEX_SIZE_ERR ctx.drawImage(response1, 110, 60, -20, -20, 0, 0, 100, 50); - @assert pixel 50,25 ==~ 0,255,0,255; @moz-todo + var promise3 = createImageBitmap(response1); + var promise4 = createImageBitmap(response2); + Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) { + ctx.drawImage(bitmap2, 10.5, 10.5, 89.5, 39.5, 0, 0, 100, 50); + ctx.drawImage(bitmap2, 5.5, 5.5, -5.5, -5.5, 0, 0, 100, 50); + ctx.drawImage(bitmap2, 100, 50, -5, -5, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, -0.001, 0, 100, 50, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, -0.001, 100, 50, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, 0, 100.001, 50, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, 0, 100, 50.001, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 50, 0, 50.001, 50, 0, 0, 100, 50); @moz-todo + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, 0, -5, 5, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, 0, 5, -5, 0, 0, 100, 50); + @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 110, 60, -20, -20, 0, 0, 100, 50); + @assert pixel 50,25 ==~ 0,255,0,255; @moz-todo + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.broken @@ -4889,10 +4999,12 @@ }; }); promise.then(function(response) { - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - ctx.drawImage(response, 0, 0); - @assert pixel 50,25 ==~ 0,255,0,255; @moz-todo + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.drawImage(bitmap, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; @moz-todo + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.svg @@ -4911,8 +5023,10 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - @assert pixel 50,25 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.animated.poster @@ -4933,8 +5047,10 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - @assert pixel 50,25 ==~ 0,255,0,255; @moz-todo + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; @moz-todo + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.path @@ -4954,9 +5070,11 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - ctx.fill(); - @assert pixel 50,25 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + ctx.fill(); + @assert pixel 50,25 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.transform @@ -4979,8 +5097,10 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - @assert pixel 50,25 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.alpha @@ -5003,8 +5123,10 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - @assert pixel 50,25 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.clip @@ -5028,8 +5150,10 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - @assert pixel 50,25 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.composite @@ -5052,8 +5176,10 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, 0, 0); - @assert pixel 50,25 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + @assert pixel 50,25 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.nowrap @@ -5074,10 +5200,12 @@ }; }); promise.then(function(response) { - ctx.drawImage(response, -1950, 0, 2000, 50); - @assert pixel 45,25 ==~ 0,255,0,255; - @assert pixel 50,25 ==~ 0,255,0,255; - @assert pixel 55,25 ==~ 0,255,0,255; + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, -1950, 0, 2000, 50); + @assert pixel 45,25 ==~ 0,255,0,255; + @assert pixel 50,25 ==~ 0,255,0,255; + @assert pixel 55,25 ==~ 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.drawImage.nonfinite @@ -5100,10 +5228,12 @@ }; }); promise.then(function(response) { - @nonfinite ctx.drawImage(, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>); - @nonfinite ctx.drawImage(, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>); - @nonfinite ctx.drawImage(, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>); - @assert pixel 50,25 == 0,255,0,255; + createImageBitmap(response).then(bitmap => { + @nonfinite ctx.drawImage(, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>); + @nonfinite ctx.drawImage(, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>); + @nonfinite ctx.drawImage(, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>); + @assert pixel 50,25 == 0,255,0,255; + }, t_fail); }).then(t_pass, t_fail); - name: 2d.imageData.create2.basic diff --git a/tests/wpt/web-platform-tests/remote-playback/cancel-watch-availability.html b/tests/wpt/web-platform-tests/remote-playback/cancel-watch-availability.html index e4b633066a4..d83c8cecb00 100644 --- a/tests/wpt/web-platform-tests/remote-playback/cancel-watch-availability.html +++ b/tests/wpt/web-platform-tests/remote-playback/cancel-watch-availability.html @@ -7,7 +7,7 @@ + + + + + diff --git a/tests/wpt/web-platform-tests/trusted-types/empty-default-policy-report-only.tentative.html.headers b/tests/wpt/web-platform-tests/trusted-types/empty-default-policy-report-only.tentative.html.headers new file mode 100644 index 00000000000..fa87952ae48 --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/empty-default-policy-report-only.tentative.html.headers @@ -0,0 +1 @@ +Content-Security-Policy-Report-Only: trusted-types * diff --git a/tests/wpt/web-platform-tests/trusted-types/empty-default-policy.tentative.html b/tests/wpt/web-platform-tests/trusted-types/empty-default-policy.tentative.html new file mode 100644 index 00000000000..2d3a10addbc --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/empty-default-policy.tentative.html @@ -0,0 +1,52 @@ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/trusted-types/empty-default-policy.tentative.html.headers b/tests/wpt/web-platform-tests/trusted-types/empty-default-policy.tentative.html.headers new file mode 100644 index 00000000000..1bc33add09b --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/empty-default-policy.tentative.html.headers @@ -0,0 +1 @@ +Content-Security-Policy: trusted-types * diff --git a/tests/wpt/web-platform-tests/web-bundle/META.yml b/tests/wpt/web-platform-tests/web-bundle/META.yml new file mode 100644 index 00000000000..0f1912b23a4 --- /dev/null +++ b/tests/wpt/web-platform-tests/web-bundle/META.yml @@ -0,0 +1,5 @@ +spec: https://wicg.github.io/webpackage/draft-yasskin-wpack-bundled-exchanges.html +suggested_reviewers: + - horo + - irori + - jyasskin diff --git a/tests/wpt/web-platform-tests/web-bundle/README.md b/tests/wpt/web-platform-tests/web-bundle/README.md new file mode 100644 index 00000000000..03b42ab340a --- /dev/null +++ b/tests/wpt/web-platform-tests/web-bundle/README.md @@ -0,0 +1,9 @@ +This directory contains tests for the +[Web Bundles](https://wicg.github.io/webpackage/draft-yasskin-wpack-bundled-exchanges.html). + +`generate-test-wbns.sh` requires command-line tools in the +[webpackage repository](https://github.com/WICG/webpackage). +To install them, run: +``` +go get -u github.com/WICG/webpackage/go/bundle/cmd/... +``` diff --git a/tests/wpt/web-platform-tests/web-bundle/resources/generate-test-wbns.sh b/tests/wpt/web-platform-tests/web-bundle/resources/generate-test-wbns.sh new file mode 100755 index 00000000000..820bb12267c --- /dev/null +++ b/tests/wpt/web-platform-tests/web-bundle/resources/generate-test-wbns.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +if ! command -v gen-bundle > /dev/null 2>&1; then + echo "gen-bundle is not installed. Please run:" + echo " go get -u github.com/WICG/webpackage/go/bundle/cmd/..." + exit 1 +fi + +# TODO: Stop hard-coding "web-platform.test" when generating Web Bundles on the +# fly. +wpt_test_origin=https://web-platform.test:8444 + +gen-bundle \ + -version b1 \ + -baseURL $wpt_test_origin/web-bundle/resources/wbn/ \ + -primaryURL $wpt_test_origin/web-bundle/resources/wbn/location.html \ + -dir location/ \ + -o wbn/location.wbn diff --git a/tests/wpt/web-platform-tests/web-bundle/resources/location/location.html b/tests/wpt/web-platform-tests/web-bundle/resources/location/location.html new file mode 100644 index 00000000000..e272dad23da --- /dev/null +++ b/tests/wpt/web-platform-tests/web-bundle/resources/location/location.html @@ -0,0 +1,2 @@ + + diff --git a/tests/wpt/web-platform-tests/web-bundle/resources/location/location.js b/tests/wpt/web-platform-tests/web-bundle/resources/location/location.js new file mode 100644 index 00000000000..a1dbba73661 --- /dev/null +++ b/tests/wpt/web-platform-tests/web-bundle/resources/location/location.js @@ -0,0 +1,2 @@ + +window.opener.postMessage({location: location.href}, '*'); diff --git a/tests/wpt/web-platform-tests/web-bundle/resources/wbn/__dir__.headers b/tests/wpt/web-platform-tests/web-bundle/resources/wbn/__dir__.headers new file mode 100644 index 00000000000..21e57b9caca --- /dev/null +++ b/tests/wpt/web-platform-tests/web-bundle/resources/wbn/__dir__.headers @@ -0,0 +1,2 @@ +Content-Type: application/webbundle +X-Content-Type-Options: nosniff diff --git a/tests/wpt/web-platform-tests/web-bundle/resources/wbn/location.wbn b/tests/wpt/web-platform-tests/web-bundle/resources/wbn/location.wbn new file mode 100644 index 00000000000..1129cc1e92c Binary files /dev/null and b/tests/wpt/web-platform-tests/web-bundle/resources/wbn/location.wbn differ diff --git a/tests/wpt/web-platform-tests/web-bundle/wbn-location.tentative.html b/tests/wpt/web-platform-tests/web-bundle/wbn-location.tentative.html new file mode 100644 index 00000000000..e0604af6d1e --- /dev/null +++ b/tests/wpt/web-platform-tests/web-bundle/wbn-location.tentative.html @@ -0,0 +1,29 @@ + +Location of a page in a Web Bundle + + + + + + diff --git a/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/iframe.py b/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/iframe.py index 4cf8ad06b56..66df6ec9493 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/iframe.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/iframe.py @@ -26,6 +26,23 @@ def take_screenshot(session): "GET", "session/{session_id}/screenshot".format(**vars(session))) +def test_always_captures_top_browsing_context(session): + iframe_content = "{}".format(DEFAULT_CONTENT) + session.url = inline("""{0}{1}""".format(DEFAULT_CSS_STYLE, iframe(iframe_content))) + + response = take_screenshot(session) + reference_screenshot = assert_success(response) + assert png_dimensions(reference_screenshot) == viewport_dimensions(session) + + frame = session.find.css("iframe", all=False) + session.switch_frame(frame) + + response = take_screenshot(session) + screenshot = assert_success(response) + + assert screenshot == reference_screenshot + + @pytest.mark.parametrize("domain", ["", "alt"], ids=["same_origin", "cross_origin"]) def test_source_origin(session, url, domain): session.url = inline("""{0}{1}""".format(DEFAULT_CSS_STYLE, DEFAULT_CONTENT)) diff --git a/tests/wpt/web-platform-tests/webgpu/cts.html b/tests/wpt/web-platform-tests/webgpu/cts.html index 6099f7318f1..5c529e90401 100644 --- a/tests/wpt/web-platform-tests/webgpu/cts.html +++ b/tests/wpt/web-platform-tests/webgpu/cts.html @@ -66,6 +66,7 @@ + diff --git a/tests/wpt/web-platform-tests/webgpu/framework/version.js b/tests/wpt/web-platform-tests/webgpu/framework/version.js index 9d1c0810c9d..8dd830276b9 100644 --- a/tests/wpt/web-platform-tests/webgpu/framework/version.js +++ b/tests/wpt/web-platform-tests/webgpu/framework/version.js @@ -1,3 +1,3 @@ // AUTO-GENERATED - DO NOT EDIT. See tools/gen_version. -export const version = '70754155a0bca2c24e3e3c249bab9ee3dd765a26'; +export const version = 'a5c59f8995f38843e332ff4d869a72f75d2f028d'; diff --git a/tests/wpt/web-platform-tests/webgpu/suites/cts/copyImageBitmapToTexture.spec.js b/tests/wpt/web-platform-tests/webgpu/suites/cts/copyImageBitmapToTexture.spec.js new file mode 100644 index 00000000000..c9b07e83a81 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgpu/suites/cts/copyImageBitmapToTexture.spec.js @@ -0,0 +1,148 @@ +/** +* AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts +**/ + +export const description = ` +copy imageBitmap To texture tests. +`; +import { TestGroup, pcombine, poptions } from '../../framework/index.js'; +import { GPUTest } from './gpu_test.js'; + +function calculateRowPitch(width, bytesPerPixel) { + const bytesPerRow = width * bytesPerPixel; // Rounds up to a multiple of 256 according to WebGPU requirements. + + return (bytesPerRow - 1 >> 8) + 1 << 8; +} + +class F extends GPUTest { + checkCopyImageBitmapResult(src, expected, width, height, bytesPerPixel) { + const exp = new Uint8Array(expected.buffer, expected.byteOffset, expected.byteLength); + const rowPitch = calculateRowPitch(width, bytesPerPixel); + const dst = this.createCopyForMapRead(src, rowPitch * height); + this.eventualAsyncExpectation(async niceStack => { + const actual = new Uint8Array((await dst.mapReadAsync())); + const check = this.checkBufferWithRowPitch(actual, exp, width, height, rowPitch, bytesPerPixel); + + if (check !== undefined) { + niceStack.message = check; + this.rec.fail(niceStack); + } + + dst.destroy(); + }); + } + + checkBufferWithRowPitch(actual, exp, width, height, rowPitch, bytesPerPixel) { + const lines = []; + let failedPixels = 0; + + for (let i = 0; i < height; ++i) { + const bytesPerRow = width * bytesPerPixel; + + for (let j = 0; j < bytesPerRow; ++j) { + const indexExp = j + i * bytesPerRow; + const indexActual = j + rowPitch * i; + + if (actual[indexActual] !== exp[indexExp]) { + if (failedPixels > 4) { + break; + } + + failedPixels++; + lines.push(`at [${indexExp}], expected ${exp[indexExp]}, got ${actual[indexActual]}`); + } + } + + if (failedPixels > 4) { + lines.push('... and more'); + break; + } + } + + return failedPixels > 0 ? lines.join('\n') : undefined; + } // Using drawImage to extract imageBitmap content. + + + imageBitmapToData(imageBitmap) { + const imageCanvas = document.createElement('canvas'); + 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.'); + } + + imageCanvasContext.drawImage(imageBitmap, 0, 0, imageBitmap.width, imageBitmap.height); + return imageCanvasContext.getImageData(0, 0, imageBitmap.width, imageBitmap.height).data; + } + +} + +export const g = new TestGroup(F); +g.test('from ImageData', async t => { + const { + width, + height + } = t.params; // The texture format is rgba8uint, so the bytes per pixel is 4. + + const bytesPerPixel = 4; + const imagePixels = new Uint8ClampedArray(bytesPerPixel * width * height); + + for (let i = 0; i < width * height * bytesPerPixel; ++i) { + imagePixels[i] = i % 4 === 3 ? 255 : i % 256; + } + + const imageData = new ImageData(imagePixels, width, height); + const imageBitmap = await createImageBitmap(imageData); + const dst = t.device.createTexture({ + size: { + width: imageBitmap.width, + height: imageBitmap.height, + depth: 1 + }, + format: 'rgba8uint', + usage: GPUTextureUsage.COPY_DST | GPUTextureUsage.COPY_SRC + }); + t.device.defaultQueue.copyImageBitmapToTexture({ + imageBitmap, + origin: { + x: 0, + y: 0 + } + }, { + texture: dst + }, { + width: imageBitmap.width, + height: imageBitmap.height, + depth: 1 + }); + const data = t.imageBitmapToData(imageBitmap); + const rowPitchValue = calculateRowPitch(imageBitmap.width, bytesPerPixel); + const testBuffer = t.device.createBuffer({ + size: rowPitchValue * imageBitmap.height, + usage: GPUBufferUsage.COPY_SRC | GPUBufferUsage.COPY_DST + }); + const encoder = t.device.createCommandEncoder(); + encoder.copyTextureToBuffer({ + texture: dst, + mipLevel: 0, + origin: { + x: 0, + y: 0, + z: 0 + } + }, { + buffer: testBuffer, + rowPitch: rowPitchValue, + imageHeight: 0 + }, { + width: imageBitmap.width, + height: imageBitmap.height, + depth: 1 + }); + t.device.defaultQueue.submit([encoder.finish()]); + t.checkCopyImageBitmapResult(testBuffer, data, imageBitmap.width, imageBitmap.height, bytesPerPixel); +}).params(pcombine(poptions('width', [1, 2, 4, 15, 255, 256]), // +poptions('height', [1, 2, 4, 15, 255, 256]))); +//# sourceMappingURL=copyImageBitmapToTexture.spec.js.map \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webgpu/suites/cts/gpu_test.js b/tests/wpt/web-platform-tests/webgpu/suites/cts/gpu_test.js index 67429b9a255..cf52a6cacf8 100644 --- a/tests/wpt/web-platform-tests/webgpu/suites/cts/gpu_test.js +++ b/tests/wpt/web-platform-tests/webgpu/suites/cts/gpu_test.js @@ -99,19 +99,23 @@ export class GPUTest extends Fixture { return this.device.createShaderModule({ code }); - } // TODO: add an expectContents for textures, which logs data: uris on failure + } - - expectContents(src, expected) { - const exp = new Uint8Array(expected.buffer, expected.byteOffset, expected.byteLength); - const size = expected.buffer.byteLength; + createCopyForMapRead(src, size) { const dst = this.device.createBuffer({ - size: expected.buffer.byteLength, + size, usage: GPUBufferUsage.MAP_READ | GPUBufferUsage.COPY_DST }); const c = this.device.createCommandEncoder(); c.copyBufferToBuffer(src, 0, dst, 0, size); this.queue.submit([c.finish()]); + return dst; + } // TODO: add an expectContents for textures, which logs data: uris on failure + + + expectContents(src, expected) { + const exp = new Uint8Array(expected.buffer, expected.byteOffset, expected.byteLength); + const dst = this.createCopyForMapRead(src, expected.buffer.byteLength); this.eventualAsyncExpectation(async niceStack => { const actual = new Uint8Array((await dst.mapReadAsync())); const check = this.checkBuffer(actual, exp); @@ -153,7 +157,21 @@ export class GPUTest extends Fixture { failedPixels++; lines.push(`at [${i}], expected ${exp[i]}, got ${actual[i]}`); } - } + } // TODO: Could make a more convenient message, which could look like e.g.: + // + // Starting at offset 48, + // got 22222222 ABCDABCD 99999999 + // but expected 22222222 55555555 99999999 + // + // or + // + // Starting at offset 0, + // got 00000000 00000000 00000000 00000000 (... more) + // but expected 00FF00FF 00FF00FF 00FF00FF 00FF00FF (... more) + // + // Or, maybe these diffs aren't actually very useful (given we have the prints just above here), + // and we should remove them. More important will be logging of texture data in a visual format. + if (size <= 256 && failedPixels > 0) { const expHex = Array.from(exp).map(x => x.toString(16).padStart(2, '0')).join(''); diff --git a/tests/wpt/web-platform-tests/webgpu/suites/cts/index.js b/tests/wpt/web-platform-tests/webgpu/suites/cts/index.js index 9fb8395d5b5..e566792357a 100644 --- a/tests/wpt/web-platform-tests/webgpu/suites/cts/index.js +++ b/tests/wpt/web-platform-tests/webgpu/suites/cts/index.js @@ -53,6 +53,10 @@ export const listing = [ "path": "command_buffer/render/storeop", "description": "renderPass store op test that drawn quad is either stored or cleared based on storeop" }, + { + "path": "copyImageBitmapToTexture", + "description": "copy imageBitmap To texture tests." + }, { "path": "examples", "description": "Examples of writing CTS tests with various features.\n\nStart here when looking for examples of basic framework usage."