<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[265436] trunk/LayoutTests/imported/w3c</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/265436">265436</a></dd>
<dt>Author</dt> <dd>clord@igalia.com</dd>
<dt>Date</dt> <dd>2020-08-10 10:25:34 -0700 (Mon, 10 Aug 2020)</dd>
</dl>

<h3>Log Message</h3>
<pre>Update WPT OffscreenCanvas tests to include manually written tests
https://bugs.webkit.org/show_bug.cgi?id=215322

Reviewed by Carlos Alberto Lopez Perez.

* web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.html: Added.
* web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker.html: Added.
* web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker.js: Added.
(t_fail.t.step_func):
(t.step):
* web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/w3c-import.log:
* web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/w3c-import.log: Added.
* web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.js: Added.
(getRegularContextForFilter):
(matchImageDataResults):
(createPatternCanvas):
* web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/filter/w3c-import.log: Added.
* web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.js: Added.
(createTestImage):
(test):
(test.draw):
* web-platform-tests/html/canvas/offscreen/manual/image-smoothing/w3c-import.log: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.js: Added.
(t1.step):
(t2.step):
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js: Added.
(test):
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/w3c-import.log: Added.
* web-platform-tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform.html: Added.
* web-platform-tests/html/canvas/offscreen/manual/transformations/w3c-import.log: Added.
* web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.html: Added.
* web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker-expected.txt: Added.
* web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.html: Added.
* web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.js: Added.
(t_fail.t.step_func):
(t.step):
* web-platform-tests/html/canvas/offscreen/path-objects/w3c-import.log:
* web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.html:
* web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js:
(t.step):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenfillandstrokestylesw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenpathobjectsw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreentext2dtextmeasurewidthspacehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreentext2dtextmeasurewidthspaceworkerjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenfillandstrokestyles2dgradientconicexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenfillandstrokestyles2dgradientconichtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenfillandstrokestyles2dgradientconicworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenfillandstrokestyles2dgradientconicworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenfillandstrokestyles2dgradientconicworkerjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker.js</a></li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/</li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/</li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualconverttobloboffscreencanvasconverttoblobexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualconverttobloboffscreencanvasconverttoblobhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualconverttobloboffscreencanvasconverttoblobwexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualconverttobloboffscreencanvasconverttoblobwhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualconverttoblobw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/w3c-import.log</a></li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/</li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualfilteroffscreencanvasfilterexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualfilteroffscreencanvasfilterhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualfilteroffscreencanvasfilterjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualfilteroffscreencanvasfilterwexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualfilteroffscreencanvasfilterwhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualfilterw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/w3c-import.log</a></li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/</li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualimagesmoothingimagesmoothingexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualimagesmoothingimagesmoothinghtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualimagesmoothingimagesmoothingworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualimagesmoothingimagesmoothingworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualimagesmoothingimagesmoothingworkerjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualimagesmoothingw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/w3c-import.log</a></li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/</li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvascommitexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvascommithtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvascommitwexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvascommitwhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasconstructorexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasconstructorhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasconstructorworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasconstructorworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasconstructorworkerjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasgetcontextexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasgetcontexthtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasgetcontextworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasgetcontextworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasgetcontextworkerjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasresizeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasresizehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransfertoimagebitmapexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransfertoimagebitmaphtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransfertoimagebitmapwexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransfertoimagebitmapwhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransfercontroltooffscreenexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransfercontroltooffscreenhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransfercontroltooffscreenwexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransfercontroltooffscreenwhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransferrableexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransferrablehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransferrablewexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransferrablewhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/w3c-import.log</a></li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/transformations/</li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtransformations2dtransformationgetTransformexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtransformations2dtransformationgetTransformhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtransformationsw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/transformations/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenpathobjects2dpathisPointInStrokebasicexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenpathobjects2dpathisPointInStrokebasichtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenpathobjects2dpathisPointInStrokebasicworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenpathobjects2dpathisPointInStrokebasicworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenpathobjects2dpathisPointInStrokebasicworkerjs">trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (265435 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-08-10 17:05:10 UTC (rev 265435)
+++ trunk/LayoutTests/imported/w3c/ChangeLog    2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -1,3 +1,88 @@
</span><ins>+2020-08-10  Chris Lord  <clord@igalia.com>
+
+        Update WPT OffscreenCanvas tests to include manually written tests
+        https://bugs.webkit.org/show_bug.cgi?id=215322
+
+        Reviewed by Carlos Alberto Lopez Perez.
+
+        * web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.html: Added.
+        * web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker.html: Added.
+        * web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker.js: Added.
+        (t_fail.t.step_func):
+        (t.step):
+        * web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/w3c-import.log:
+        * web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/w3c-import.log: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.js: Added.
+        (getRegularContextForFilter):
+        (matchImageDataResults):
+        (createPatternCanvas):
+        * web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/filter/w3c-import.log: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.js: Added.
+        (createTestImage):
+        (test):
+        (test.draw):
+        * web-platform-tests/html/canvas/offscreen/manual/image-smoothing/w3c-import.log: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.js: Added.
+        (t1.step):
+        (t2.step):
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js: Added.
+        (test):
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/w3c-import.log: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform.html: Added.
+        * web-platform-tests/html/canvas/offscreen/manual/transformations/w3c-import.log: Added.
+        * web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.html: Added.
+        * web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker-expected.txt: Added.
+        * web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.html: Added.
+        * web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.js: Added.
+        (t_fail.t.step_func):
+        (t.step):
+        * web-platform-tests/html/canvas/offscreen/path-objects/w3c-import.log:
+        * web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.html:
+        * web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js:
+        (t.step):
+
</ins><span class="cx"> 2020-08-10  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rebaseline imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam.html.
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenfillandstrokestyles2dgradientconicexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic-expected.txt                            (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic-expected.txt       2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+2d.gradient.conic
+
+Conic gradient function exists
+
+
+FAIL Conic gradient function exists ctx.createConicGradient is not a function. (In 'ctx.createConicGradient(0, 0, 25)', 'ctx.createConicGradient' is undefined)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenfillandstrokestyles2dgradientconichtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.html                            (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.html       2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.gradient.conic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+
+<h1>2d.gradient.conic</h1>
+<p class="desc">Conic gradient function exists</p>
+
+
+<script>
+var t = async_test("Conic gradient function exists");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+    throw reason;
+});
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+const g = ctx.createConicGradient(0, 0, 25);
+g.addColorStop(0, "#0f0");
+g.addColorStop(0.5, "#0f0");
+g.addColorStop(0.5, "#f00");
+g.addColorStop(1, "#f00");
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 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.done();
+
+});
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenfillandstrokestyles2dgradientconicworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker-expected.txt                             (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker-expected.txt        2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+FAIL Conic gradient function exists ctx.createConicGradient is not a function. (In 'ctx.createConicGradient(0, 0, 25)', 'ctx.createConicGradient' is undefined)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenfillandstrokestyles2dgradientconicworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker.html                             (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker.html        2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenfillandstrokestyles2dgradientconicworkerjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker.js (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker.js                               (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker.js  2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.gradient.conic
+// Description:Conic gradient function exists
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/html/canvas/resources/canvas-tests.js");
+
+var t = async_test("Conic gradient function exists");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+    throw reason;
+});
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+const g = ctx.createConicGradient(0, 0, 25);
+g.addColorStop(0, "#0f0");
+g.addColorStop(0.5, "#0f0");
+g.addColorStop(0.5, "#f00");
+g.addColorStop(1, "#f00");
+ctx.fillStyle = g;
+ctx.fillRect(0, 0, 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.done();
+
+});
+done();
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenfillandstrokestylesw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/w3c-import.log (265435 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/w3c-import.log    2020-08-10 17:05:10 UTC (rev 265435)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/w3c-import.log       2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -270,6 +270,8 @@
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.worker.js
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.worker.js
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.html
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker.js
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.worker.js
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.html
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualconverttobloboffscreencanvasconverttoblobexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob-expected.txt                              (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob-expected.txt 2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+
+PASS Test that convertToBlob with default type produces correct result 
+PASS Test that convertToBlob with png produces correct result 
+PASS Test that convertToBlob with jpge produces correct result 
+PASS Test that convertToBlob with webp produces correct result 
+PASS Test that call convertToBlob on a detached OffscreenCanvas throws exception 
+PASS Test that call convertToBlob on a OffscreenCanvas with size 0 throws exception 
+PASS Test that call convertToBlob on a OffscreenCanvas with tainted origin throws exception 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualconverttobloboffscreencanvasconverttoblobhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.html                              (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.html 2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,165 @@
</span><ins>+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+<link rel="help" href="https://html.spec.whatwg.org/#dom-offscreencanvas-converttoblob">
+<script id="myWorker" type="text/worker">
+self.onmessage = function(e) {
+};
+</script>
+<script>
+function makeWorker(script)
+{
+    var blob = new Blob([script]);
+    return new Worker(URL.createObjectURL(blob));
+}
+
+function drawCanvas(ctx)
+{
+    ctx.fillStyle = "red";
+    ctx.fillRect(0, 0, 5, 5);
+    ctx.fillStyle = "green";
+    ctx.fillRect(5, 0, 5, 5);
+    ctx.fillStyle = "blue";
+    ctx.fillRect(0, 5, 5, 5);
+    ctx.fillStyle = "black";
+    ctx.fillRect(5, 5, 5, 5);
+}
+
+function compareImages(image1, image2)
+{
+    var canvas1 = document.createElement('canvas');
+    var canvas2 = document.createElement('canvas');
+    canvas1.width = canvas1.height = 10;
+    canvas2.width = canvas2.height = 10;
+    var ctx1 = canvas1.getContext('2d');
+    var ctx2 = canvas1.getContext('2d');
+    ctx1.drawImage(image1, 0, 0);
+    ctx2.drawImage(image2, 0, 0);
+    var data1 = ctx1.getImageData(0, 0, 10, 10).data;
+    var data2 = ctx2.getImageData(0, 0, 10, 10).data;
+    assert_equals(data1.length, data2.length);
+    var imageMatched = true;
+    for (var i = 0; i < data1.length; i++) {
+        if (data1[i] != data2[i]) {
+            imageMatched = false;
+            break;
+        }
+    }
+    assert_true(imageMatched);
+}
+
+function testConvertToBlob(t, typeVal, qualityVal) {
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    var oCtx = offscreenCanvas.getContext('2d');
+    drawCanvas(oCtx);
+    var canvas = document.createElement('canvas');
+    var ctx = canvas.getContext('2d');
+    drawCanvas(ctx);
+    var imageLoadedCounter = 0;
+
+    var image1 = new Image();
+    var image2 = new Image();
+    var promise;
+    if (typeVal == "empty" && qualityVal == "empty")
+        promise = offscreenCanvas.convertToBlob();
+    else if (typeVal == "empty" && qualityVal != "empty")
+        promise = offscreenCanvas.convertToBlob({quality: qualityVal});
+    else if (typeVal != "empty" && qualityVal == "empty")
+        promise = offscreenCanvas.convertToBlob({type: typeVal});
+    else
+        promise = offscreenCanvas.convertToBlob({type: typeVal, quality: qualityVal});
+    promise.then(function(blob2) {
+        image2.src = URL.createObjectURL(blob2);
+        if (typeVal == "empty" && qualityVal == "empty") {
+            canvas.toBlob(function(blob1) {
+                image1.src = URL.createObjectURL(blob1);
+            });
+        } else if (typeVal == "empty" && qualityVal != "empty") {
+            canvas.toBlob(function(blob1) {
+                image1.src = URL.createObjectURL(blob1);
+            }, "image/png", qualityVal);
+        } else if (typeVal != "empty" && qualityVal == "empty") {
+            canvas.toBlob(function(blob1) {
+                image1.src = URL.createObjectURL(blob1);
+            }, typeVal, 1.0);
+        } else {
+            canvas.toBlob(function(blob1) {
+                image1.src = URL.createObjectURL(blob1);
+            }, typeVal, qualityVal);
+        }
+        image1.onload = image2.onload = t.step_func(function() {
+            imageLoadedCounter++;
+            if (imageLoadedCounter == 2) {
+                compareImages(image1, image2);
+                t.done();
+            }
+        });
+    });
+}
+
+async_test(function(t) {
+    testConvertToBlob(t, "empty", "empty");
+    testConvertToBlob(t, "empty", 1.0);
+    testConvertToBlob(t, "empty", 0.2);
+}, "Test that convertToBlob with default type produces correct result");
+
+async_test(function(t) {
+    testConvertToBlob(t, "image/png", "empty");
+    testConvertToBlob(t, "image/png", 1.0);
+    testConvertToBlob(t, "image/png", 0.2);
+}, "Test that convertToBlob with png produces correct result");
+
+async_test(function(t) {
+    testConvertToBlob(t, "image/jpeg", "empty");
+    testConvertToBlob(t, "image/jpeg", 1.0);
+    testConvertToBlob(t, "image/jpeg", 0.2);
+}, "Test that convertToBlob with jpge produces correct result");
+
+async_test(function(t) {
+    testConvertToBlob(t, "image/webp", "empty");
+    testConvertToBlob(t, "image/webp", 1.0);
+    testConvertToBlob(t, "image/webp", 0.2);
+}, "Test that convertToBlob with webp produces correct result");
+
+async_test(function(t) {
+    var worker = makeWorker(document.getElementById("myWorker").textContent);
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    worker.postMessage({offscreenCanvas}, [offscreenCanvas]);
+    offscreenCanvas.convertToBlob().then(t.step_func_done(function() {
+        assert_false("convertToBlob didn't throw, but should be");
+    }), t.step_func_done(function(e) {
+        assert_true(e instanceof DOMException);
+        assert_equals(e.name, "InvalidStateError");
+    }));
+}, "Test that call convertToBlob on a detached OffscreenCanvas throws exception");
+
+async_test(function(t) {
+    var offscreenCanvas = new OffscreenCanvas(0, 0);
+    offscreenCanvas.convertToBlob().then(t.step_func_done(function() {
+        assert_false("convertToBlob didn't throw, but should be");
+    }), t.step_func_done(function(e) {
+        assert_true(e instanceof DOMException);
+        assert_equals(e.name, "IndexSizeError");
+    }));
+}, "Test that call convertToBlob on a OffscreenCanvas with size 0 throws exception");
+
+async_test(function(t) {
+    var img = new Image();
+    img.src = "/images/green.png";
+    img.crossOrigin = "anonymous";
+    img.onload = t.step_func_done(() => {
+        var offscreenCanvas = new OffscreenCanvas(10, 10);
+        var ctx = offscreenCanvas.getContext("2d");
+        ctx.drawImage(img, 0, 0);
+        offscreenCanvas.convertToBlob().then(t.step_func_done(function() {
+            assert_false("convertToBlob didn't throw, but should");
+        }), t.step_func_done(function(e) {
+            assert_true(e instanceof DOMException);
+            assert_equals(e.name, "SecurityError");
+        }));
+    });
+}, "Test that call convertToBlob on a OffscreenCanvas with tainted origin throws exception");
+
+</script>
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualconverttobloboffscreencanvasconverttoblobwexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w-expected.txt                            (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w-expected.txt       2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+
+PASS Test that convertToBlob with default arguments produces correct result in a worker 
+PASS Test that convertToBlob with default type/1.0 quality produces correct result in a worker 
+PASS Test that convertToBlob with default type/0.2 quality produces correct result in a worker 
+PASS Test that convertToBlob with png/default quality produces correct result in a worker 
+PASS Test that convertToBlob with png/1.0 quality produces correct result in a worker 
+PASS Test that convertToBlob with png/0.2 quality produces correct result in a worker 
+PASS Test that convertToBlob with jpeg/default quality produces correct result in a worker 
+PASS Test that convertToBlob with jpeg/1.0 quality produces correct result in a worker 
+PASS Test that convertToBlob with jpeg/0.2 quality produces correct result in a worker 
+PASS Test that convertToBlob with webp/default quality produces correct result in a worker 
+PASS Test that convertToBlob with webp/1.0 quality produces correct result in a worker 
+PASS Test that convertToBlob with webp/0.2 quality produces correct result in a worker 
+PASS Test that call convertToBlob on a detached OffscreenCanvas throws exception in a worker 
+PASS Test that call convertToBlob on a OffscreenCanvas with size 0 throws exception in a worker 
+PASS Test that call convertToBlob on a OffscreenCanvas with tainted origin throws exception in a worker 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualconverttobloboffscreencanvasconverttoblobwhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w.html                            (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w.html       2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,337 @@
</span><ins>+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+<link rel="help" href="https://html.spec.whatwg.org/#dom-offscreencanvas-converttoblob">
+<script id="myWorker" type="text/worker">
+function drawCanvas(ctx)
+{
+    ctx.fillStyle = "red";
+    ctx.fillRect(0, 0, 5, 5);
+    ctx.fillStyle = "green";
+    ctx.fillRect(5, 0, 5, 5);
+    ctx.fillStyle = "blue";
+    ctx.fillRect(0, 5, 5, 5);
+    ctx.fillStyle = "black";
+    ctx.fillRect(5, 5, 5, 5);
+}
+
+function testConvertToBlob(typeVal, qualityVal) {
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    var oCtx = offscreenCanvas.getContext('2d');
+    drawCanvas(oCtx);
+
+    var promise;
+    if (typeVal == "empty" && qualityVal == "empty")
+        promise = offscreenCanvas.convertToBlob();
+    else if (typeVal == "empty" && qualityVal != "empty")
+        promise = offscreenCanvas.convertToBlob({quality: qualityVal});
+    else if (typeVal != "empty" && qualityVal == "empty")
+        promise = offscreenCanvas.convertToBlob({type: typeVal});
+    else
+        promise = offscreenCanvas.convertToBlob({type: typeVal, quality: qualityVal});
+    promise.then(function(blob) {
+        self.postMessage(blob);
+    });
+}
+
+function testConvertToBlobException1()
+{
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    self.postMessage({offscreenCanvas}, [offscreenCanvas]);
+    offscreenCanvas.convertToBlob().then(function() {
+        self.postMessage(false);
+    }, function(e) {
+        self.postMessage(e instanceof DOMException && e.name == "InvalidStateError");
+    });
+}
+
+function testConvertToBlobException2()
+{
+    var offscreenCanvas = new OffscreenCanvas(0, 0);
+    offscreenCanvas.convertToBlob().then(function() {
+        self.postMessage(false);
+    }, function(e) {
+        self.postMessage(e instanceof DOMException && e.name == "IndexSizeError");
+    });
+}
+
+function testConvertToBlobException3(bitmap)
+{
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    var ctx = offscreenCanvas.getContext("2d");
+    ctx.drawImage(bitmap, 0, 0);
+    offscreenCanvas.convertToBlob().then(function() {
+        self.postMessage(false);
+    }, function(e) {
+        self.postMessage(e instanceof DOMException && e.name == "SecurityError");
+    });
+}
+
+self.onmessage = function(e) {
+    if (e.data instanceof ImageBitmap) {
+        testConvertToBlobException3(e.data);
+        return;
+    }
+
+    switch(e.data) {
+        case 'test1':
+            testConvertToBlob("empty", "empty");
+            break;
+        case 'test2':
+            testConvertToBlob("empty", 1.0);
+            break;
+        case 'test3':
+            testConvertToBlob("empty", 0.2);
+            break;
+        case 'test4':
+            testConvertToBlob("image/png", "empty");
+            break;
+        case 'test5':
+            testConvertToBlob("image/png", 1.0);
+            break;
+        case 'test6':
+            testConvertToBlob("image/png", 0.2);
+            break;
+        case 'test7':
+            testConvertToBlob("image/jpeg", "empty");
+            break;
+        case 'test8':
+            testConvertToBlob("image/jpeg", 1.0);
+            break;
+        case 'test9':
+            testConvertToBlob("image/jpeg", 0.2);
+            break;
+        case 'test10':
+            testConvertToBlob("image/webp", "empty");
+            break;
+        case 'test11':
+            testConvertToBlob("image/webp", 1.0);
+            break;
+        case 'test12':
+            testConvertToBlob("image/webp", 0.2);
+            break;
+        case 'test13':
+            testConvertToBlobException1();
+            break;
+        case 'test14':
+            testConvertToBlobException2();
+            break;
+    }
+};
+
+</script>
+
+<script>
+function makeWorker(test) {
+    var blob = new Blob([document.getElementById("myWorker").textContent]);
+    var worker = new Worker(URL.createObjectURL(blob));
+    worker.onerror = test.unreached_func("error");
+    return worker;
+}
+
+function drawCanvas(ctx)
+{
+    ctx.fillStyle = "red";
+    ctx.fillRect(0, 0, 5, 5);
+    ctx.fillStyle = "green";
+    ctx.fillRect(5, 0, 5, 5);
+    ctx.fillStyle = "blue";
+    ctx.fillRect(0, 5, 5, 5);
+    ctx.fillStyle = "black";
+    ctx.fillRect(5, 5, 5, 5);
+}
+
+function compareImages(image1, image2)
+{
+    var canvas1 = document.createElement('canvas');
+    var canvas2 = document.createElement('canvas');
+    canvas1.width = canvas1.height = 10;
+    canvas2.width = canvas2.height = 10;
+    var ctx1 = canvas1.getContext('2d');
+    var ctx2 = canvas1.getContext('2d');
+    ctx1.drawImage(image1, 0, 0);
+    ctx2.drawImage(image2, 0, 0);
+    var data1 = ctx1.getImageData(0, 0, 10, 10).data;
+    var data2 = ctx2.getImageData(0, 0, 10, 10).data;
+    assert_equals(data1.length, data2.length);
+    var imageMatched = true;
+    for (var i = 0; i < data1.length; i++) {
+        if (data1[i] != data2[i]) {
+            imageMatched = false;
+            break;
+        }
+    }
+    assert_true(imageMatched);
+}
+
+function compareWithToBlob(t, typeVal, qualityVal, blob2)
+{
+    var image1 = new Image();
+    var image2 = new Image();
+    var canvas = document.createElement('canvas');
+    var ctx = canvas.getContext('2d');
+    drawCanvas(ctx);
+    var imageLoadedCounter = 0;
+
+    if (typeVal == "empty" && qualityVal == "empty") {
+        canvas.toBlob(function(blob1) {
+            image1.src = URL.createObjectURL(blob1);
+        });
+    } else if (typeVal == "empty" && qualityVal != "empty") {
+        canvas.toBlob(function(blob1) {
+            image1.src = URL.createObjectURL(blob1);
+        }, "image/png", qualityVal);
+    } else if (typeVal != "empty" && qualityVal == "empty") {
+        canvas.toBlob(function(blob1) {
+            image1.src = URL.createObjectURL(blob1);
+        }, typeVal, 1.0);
+    } else {
+        canvas.toBlob(function(blob1) {
+            image1.src = URL.createObjectURL(blob1);
+        }, typeVal, qualityVal);
+    }
+    image2.src = URL.createObjectURL(blob2);
+    image1.onload = image2.onload = t.step_func(function() {
+        imageLoadedCounter++;
+        if (imageLoadedCounter == 2) {
+            compareImages(image1, image2);
+            t.done();
+        }
+    });
+}
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func(function(msg) {
+        compareWithToBlob(t, "empty", "empty", msg.data);
+    }));
+    worker.postMessage('test1');
+}, "Test that convertToBlob with default arguments produces correct result in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func(function(msg) {
+        compareWithToBlob(t, "empty", 1.0, msg.data);
+    }));
+    worker.postMessage('test2');
+}, "Test that convertToBlob with default type/1.0 quality produces correct result in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func(function(msg) {
+        compareWithToBlob(t, "empty", 0.2, msg.data);
+    }));
+    worker.postMessage('test3');
+}, "Test that convertToBlob with default type/0.2 quality produces correct result in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func(function(msg) {
+        compareWithToBlob(t, "image/png", "empty", msg.data);
+    }));
+    worker.postMessage('test4');
+}, "Test that convertToBlob with png/default quality produces correct result in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func(function(msg) {
+        compareWithToBlob(t, "image/png", 1.0, msg.data);
+    }));
+    worker.postMessage('test5');
+}, "Test that convertToBlob with png/1.0 quality produces correct result in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func(function(msg) {
+        compareWithToBlob(t, "image/png", 0.2, msg.data);
+    }));
+    worker.postMessage('test6');
+}, "Test that convertToBlob with png/0.2 quality produces correct result in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func(function(msg) {
+        compareWithToBlob(t, "image/jpeg", "empty", msg.data);
+    }));
+    worker.postMessage('test7');
+}, "Test that convertToBlob with jpeg/default quality produces correct result in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func(function(msg) {
+        compareWithToBlob(t, "image/jpeg", 1.0, msg.data);
+    }));
+    worker.postMessage('test8');
+}, "Test that convertToBlob with jpeg/1.0 quality produces correct result in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func(function(msg) {
+        compareWithToBlob(t, "image/jpeg", 0.2, msg.data);
+    }));
+    worker.postMessage('test9');
+}, "Test that convertToBlob with jpeg/0.2 quality produces correct result in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func(function(msg) {
+        compareWithToBlob(t, "image/webp", "empty", msg.data);
+    }));
+    worker.postMessage('test10');
+}, "Test that convertToBlob with webp/default quality produces correct result in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func(function(msg) {
+        compareWithToBlob(t, "image/webp", 1.0, msg.data);
+    }));
+    worker.postMessage('test11');
+}, "Test that convertToBlob with webp/1.0 quality produces correct result in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func(function(msg) {
+        compareWithToBlob(t, "image/webp", 0.2, msg.data);
+    }));
+    worker.postMessage('test12');
+}, "Test that convertToBlob with webp/0.2 quality produces correct result in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        if (msg.data instanceof Object)
+            return;
+        assert_true(msg.data);
+        t.done();
+    }));
+    worker.postMessage('test13');
+}, "Test that call convertToBlob on a detached OffscreenCanvas throws exception in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        assert_true(msg.data);
+        t.done();
+    }));
+    worker.postMessage('test14');
+}, "Test that call convertToBlob on a OffscreenCanvas with size 0 throws exception in a worker");
+
+async_test(function(t) {
+    var img = new Image();
+    img.src = "/images/green.png";
+    img.crossOrigin = "anonymous";
+    img.onload = t.step_func_done(() => {
+        createImageBitmap(img).then(t.step_func_done(bitmap => {
+            var worker = makeWorker(t);
+            worker.addEventListener('message', t.step_func_done(function(msg) {
+                assert_true(msg.data);
+                t.done();
+            }));
+            worker.postMessage(bitmap);
+        }));
+    });
+}, "Test that call convertToBlob on a OffscreenCanvas with tainted origin throws exception in a worker");
+
+</script>
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualconverttoblobw3cimportlog"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/w3c-import.log (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/w3c-import.log                            (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/w3c-import.log       2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the WPT github:
+       https://github.com/web-platform-tests/wpt
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.html
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w.html
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualfilteroffscreencanvasfilterexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter-expected.txt   2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS none 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualfilteroffscreencanvasfilterhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.html   2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="offscreencanvas.filter.js"></script>
+<script>
+var patternCanvas = createPatternCanvas();
+
+var getOffscreenContextForFilter = function(filter, pattern) {
+  var oc = new OffscreenCanvas(80, 80);
+  var offCtx = oc.getContext('2d');
+  offCtx.filter = filter;
+  offCtx.drawImage(pattern, 5, 5);
+  offCtx.drawImage(pattern, 25, 25);
+  offCtx.drawImage(pattern, 45, 45);
+  return offCtx;
+};
+
+var testFilter = function(filter) {
+  var offCtx = getOffscreenContextForFilter(filter, patternCanvas);
+  var ctx = getRegularContextForFilter(filter, patternCanvas);
+  var offImageData = offCtx.getImageData(0, 0, 80, 80).data;
+  var imageData = ctx.getImageData(0, 0, 80, 80).data;
+  matchImageDataResults(offImageData, imageData, filter);
+};
+
+generate_tests(testFilter, [filters]);
+
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualfilteroffscreencanvasfilterjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.js (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.js                          (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.js     2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+var getRegularContextForFilter = function(filter, pattern) {
+  var c = document.createElement("canvas");
+  c.width = c.height = 80;
+  var ctx = c.getContext('2d');
+  ctx.filter = filter;
+  ctx.drawImage(pattern, 5, 5);
+  ctx.drawImage(pattern, 25, 25);
+  ctx.drawImage(pattern, 45, 45);
+  return ctx;
+};
+
+var matchImageDataResults = function(offscreenImage, regularImage, filter) {
+  assert_array_equals(offscreenImage, regularImage,
+      "The image data generated by filter " +
+      filter +
+      " should be the same for both OffscreenCanvas and regular canvas");
+};
+
+var createPatternCanvas = function() {
+  var patternCanvas = document.createElement('canvas');
+  patternCanvas.width = 20;
+  patternCanvas.height = 20;
+  var patternCtx = patternCanvas.getContext('2d');
+  patternCtx.fillStyle = '#A00';
+  patternCtx.fillRect(0, 0, 10, 10);
+  patternCtx.fillStyle = '#0A0';
+  patternCtx.fillRect(10, 0, 10, 10);
+  patternCtx.fillStyle = '#00A';
+  patternCtx.fillRect(0, 10, 10, 10);
+  patternCtx.fillStyle = "#AA0";
+  patternCtx.fillRect(10, 10, 10, 10);
+  return patternCanvas;
+};
+
+var filters =    [ "none"          ,
+      "blur(10px)"                 ,
+      "brightness(40%)"            ,
+      "contrast(20%)"              ,
+      "drop-shadow(0 0 5px green)" ,
+      "grayscale(100%)"            ,
+      "invert(100%)"               ,
+      "opacity(50%)"               ,
+      "saturate(20%)"              ,
+      "sepia(100%)"                ,
+      "sepia(1) hue-rotate(200deg)",
+      "url(#url)"                  ];
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualfilteroffscreencanvasfilterwexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w-expected.txt                              (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w-expected.txt 2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+FAIL: Timed out waiting for notifyDone to be called
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualfilteroffscreencanvasfilterwhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w.html                              (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w.html 2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="offscreencanvas.filter.js"></script>
+<script id='myWorker' type='text/worker'>
+self.onmessage = function(e) {
+  var getOffscreenCanvasForFilter = function(filter, pattern) {
+    var oc = new OffscreenCanvas(80, 80);
+    var offCtx = oc.getContext('2d');
+    offCtx.filter = filter;
+    offCtx.drawImage(pattern, 5, 5);
+    offCtx.drawImage(pattern, 25, 25);
+    offCtx.drawImage(pattern, 45, 45);
+    return oc;
+  };
+
+  var filters = e.data.filters;
+  var pattern = e.data.pattern;
+  var ret = [];
+  for (var i = 0; i < filters.length; i++) {
+     var oc = getOffscreenCanvasForFilter(filters[i], pattern);
+     var imageBitmap = oc.transferToImageBitmap();
+     ret.push(imageBitmap);
+  }
+  self.postMessage(ret, ret);
+};
+</script>
+<script>
+var patternCanvas = createPatternCanvas();
+
+// Build a list of image data on regular canvas with different filters
+var listCanvasImageData = [];
+for (var j = 0; j < filters.length; j++) {
+  var ctx = getRegularContextForFilter(filters[j], patternCanvas);
+  listCanvasImageData.push(ctx.getImageData(0, 0, 80, 80).data);
+}
+
+function consumeImageBitmap(patternImage) {
+  async_test(t => {
+    var blob = new Blob([document.getElementById('myWorker').textContent]);
+    var worker = new Worker(URL.createObjectURL(blob));
+    worker.addEventListener('message', msg => {
+      for (var i = 0; i < msg.data.length; ++i) {
+        var outputCtx = document.createElement("canvas").getContext('2d');
+        outputCtx.drawImage(msg.data[i], 0, 0, 80, 80);
+        matchImageDataResults(outputCtx.getImageData(0, 0, 80, 80).data, listCanvasImageData[i], filters[i]);
+      }
+      t.done();
+    });
+  worker.postMessage({filters: filters, pattern: patternImage}, [patternImage]);
+  });
+}
+
+createImageBitmap(patternCanvas).then(consumeImageBitmap);
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualfilterw3cimportlog"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/w3c-import.log (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/w3c-import.log                             (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/w3c-import.log        2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the WPT github:
+       https://github.com/web-platform-tests/wpt
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.html
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.js
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w.html
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualimagesmoothingimagesmoothingexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing-expected.txt                              (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing-expected.txt 2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+
+PASS When the context is created, imageSmoothingEnabled must be set to true. 
+PASS On getting imageSmoothingEnabled, the user agent must return the last value it was set to. 
+PASS Test that image smoothing is actually on by default. 
+PASS Test that image smoothing works when imageSmoothingEnabled is set to true 
+PASS Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with drawImage(). 
+FAIL Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with fillRect and createPattern(). assert_array_equals: expected property 0 to be 0 but got 176 (expected array [0, 255, 0, 255] got object "176,78,0,255")
+FAIL Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with fill() and createPattern(). assert_array_equals: expected property 0 to be 0 but got 176 (expected array [0, 255, 0, 255] got object "176,78,0,255")
+FAIL Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with stroke() and createPattern(). assert_array_equals: expected property 0 to be 0 but got 176 (expected array [0, 255, 0, 255] got object "176,78,0,255")
+PASS Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) still works after repaints. 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualimagesmoothingimagesmoothinghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.html                              (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.html 2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,128 @@
</span><ins>+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>OffscreenCanvasRenderingContext2D imageSmoothingEnabled test</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel="help" href="https://html.spec.whatwg.org/#the-offscreen-2d-rendering-context">
+<script>
+function createTestImage() {
+  var image = new OffscreenCanvas(100, 50);
+  var imgctx = image.getContext('2d');
+  imgctx.fillStyle = "#F00";
+  imgctx.fillRect(0, 0, 2, 2);
+  imgctx.fillStyle = "#0F0";
+  imgctx.fillRect(0, 0, 1, 1);
+  return image;
+}
+
+test(function() {
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+  assert_true(ctx.imageSmoothingEnabled);
+}, "When the context is created, imageSmoothingEnabled must be set to true.");
+
+test(function() {
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+  ctx.imageSmoothingEnabled = false;
+  assert_false(ctx.imageSmoothingEnabled);
+}, "On getting imageSmoothingEnabled, the user agent must return the last value it was set to.");
+
+test(function() {
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+  var image = createTestImage();
+  ctx.scale(10, 10);
+  ctx.drawImage(image, 0, 0);
+  var pixels = ctx.getImageData(9, 9, 1, 1).data;
+  assert_not_equals(pixels[0], 0);
+  assert_not_equals(pixels[1], 255);
+}, "Test that image smoothing is actually on by default.");
+
+test(function() {
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+  ctx.imageSmoothingEnabled = true;
+  var image = createTestImage();
+  ctx.scale(10, 10);
+  ctx.drawImage(image, 0, 0);
+  var pixels = ctx.getImageData(9, 9, 1, 1).data;
+  assert_not_equals(pixels[0], 0);
+  assert_not_equals(pixels[1], 255);
+}, "Test that image smoothing works when imageSmoothingEnabled is set to true");
+
+test(function() {
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+  var image = createTestImage();
+  ctx.imageSmoothingEnabled = false;
+  ctx.scale(10, 10);
+  ctx.drawImage(image, 0, 0);
+  var pixels = ctx.getImageData(9, 9, 1, 1).data;
+  assert_array_equals(pixels, [0, 255, 0, 255]);
+}, "Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with drawImage().");
+
+test(function() {
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+  var image = createTestImage();
+  ctx.imageSmoothingEnabled = false;
+  ctx.scale(10, 10);
+  ctx.fillStyle = ctx.createPattern(image, 'repeat');
+  ctx.fillRect(0, 0, 10, 10);
+  var pixels = ctx.getImageData(9, 9, 1, 1).data;
+  assert_array_equals(pixels, [0, 255, 0, 255]);
+}, "Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with fillRect and createPattern().");
+
+test(function() {
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+  var image = createTestImage();
+  ctx.imageSmoothingEnabled = false;
+  ctx.fillStyle = ctx.createPattern(image, 'repeat');
+  ctx.scale(10, 10);
+  ctx.rect(0, 0, 10, 10);
+  ctx.fill();
+  var pixels = ctx.getImageData(9, 9, 1, 1).data;
+  assert_array_equals(pixels, [0, 255, 0, 255]);
+}, "Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with fill() and createPattern().");
+
+test(function() {
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+  var image = createTestImage();
+  ctx.strokeStyle = ctx.createPattern(image, 'repeat');
+  ctx.lineWidth = 5;
+  ctx.imageSmoothingEnabled = false;
+  ctx.scale(10, 10);
+  ctx.beginPath();
+  ctx.moveTo(0, 0);
+  ctx.lineTo(10, 10);
+  ctx.stroke();
+  var pixels = ctx.getImageData(9, 9, 1, 1).data;
+  assert_array_equals(pixels, [0, 255, 0, 255]);
+}, "Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with stroke() and createPattern().");
+
+test(function() {
+  var repaints = 5;
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+
+  function draw() {
+    ctx.clearRect(0, 0, 10, 10);
+    ctx.setTransform(1, 0, 0, 1, 0, 0);
+    var image = createTestImage();
+    ctx.imageSmoothingEnabled = false;
+    ctx.scale(10, 10);
+    ctx.drawImage(image, 0, 0);
+    var pixels = ctx.getImageData(9, 9, 1, 1).data;
+    assert_array_equals(pixels, [0, 255, 0, 255]);
+  }
+
+  while (repaints > 0) {
+    draw();
+    repaints = repaints - 1;
+  }
+
+}, "Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) still works after repaints.");
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualimagesmoothingimagesmoothingworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker-expected.txt                               (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker-expected.txt  2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+
+PASS When the context is created, imageSmoothingEnabled must be set to true. 
+PASS On getting imageSmoothingEnabled, the user agent must return the last value it was set to. 
+PASS Test that image smoothing is actually on by default. 
+PASS Test that image smoothing works when imageSmoothingEnabled is set to true 
+PASS Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with drawImage(). 
+FAIL Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with fillRect and createPattern(). assert_array_equals: expected property 0 to be 0 but got 176 (expected array [0, 255, 0, 255] got object "176,78,0,255")
+FAIL Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with fill() and createPattern(). assert_array_equals: expected property 0 to be 0 but got 176 (expected array [0, 255, 0, 255] got object "176,78,0,255")
+FAIL Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with stroke() and createPattern(). assert_array_equals: expected property 0 to be 0 but got 176 (expected array [0, 255, 0, 255] got object "176,78,0,255")
+PASS Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) still works after repaints. 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualimagesmoothingimagesmoothingworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.html                               (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.html  2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualimagesmoothingimagesmoothingworkerjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.js (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.js                         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.js    2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,126 @@
</span><ins>+// spec link: https://html.spec.whatwg.org/#the-offscreen-2d-rendering-context
+
+importScripts("/resources/testharness.js");
+
+function createTestImage() {
+  var image = new OffscreenCanvas(100, 50);
+  var imgctx = image.getContext('2d');
+  imgctx.fillStyle = "#F00";
+  imgctx.fillRect(0, 0, 2, 2);
+  imgctx.fillStyle = "#0F0";
+  imgctx.fillRect(0, 0, 1, 1);
+  return image;
+}
+
+test(function() {
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+  assert_true(ctx.imageSmoothingEnabled);
+}, "When the context is created, imageSmoothingEnabled must be set to true.");
+
+test(function() {
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+  ctx.imageSmoothingEnabled = false;
+  assert_false(ctx.imageSmoothingEnabled);
+}, "On getting imageSmoothingEnabled, the user agent must return the last value it was set to.");
+
+test(function() {
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+  var image = createTestImage();
+  ctx.scale(10, 10);
+  ctx.drawImage(image, 0, 0);
+  var pixels = ctx.getImageData(9, 9, 1, 1).data;
+  assert_not_equals(pixels[0], 0);
+  assert_not_equals(pixels[1], 255);
+}, "Test that image smoothing is actually on by default.");
+
+test(function() {
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+  ctx.imageSmoothingEnabled = true;
+  var image = createTestImage();
+  ctx.scale(10, 10);
+  ctx.drawImage(image, 0, 0);
+  var pixels = ctx.getImageData(9, 9, 1, 1).data;
+  assert_not_equals(pixels[0], 0);
+  assert_not_equals(pixels[1], 255);
+}, "Test that image smoothing works when imageSmoothingEnabled is set to true");
+
+test(function() {
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+  var image = createTestImage();
+  ctx.imageSmoothingEnabled = false;
+  ctx.scale(10, 10);
+  ctx.drawImage(image, 0, 0);
+  var pixels = ctx.getImageData(9, 9, 1, 1).data;
+  assert_array_equals(pixels, [0, 255, 0, 255]);
+}, "Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with drawImage().");
+
+test(function() {
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+  var image = createTestImage();
+  ctx.imageSmoothingEnabled = false;
+  ctx.scale(10, 10);
+  ctx.fillStyle = ctx.createPattern(image, 'repeat');
+  ctx.fillRect(0, 0, 10, 10);
+  var pixels = ctx.getImageData(9, 9, 1, 1).data;
+  assert_array_equals(pixels, [0, 255, 0, 255]);
+}, "Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with fillRect and createPattern().");
+
+test(function() {
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+  var image = createTestImage();
+  ctx.imageSmoothingEnabled = false;
+  ctx.fillStyle = ctx.createPattern(image, 'repeat');
+  ctx.scale(10, 10);
+  ctx.rect(0, 0, 10, 10);
+  ctx.fill();
+  var pixels = ctx.getImageData(9, 9, 1, 1).data;
+  assert_array_equals(pixels, [0, 255, 0, 255]);
+}, "Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with fill() and createPattern().");
+
+test(function() {
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+  var image = createTestImage();
+  ctx.strokeStyle = ctx.createPattern(image, 'repeat');
+  ctx.lineWidth = 5;
+  ctx.imageSmoothingEnabled = false;
+  ctx.scale(10, 10);
+  ctx.beginPath();
+  ctx.moveTo(0, 0);
+  ctx.lineTo(10, 10);
+  ctx.stroke();
+  var pixels = ctx.getImageData(9, 9, 1, 1).data;
+  assert_array_equals(pixels, [0, 255, 0, 255]);
+}, "Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) works with stroke() and createPattern().");
+
+test(function() {
+  var repaints = 5;
+  var offscreenCanvas = new OffscreenCanvas(100, 50);
+  var ctx = offscreenCanvas.getContext('2d');
+
+  function draw() {
+    ctx.clearRect(0, 0, 10, 10);
+    ctx.setTransform(1, 0, 0, 1, 0, 0);
+    var image = createTestImage();
+    ctx.imageSmoothingEnabled = false;
+    ctx.scale(10, 10);
+    ctx.drawImage(image, 0, 0);
+    var pixels = ctx.getImageData(9, 9, 1, 1).data;
+    assert_array_equals(pixels, [0, 255, 0, 255]);
+  }
+
+  while (repaints > 0) {
+    draw();
+    repaints = repaints - 1;
+  }
+
+}, "Test that imageSmoothingEnabled = false (nearest-neighbor interpolation) still works after repaints.");
+
+done();
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualimagesmoothingw3cimportlog"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/w3c-import.log (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/w3c-import.log                            (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/w3c-import.log       2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the WPT github:
+       https://github.com/web-platform-tests/wpt
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.html
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.js
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvascommitexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit-expected.txt                          (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit-expected.txt     2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+FAIL Test that calling OffscreenCanvas's commit pushes its contents to its placeholder. placeholder.transferControlToOffscreen is not a function. (In 'placeholder.transferControlToOffscreen()', 'placeholder.transferControlToOffscreen' is undefined)
+FAIL Test that calling commit on an OffscreenCanvas that is not transferred from a HTMLCanvasElement is a noop. ctx.commit is not a function. (In 'ctx.commit()', 'ctx.commit' is undefined)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvascommithtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.html                          (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.html     2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+<link rel="help" href="https://html.spec.whatwg.org/#offscreencontext2d-commit">
+<script>
+
+function verifyPlaceholder(placeholder, expectedR, expectedG, expectedB, expectedA, expectedClrStr)
+{
+    var canvas = document.createElement('canvas');
+    canvas.width = canvas.height = 10;
+    var ctx = canvas.getContext('2d');
+    ctx.drawImage(placeholder, 0, 0);
+    _assertPixel(canvas, 5,5, expectedR, expectedG, expectedB, expectedA, "5,5", expectedClrStr);
+}
+
+test(function() {
+    var placeholder = document.createElement('canvas');
+    placeholder.width = placeholder.height = 10;
+    var offscreenCanvas = placeholder.transferControlToOffscreen();
+    var ctx = offscreenCanvas.getContext('2d');
+    ctx.fillStyle = "#0f0";
+    ctx.fillRect(0, 0, 10, 10);
+    // commit() propagation is taken care of by an async task, which means the
+    // place holder contents should still be transparent black at this moment.
+    verifyPlaceholder(placeholder, 0,0,0,0, "0,0,0,0");
+    // Set timeout acts as a sync barrier to allow commit to propagate
+    setTimeout(function() {
+        verifyPlaceholder(placeholder, 0,255,0,255, "0,255,0,255");
+    }, 0);
+}, "Test that calling OffscreenCanvas's commit pushes its contents to its placeholder.");
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    var ctx = offscreenCanvas.getContext('2d');
+    ctx.fillStyle = "#0f0";
+    ctx.fillRect(0, 0, 10, 10);
+    ctx.commit();
+}, "Test that calling commit on an OffscreenCanvas that is not transferred from a HTMLCanvasElement is a noop.");
+
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvascommitwexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w-expected.txt   2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+FAIL Test that calling OffscreenCanvas's commit pushes its contents to its placeholder. placeholder.transferControlToOffscreen is not a function. (In 'placeholder.transferControlToOffscreen()', 'placeholder.transferControlToOffscreen' is undefined)
+PASS Test that calling commit on an OffscreenCanvas that is not transferred from a HTMLCanvasElement throws an exception in a worker. 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvascommitwhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w.html   2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+<link rel="help" href="https://html.spec.whatwg.org/#offscreencontext2d-commit">
+
+<script id="myWorker" type="text/worker">
+
+function testCommitPushesContents(offscreenCanvas) {
+  try {
+    var ctx = offscreenCanvas.getContext('2d');
+    ctx.fillStyle = "#0f0";
+    ctx.fillRect(0, 0, 10, 10);
+    ctx.commit();
+    return true;
+  } catch(e) {
+    return false;
+  }
+}
+
+function testCommitException() {
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    var ctx = offscreenCanvas.getContext('2d');
+    ctx.fillStyle = "#0f0";
+    ctx.fillRect(0, 0, 10, 10);
+    return true;
+}
+
+self.onmessage = function(e) {
+    switch (e.data.msg) {
+        case 'test1':
+            self.postMessage(testCommitPushesContents(e.data.data));
+            break;
+        case 'test2':
+            self.postMessage(testCommitException());
+            break;
+    }
+};
+
+</script>
+
+<script>
+
+function verifyPlaceholder(placeholder) {
+    var canvas = document.createElement('canvas');
+    canvas.width = canvas.height = 10;
+    var ctx = canvas.getContext('2d');
+    ctx.drawImage(placeholder, 0, 0);
+    _assertPixel(canvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255");
+}
+
+function makeWorker(test) {
+    var blob = new Blob([document.getElementById("myWorker").textContent]);
+    var worker = new Worker(URL.createObjectURL(blob));
+    worker.onerror = test.unreached_func("error");
+    return worker;
+}
+
+async_test(function(t) {
+    var placeholder = document.createElement('canvas');
+    placeholder.width = placeholder.height = 10;
+    var offscreenCanvas = placeholder.transferControlToOffscreen();
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+      assert_true(msg.data);
+      verifyPlaceholder(placeholder);
+    }));
+    worker.postMessage({msg: 'test1', data: offscreenCanvas}, [offscreenCanvas]);
+}, "Test that calling OffscreenCanvas's commit pushes its contents to its placeholder.");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        assert_true(msg.data);
+    }));
+    worker.postMessage({msg: 'test2'});
+}, "Test that calling commit on an OffscreenCanvas that is not transferred from a HTMLCanvasElement throws an exception in a worker.");
+
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasconstructorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor-expected.txt                             (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor-expected.txt        2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS Test that calling OffscreenCanvas's constructor generates correct width and height. 
+PASS Test that OffscreenCanvas constructor handles invalid arguments correctly 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasconstructorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.html                             (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.html        2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+<link rel="help" href="https://html.spec.whatwg.org/#dom-offscreencanvas">
+<script>
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(100, 50);
+    assert_equals(offscreenCanvas.width, 100);
+    assert_equals(offscreenCanvas.height, 50);
+
+    offscreenCanvas.width = 50;
+    offscreenCanvas.height = 100;
+    assert_equals(offscreenCanvas.width, 50);
+    assert_equals(offscreenCanvas.height, 100);
+}, "Test that calling OffscreenCanvas's constructor generates correct width and height.");
+
+test(function() {
+    var offscreenCanvas1 = new OffscreenCanvas(1, 1);
+
+    offscreenCanvas1.width = null;
+    offscreenCanvas1.height = null;
+    assert_equals(offscreenCanvas1.width, 0);
+    assert_equals(offscreenCanvas1.height, 0);
+
+    assert_throws_js(TypeError, function() { new OffscreenCanvas(-1, -1); });
+
+    var offscreenCanvas2 = new OffscreenCanvas(null, null);
+    assert_equals(offscreenCanvas2.width, 0);
+    assert_equals(offscreenCanvas2.height, 0);
+
+    assert_throws_js(TypeError, function() { offscreenCanvas2.width = -1; });
+    assert_throws_js(TypeError, function() { offscreenCanvas2.height = -1; });
+
+    var obj = {Name: "John Doe", Age: 30};
+    assert_throws_js(TypeError, function() { offscreenCanvas2.width = obj; });
+    assert_throws_js(TypeError, function() { offscreenCanvas2.height = obj; });
+    assert_throws_js(TypeError, function() { new OffscreenCanvas(obj, obj); });
+}, "Test that OffscreenCanvas constructor handles invalid arguments correctly");
+
+</script>
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasconstructorworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker-expected.txt                              (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker-expected.txt 2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS Test that calling OffscreenCanvas's constructor generates correct width and height. 
+PASS Test that OffscreenCanvas constructor handles invalid arguments correctly in a worker 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasconstructorworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.html                              (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.html 2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasconstructorworkerjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.js (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.js                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.js   2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+// spec link: https://html.spec.whatwg.org/#dom-offscreencanvas
+
+importScripts("/resources/testharness.js");
+importScripts("/html/canvas/resources/canvas-tests.js");
+
+var t1 = async_test("Test that calling OffscreenCanvas's constructor generates correct width and height.");
+t1.step(function() {
+    var offscreenCanvas = new OffscreenCanvas(100, 50);
+    assert_equals(offscreenCanvas.width, 100);
+    assert_equals(offscreenCanvas.height, 50);
+
+    offscreenCanvas.width = 50;
+    offscreenCanvas.height = 100;
+    assert_equals(offscreenCanvas.width, 50);
+    assert_equals(offscreenCanvas.height, 100);
+    t1.done();
+});
+
+var t2 = async_test("Test that OffscreenCanvas constructor handles invalid arguments correctly in a worker");
+t2.step(function() {
+    var offscreenCanvas1 = new OffscreenCanvas(1, 1);
+
+    offscreenCanvas1.width = null;
+    offscreenCanvas1.height = null;
+    assert_equals(offscreenCanvas1.width, 0);
+    assert_equals(offscreenCanvas1.height, 0);
+
+    assert_throws_js(TypeError, function() { new OffscreenCanvas(-1, -1); });
+
+    var offscreenCanvas2 = new OffscreenCanvas(null, null);
+    assert_equals(offscreenCanvas2.width, 0);
+    assert_equals(offscreenCanvas2.height, 0);
+
+    assert_throws_js(TypeError, function() { offscreenCanvas2.width = -1; });
+    assert_throws_js(TypeError, function() { offscreenCanvas2.height = -1; });
+
+    var obj = {Name: "John Doe", Age: 30};
+    assert_throws_js(TypeError, function() { offscreenCanvas2.width = obj; });
+    assert_throws_js(TypeError, function() { offscreenCanvas2.height = obj; });
+    assert_throws_js(TypeError, function() { new OffscreenCanvas(obj, obj); });
+    t2.done();
+});
+
+done();
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasgetcontextexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext-expected.txt                              (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext-expected.txt 2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+
+PASS Test that getContext with un-supported string throws a TypeError. 
+FAIL Test that getContext with supported string returns correct results Argument 1 ('contextType') to OffscreenCanvas.getContext must be one of: "2d", "webgl"
+FAIL Test that getContext twice with different context type returns null the second time The object is in an invalid state.
+PASS Test that 2dcontext.canvas should return the original OffscreenCanvas 
+PASS Test that webglcontext.canvas should return the original OffscreenCanvas 
+FAIL Test that OffscreenCanvasRenderingContext2D with alpha disabled makes the OffscreenCanvas opaque assert_approx_equals: Green channel of the pixel at (5, 5) expected 127 +/- 2 but got 255
+PASS Test that OffscreenCanvasRenderingContext2D with alpha enabled preserves the alpha 
+PASS Test that 'alpha' context creation attribute is true by default 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasgetcontexthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html                              (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html 2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+<link rel="help" href="https://html.spec.whatwg.org/#dom-offscreencanvas-getcontext">
+<script>
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(1, 1);
+    assert_throws_js(TypeError, function() { offscreenCanvas.getContext('3d'); });
+}, "Test that getContext with un-supported string throws a TypeError.");
+
+test(function() {
+    var offscreenCanvas1 = new OffscreenCanvas(1, 1);
+    var ctx1 = offscreenCanvas1.getContext('2d');
+    assert_true(ctx1 instanceof OffscreenCanvasRenderingContext2D);
+
+    var offscreenCanvas2 = new OffscreenCanvas(1, 1);
+    var ctx2 = offscreenCanvas2.getContext('webgl');
+    assert_true(ctx2 instanceof WebGLRenderingContext);
+
+    var offscreenCanvas3 = new OffscreenCanvas(1, 1);
+    var ctx3 = offscreenCanvas3.getContext('webgl2');
+    assert_true(ctx3 instanceof WebGL2RenderingContext);
+}, "Test that getContext with supported string returns correct results");
+
+test(function() {
+    var offscreenCanvas1 = new OffscreenCanvas(1, 1);
+    var ctx1 = offscreenCanvas1.getContext('2d');
+    var ctx2 = offscreenCanvas1.getContext('webgl');
+    assert_equals(ctx2, null);
+
+    var offscreenCanvas2 = new OffscreenCanvas(1, 1);
+    var ctx3 = offscreenCanvas2.getContext('webgl');
+    var ctx4 = offscreenCanvas2.getContext('2d');
+    assert_equals(ctx4, null);
+}, "Test that getContext twice with different context type returns null the second time");
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(1, 2);
+    var ctx = offscreenCanvas.getContext('2d');
+    var dstCanvas = ctx.canvas;
+    assert_equals(dstCanvas.width, 1);
+    assert_equals(dstCanvas.height, 2);
+}, "Test that 2dcontext.canvas should return the original OffscreenCanvas");
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(1, 2);
+    var ctx = offscreenCanvas.getContext('webgl');
+    var dstCanvas = ctx.canvas;
+    assert_equals(dstCanvas.width, 1);
+    assert_equals(dstCanvas.height, 2);
+}, "Test that webglcontext.canvas should return the original OffscreenCanvas");
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    var ctx = offscreenCanvas.getContext('2d', {alpha: false});
+    ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+    ctx.fillRect(0, 0, 10, 10);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,127,0,255, "5,5", "0,127,0,255", 2);
+}, "Test that OffscreenCanvasRenderingContext2D with alpha disabled makes the OffscreenCanvas opaque");
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    var ctx = offscreenCanvas.getContext('2d', {alpha: true});
+    ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+    ctx.fillRect(0, 0, 10, 10);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,127, "5,5", "0,255,0,127", 2);
+}, "Test that OffscreenCanvasRenderingContext2D with alpha enabled preserves the alpha");
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    var ctx = offscreenCanvas.getContext('2d');
+    ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+    ctx.fillRect(0, 0, 10, 10);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,127, "5,5", "0,255,0,127", 2);
+}, "Test that 'alpha' context creation attribute is true by default");
+
+</script>
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasgetcontextworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker-expected.txt                               (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker-expected.txt  2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+
+PASS Test that getContext with un-supported string throws a TypeError. 
+FAIL Test that getContext with supported string returns correct results Can't find variable: OffscreenCanvasRenderingContext2D
+FAIL Test that getContext twice with different context type returns null the second time The object is in an invalid state.
+PASS Test that 2dcontext.canvas should return the original OffscreenCanvas 
+PASS Test that webglcontext.canvas should return the original OffscreenCanvas 
+FAIL Test that OffscreenCanvasRenderingContext2D with alpha disabled makes the OffscreenCanvas opaque assert_approx_equals: Green channel of the pixel at (5, 5) expected 127 +/- 2 but got 255
+PASS Test that OffscreenCanvasRenderingContext2D with alpha enabled preserves the alpha 
+PASS Test that 'alpha' context creation attribute is true by default 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasgetcontextworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.html                               (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.html  2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasgetcontextworkerjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js                         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js    2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,77 @@
</span><ins>+// spec link: https://html.spec.whatwg.org/#dom-offscreencanvas-getcontext
+
+importScripts("/resources/testharness.js");
+importScripts("/html/canvas/resources/canvas-tests.js");
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(1, 1);
+    assert_throws_js(TypeError, function() { offscreenCanvas.getContext('3d'); });
+}, "Test that getContext with un-supported string throws a TypeError.");
+
+test(function() {
+    var offscreenCanvas1 = new OffscreenCanvas(1, 1);
+    var ctx1 = offscreenCanvas1.getContext('2d');
+    assert_true(ctx1 instanceof OffscreenCanvasRenderingContext2D);
+
+    var offscreenCanvas2 = new OffscreenCanvas(1, 1);
+    var ctx2 = offscreenCanvas2.getContext('webgl');
+    assert_true(ctx2 instanceof WebGLRenderingContext);
+
+    var offscreenCanvas3 = new OffscreenCanvas(1, 1);
+    var ctx3 = offscreenCanvas3.getContext('webgl2');
+    assert_true(ctx3 instanceof WebGL2RenderingContext);
+}, "Test that getContext with supported string returns correct results");
+
+test(function() {
+    var offscreenCanvas1 = new OffscreenCanvas(1, 1);
+    var ctx1 = offscreenCanvas1.getContext('2d');
+    var ctx2 = offscreenCanvas1.getContext('webgl');
+    assert_equals(ctx2, null);
+
+    var offscreenCanvas2 = new OffscreenCanvas(1, 1);
+    var ctx3 = offscreenCanvas2.getContext('webgl');
+    var ctx4 = offscreenCanvas2.getContext('2d');
+    assert_equals(ctx4, null);
+}, "Test that getContext twice with different context type returns null the second time");
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(1, 2);
+    var ctx = offscreenCanvas.getContext('2d');
+    var dstCanvas = ctx.canvas;
+    assert_equals(dstCanvas.width, 1);
+    assert_equals(dstCanvas.height, 2);
+}, "Test that 2dcontext.canvas should return the original OffscreenCanvas");
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(1, 2);
+    var ctx = offscreenCanvas.getContext('webgl');
+    var dstCanvas = ctx.canvas;
+    assert_equals(dstCanvas.width, 1);
+    assert_equals(dstCanvas.height, 2);
+}, "Test that webglcontext.canvas should return the original OffscreenCanvas");
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    var ctx = offscreenCanvas.getContext('2d', {alpha: false});
+    ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+    ctx.fillRect(0, 0, 10, 10);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,127,0,255, "5,5", "0,127,0,255", 2);
+}, "Test that OffscreenCanvasRenderingContext2D with alpha disabled makes the OffscreenCanvas opaque");
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    var ctx = offscreenCanvas.getContext('2d', {alpha: true});
+    ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+    ctx.fillRect(0, 0, 10, 10);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,127, "5,5", "0,255,0,127", 2);
+}, "Test that OffscreenCanvasRenderingContext2D with alpha enabled preserves the alpha");
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    var ctx = offscreenCanvas.getContext('2d');
+    ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+    ctx.fillRect(0, 0, 10, 10);
+    _assertPixelApprox(offscreenCanvas, 5,5, 0,255,0,127, "5,5", "0,255,0,127", 2);
+}, "Test that 'alpha' context creation attribute is true by default");
+
+done();
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasresizeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize-expected.txt                          (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize-expected.txt     2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+
+PASS Verify that writing to the width and height attributes of an OffscreenCanvas works when there is no context attached. 
+PASS Verify that writing to the width and height attributes of an OffscreenCanvas works when there is a 2d context attached. 
+PASS Verify that writing to the width and height attributes of an OffscreenCanvas works when there is a webgl context attached. 
+FAIL Verify that writing to the width or height attribute of a placeholder canvas throws an exception placeholder.transferControlToOffscreen is not a function. (In 'placeholder.transferControlToOffscreen()', 'placeholder.transferControlToOffscreen' is undefined)
+FAIL Verify that writing to the width or height attribute of a placeholder canvas throws an exception even when not changing the value of the attribute. placeholder.transferControlToOffscreen is not a function. (In 'placeholder.transferControlToOffscreen()', 'placeholder.transferControlToOffscreen' is undefined)
+PASS Verify that resizing a 2d context resets its state. 
+PASS Verify that setting the size of a 2d context to the same size it already had resets its state. 
+FAIL Verify that resizing an OffscreenCanvas with a 2d context propagates the new size to its placeholder canvas asynchronously. placeholder.transferControlToOffscreen is not a function. (In 'placeholder.transferControlToOffscreen()', 'placeholder.transferControlToOffscreen' is undefined)
+FAIL Verify that resizing an OffscreenCanvas with a webgl context propagates the new size to its placeholder canvas asynchronously. placeholder.transferControlToOffscreen is not a function. (In 'placeholder.transferControlToOffscreen()', 'placeholder.transferControlToOffscreen' is undefined)
+FAIL Verify that drawImage uses the size of the frame as the intinsic size of a placeholder canvas. placeholder.transferControlToOffscreen is not a function. (In 'placeholder.transferControlToOffscreen()', 'placeholder.transferControlToOffscreen' is undefined)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvasresizehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html                          (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html     2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,236 @@
</span><ins>+<!DOCTYPE html>
+<title>Test resizing an OffscreenCanvas with a 2d context</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+<body></body>
+<script>
+test(function() {
+  var canvas = new OffscreenCanvas(10, 20);
+  canvas.width = 30;
+  canvas.height = 40;
+  assert_equals(canvas.width, 30);
+  assert_equals(canvas.height, 40);
+}, "Verify that writing to the width and height attributes of an OffscreenCanvas works when there is no context attached.");
+
+test(function() {
+  var canvas = new OffscreenCanvas(10, 20);
+  canvas.getContext('2d');
+  canvas.width = 30;
+  canvas.height = 40;
+  assert_equals(canvas.width, 30);
+  assert_equals(canvas.height, 40);
+  var image = canvas.transferToImageBitmap();
+  assert_equals(image.width, 30);
+  assert_equals(image.height, 40);
+}, "Verify that writing to the width and height attributes of an OffscreenCanvas works when there is a 2d context attached.");
+
+test(function() {
+  var canvas = new OffscreenCanvas(10, 20);
+  canvas.getContext('webgl');
+  canvas.width = 30;
+  canvas.height = 40;
+  assert_equals(canvas.width, 30);
+  assert_equals(canvas.height, 40);
+  var image = canvas.transferToImageBitmap();
+  assert_equals(image.width, 30);
+  assert_equals(image.height, 40);
+}, "Verify that writing to the width and height attributes of an OffscreenCanvas works when there is a webgl context attached.");
+
+test(function() {
+  var placeholder = document.createElement('canvas');
+  placeholder.width = 2;
+  placeholder.height = 2;
+  var offscreen = placeholder.transferControlToOffscreen();
+  assert_throws_dom("InvalidStateError", () => { placeholder.width = 1; });
+  assert_throws_dom("InvalidStateError", () => { placeholder.height = 1; });
+}, "Verify that writing to the width or height attribute of a placeholder canvas throws an exception");
+
+test(function() {
+  var placeholder = document.createElement('canvas');
+  placeholder.width = 1;
+  placeholder.height = 1;
+  var offscreen = placeholder.transferControlToOffscreen();
+  assert_throws_dom("InvalidStateError", () => { placeholder.width = 1; });
+  assert_throws_dom("InvalidStateError", () => { placeholder.height = 1; });
+}, "Verify that writing to the width or height attribute of a placeholder canvas throws an exception even when not changing the value of the attribute.");
+
+test(function() {
+  var canvas = new OffscreenCanvas(10, 20);
+  var ctx = canvas.getContext('2d');
+  ctx.lineWidth = 5;
+  canvas.width = 30;
+  assert_equals(ctx.lineWidth, 1);
+  ctx.lineWidth = 5;
+  canvas.height = 40;
+  assert_equals(ctx.lineWidth, 1);
+}, "Verify that resizing a 2d context resets its state.");
+
+test(function() {
+  var canvas = new OffscreenCanvas(10, 20);
+  var ctx = canvas.getContext('2d');
+  ctx.lineWidth = 5;
+  canvas.width = canvas.width;
+  assert_equals(ctx.lineWidth, 1);
+  ctx.lineWidth = 5;
+  canvas.height = canvas.height;
+  assert_equals(ctx.lineWidth, 1);
+}, "Verify that setting the size of a 2d context to the same size it already had resets its state.");
+
+async_test(function(t) {
+  var placeholder = document.createElement('canvas');
+  document.body.appendChild(placeholder); // So that we can check computed style/
+  placeholder.width = 10;
+  placeholder.height = 20;
+  var offscreen = placeholder.transferControlToOffscreen();
+  var ctx = offscreen.getContext('2d');
+  t.step(function() {
+    // Verify that setting the size of an OffscreenCanvas that has a placeholder works.
+    offscreen.width = 30;
+    offscreen.height = 40;
+    assert_equals(offscreen.width, 30);
+    assert_equals(offscreen.height, 40);
+    var image = offscreen.transferToImageBitmap();
+    assert_equals(image.width, 30);
+    assert_equals(image.height, 40);
+  });
+  t.step(function() {
+    // Verify that setting the size of an OffscreenCanvas does not directly update the size of its placeholder canvas.
+    assert_equals(placeholder.width, 10);
+    assert_equals(placeholder.height, 20);
+  });
+  var asyncStepsCompleted = 0;
+  createImageBitmap(placeholder).then(image => {
+    t.step(function() {
+      // Verify that the placeholder was not updated synchronously.
+      assert_equals(image.width, 10);
+      assert_equals(image.height, 20);
+    });
+    asyncStepsCompleted = asyncStepsCompleted + 1;
+    if (asyncStepsCompleted == 2) {
+      t.done();
+    }
+  });
+  // We wait for up to 3 frames before checking the information has propagated.
+  requestAnimationFrame(() => {
+    requestAnimationFrame(() => {
+      requestAnimationFrame(() => {
+      t.step(function() {
+        // Verify that updates the size of its placeholder canvas.
+        assert_equals(placeholder.width, 30);
+        assert_equals(placeholder.height, 40);
+        var computedStyle = window.getComputedStyle(placeholder);
+        assert_equals(computedStyle.getPropertyValue('width'), "30px");
+        assert_equals(computedStyle.getPropertyValue('height'), "40px");
+      });
+      createImageBitmap(placeholder).then(image => {
+        t.step(function() {
+          // Verify that an image grabbed from the placeholder has the correct dimensions
+          assert_equals(image.width, 30);
+          assert_equals(image.height, 40);
+        });
+        asyncStepsCompleted = asyncStepsCompleted + 1;
+        if (asyncStepsCompleted == 2) {
+          t.done();
+        }
+      });
+    });
+    });
+  });
+}, "Verify that resizing an OffscreenCanvas with a 2d context propagates the new size to its placeholder canvas asynchronously.");
+
+async_test(function(t) {
+  var placeholder = document.createElement('canvas');
+  document.body.appendChild(placeholder); // So that we can check computed style/
+  placeholder.width = 10;
+  placeholder.height = 20;
+  var offscreen = placeholder.transferControlToOffscreen();
+  var ctx = offscreen.getContext('webgl');
+  t.step(function() {
+    // Verify that setting the size of an OffscreenCanvas that has a placeholder works.
+    offscreen.width = 30;
+    offscreen.height = 40;
+    assert_equals(offscreen.width, 30);
+    assert_equals(offscreen.height, 40);
+    var image = offscreen.transferToImageBitmap();
+    assert_equals(image.width, 30);
+    assert_equals(image.height, 40);
+  });
+  t.step(function() {
+    // Verify that setting the size of an OffscreenCanvas does not directly update the size of its placeholder canvas.
+    assert_equals(placeholder.width, 10);
+    assert_equals(placeholder.height, 20);
+  });
+  var asyncStepsCompleted = 0;
+  createImageBitmap(placeholder).then(image => {
+    t.step(function() {
+      // Verify that the placeholder was not updated synchronously.
+      assert_equals(image.width, 10);
+      assert_equals(image.height, 20);
+    });
+    asyncStepsCompleted = asyncStepsCompleted + 1;
+    if (asyncStepsCompleted == 2) {
+      t.done();
+    }
+  });
+  // We wait for up to 3 frames before checking the information has propagated.
+  requestAnimationFrame(() => {
+    requestAnimationFrame(() => {
+      requestAnimationFrame(() => {
+        t.step(function() {
+          // Verify that updates the size of its placeholder canvas.
+          assert_equals(placeholder.width, 30);
+          assert_equals(placeholder.height, 40);
+          var computedStyle = window.getComputedStyle(placeholder);
+          assert_equals(computedStyle.getPropertyValue('width'), "30px");
+          assert_equals(computedStyle.getPropertyValue('height'), "40px");
+        });
+        createImageBitmap(placeholder).then(image => {
+          t.step(function() {
+            // Verify that an image grabbed from the placeholder has the correct dimensions
+            assert_equals(image.width, 30);
+            assert_equals(image.height, 40);
+          });
+          asyncStepsCompleted = asyncStepsCompleted + 1;
+          if (asyncStepsCompleted == 2) {
+            t.done();
+          }
+        });
+      });
+    });
+  });
+}, "Verify that resizing an OffscreenCanvas with a webgl context propagates the new size to its placeholder canvas asynchronously.");
+
+async_test(function(t){
+  var placeholder = document.createElement('canvas');
+  placeholder.width = 1;
+  placeholder.height = 1;
+  var offscreen = placeholder.transferControlToOffscreen();
+  var ctx = offscreen.getContext('2d');
+  offscreen.width = offscreen.height = 10;
+  ctx.fillStyle = '#0f0';
+  ctx.fillRect(0, 0, 10, 10);
+  // We wait for up to 3 frames before checking the information has propagated.
+  requestAnimationFrame(() => {
+    requestAnimationFrame(() => {
+      requestAnimationFrame(() => {
+        var testCanvas = document.createElement('canvas');
+        testCanvas.width = testCanvas.height = 20;
+        testCtx = testCanvas.getContext('2d');
+        testCtx.drawImage(placeholder, 0, 0);
+        var pixel1 = testCtx.getImageData(9, 9, 1, 1).data;
+        var pixel2 = testCtx.getImageData(9, 10, 1, 1).data;
+        var pixel3 = testCtx.getImageData(10, 9, 1, 1).data;
+        t.step(function() {
+          assert_equals(placeholder.width, 10);
+          assert_equals(placeholder.height, 10);
+          assert_array_equals(pixel1, [0, 255, 0, 255]);
+          assert_array_equals(pixel2, [0, 0, 0, 0]);
+          assert_array_equals(pixel3, [0, 0, 0, 0]);
+        });
+        t.done();
+      });
+    });
+  });
+}, "Verify that drawImage uses the size of the frame as the intinsic size of a placeholder canvas.");
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransfertoimagebitmapexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap-expected.txt                         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap-expected.txt    2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+
+PASS Test that transferToImageBitmap returns an ImageBitmap with correct width and height 
+FAIL Test that transferToImageBitmap returns an ImageBitmap with correct color assert_equals: Alpha channel of the pixel at (50, 25) expected 255 but got 0
+PASS Test that transferToImageBitmap won't change context's property 
+FAIL Test that transferToImageBitmap preserves transform assert_equals: Green channel of the pixel at (23, 25) expected 255 but got 0
+PASS Test that call transferToImageBitmap on a detached OffscreenCanvas throws an exception 
+PASS Test that transferToImageBitmap without a context throws an exception 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransfertoimagebitmaphtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html                         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html    2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,112 @@
</span><ins>+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+<link rel="help" href="https://html.spec.whatwg.org/#dom-offscreencanvas-transfertoimagebitmap">
+
+<script id="myWorker" type="text/worker">
+
+self.onmessage = function(e) {
+};
+
+</script>
+
+<script>
+function makeWorker(script)
+{
+    var blob = new Blob([script]);
+    return new Worker(URL.createObjectURL(blob));
+}
+
+test(function() {
+    function testSize(contextType) {
+        var offscreenCanvas = new OffscreenCanvas(100, 50);
+        var ctx = offscreenCanvas.getContext(contextType);
+        var image = offscreenCanvas.transferToImageBitmap();
+        assert_equals(image.width, 100);
+        assert_equals(image.height, 50);
+    }
+
+    testSize('2d');
+    testSize('webgl');
+}, "Test that transferToImageBitmap returns an ImageBitmap with correct width and height");
+
+test(function() {
+    function testImageBitmapClr(shouldCallTwice, alphaVal) {
+        var offscreenCanvas = new OffscreenCanvas(100, 50);
+        var ctx = offscreenCanvas.getContext('2d', {alpha: alphaVal});
+        ctx.fillStyle = "#0f0";
+        ctx.fillRect(0, 0, 100, 50);
+        var image = offscreenCanvas.transferToImageBitmap();
+
+        if (shouldCallTwice)
+            image = offscreenCanvas.transferToImageBitmap();
+
+        var drawCanvas = document.createElement('canvas');
+        drawCanvas.width = 100;
+        drawCanvas.height = 50;
+        var dCtx = drawCanvas.getContext('2d');
+        dCtx.drawImage(image, 0, 0);
+
+        if (shouldCallTwice) {
+            if (alphaVal)
+                _assertPixel(drawCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");
+            else
+                _assertPixel(drawCanvas, 50,25, 0,0,0,255, "50,25", "0,0,0,255");
+        } else {
+            _assertPixel(drawCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
+        }
+    }
+
+    testImageBitmapClr(false, true);
+    testImageBitmapClr(true, true);
+    testImageBitmapClr(true, false);
+}, "Test that transferToImageBitmap returns an ImageBitmap with correct color");
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(100, 50);
+    var ctx = offscreenCanvas.getContext('2d');
+    ctx.lineWidth = 10;
+    var image = offscreenCanvas.transferToImageBitmap();
+    assert_equals(ctx.lineWidth, 10);
+}, "Test that transferToImageBitmap won't change context's property");
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(100, 50);
+    var ctx = offscreenCanvas.getContext('2d');
+    ctx.rect(0, 0, 25, 50);
+    ctx.clip();
+    ctx.translate(20, 20);
+
+    ctx.fillStyle = '#0f0';
+    var image1 = offscreenCanvas.transferToImageBitmap();
+    // trasnform should be preserved
+    ctx.fillRect(0, 0, 10, 10);
+    var image2 = offscreenCanvas.transferToImageBitmap();
+
+    var drawCanvas = document.createElement('canvas');
+    drawCanvas.width = 100;
+    drawCanvas.height = 50;
+    var dCtx = drawCanvas.getContext('2d');
+    dCtx.drawImage(image2, 0, 0);
+    // Verify that transform was carried over.
+    _assertPixel(drawCanvas, 23,25, 0,255,0,255, "23,25", "0,255,0,255");
+    // Verify that clip was carried over.
+    _assertPixel(drawCanvas, 27,25, 0,0,0,0, "27,25", "0,0,0,0");
+}, "Test that transferToImageBitmap preserves transform");
+
+async_test(function(t) {
+    var worker = makeWorker(document.getElementById("myWorker").textContent);
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    worker.postMessage(offscreenCanvas, [offscreenCanvas]);
+    assert_throws_dom("InvalidStateError", function() { offscreenCanvas.transferToImageBitmap(); });
+    t.done();
+}, "Test that call transferToImageBitmap on a detached OffscreenCanvas throws an exception");
+
+test(function() {
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    assert_throws_dom("InvalidStateError", function() { offscreenCanvas.transferToImageBitmap(); });
+}, "Test that transferToImageBitmap without a context throws an exception");
+
+</script>
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransfertoimagebitmapwexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w-expected.txt                               (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w-expected.txt  2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+
+PASS Test that transferToImageBitmap returns an ImageBitmap with correct width and height in a worker 
+PASS Test that transferToImageBitmap returns an ImageBitmap with correct color in a worker 
+PASS Test that call transferToImageBitmap twice returns an ImageBitmap with correct color in a worker 
+FAIL Test that call transferToImageBitmap twice on a alpha-disabled context returns an ImageBitmap with correct color in a worker assert_array_equals: expected property 3 to be 255 but got 0 (expected array [0, 0, 0, 255] got object "0,0,0,0")
+PASS Test that transferToImageBitmap won't change context's property in a worker 
+FAIL Test that call transferToImageBitmap preserves transform in a worker assert_array_equals: expected property 1 to be 255 but got 0 (expected array [0, 255, 0, 255] got object "0,0,0,0")
+PASS Test that call transferToImageBitmap on a detached OffscreenCanvas throws an exception in a worker 
+PASS Test that call transferToImageBitmap without a context throws an exception in a worker 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransfertoimagebitmapwhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w.html                               (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w.html  2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,201 @@
</span><ins>+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+<link rel="help" href="https://html.spec.whatwg.org/#dom-offscreencanvas-transfertoimagebitmap">
+
+<script id="myWorker" type="text/worker">
+
+function testSize(contextType)
+{
+    var offscreenCanvas = new OffscreenCanvas(100, 50);
+    var ctx = offscreenCanvas.getContext(contextType);
+    var image = offscreenCanvas.transferToImageBitmap();
+    if (image.width == 100 && image.height == 50)
+        return true;
+    return false;
+}
+
+function testImageBitmapClr(shouldCallTwice, alphaVal) {
+    var offscreenCanvas = new OffscreenCanvas(100, 50);
+    var ctx = offscreenCanvas.getContext('2d', {alpha: alphaVal});
+    ctx.fillStyle = "#0f0";
+    ctx.fillRect(0, 0, 100, 50);
+    var image = offscreenCanvas.transferToImageBitmap();
+
+    if (shouldCallTwice)
+        image = offscreenCanvas.transferToImageBitmap();
+    return image;
+}
+
+function isInvalidStateError(funcStr, offscreenCanvas)
+{
+    try {
+        eval(funcStr);
+    } catch (e) {
+        if (e instanceof DOMException && e.name == "InvalidStateError")
+            return true;
+        return false;
+    }
+}
+
+function testImageBitmapSize()
+{
+    return testSize('2d') && testSize('webgl');
+}
+
+function testLineWidthNotAltered()
+{
+    var offscreenCanvas = new OffscreenCanvas(100, 50);
+    var ctx = offscreenCanvas.getContext('2d');
+    ctx.lineWidth = 10;
+    var image = offscreenCanvas.transferToImageBitmap();
+    return ctx.lineWidth == 10;
+}
+
+function testTransformPreserved()
+{
+    var offscreenCanvas = new OffscreenCanvas(100, 50);
+    var ctx = offscreenCanvas.getContext('2d');
+    ctx.rect(0, 0, 25, 50);
+    ctx.clip();
+    ctx.translate(20, 20);
+
+    ctx.fillStyle = '#0f0';
+    var image1 = offscreenCanvas.transferToImageBitmap();
+    // trasnform should be preserved
+    ctx.fillRect(0, 0, 10, 10);
+    var image2 = offscreenCanvas.transferToImageBitmap();
+    return image2;
+}
+
+function testException()
+{
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    return isInvalidStateError("offscreenCanvas.transferToImageBitmap()", offscreenCanvas);
+}
+
+self.onmessage = function(e) {
+    switch (e.data) {
+        case 'test1':
+            self.postMessage(testImageBitmapSize());
+            break;
+        case 'test2':
+            self.postMessage(testImageBitmapClr(false, true));
+            break;
+        case 'test3':
+            self.postMessage(testImageBitmapClr(true, true));
+            break;
+        case 'test4':
+            self.postMessage(testImageBitmapClr(true, false));
+            break;
+        case 'test5':
+            self.postMessage(testLineWidthNotAltered());
+            break;
+        case 'test6':
+            self.postMessage(testTransformPreserved());
+            break;
+        case 'test7':
+            var offscreenCanvas = new OffscreenCanvas(10, 10);
+            self.postMessage({offscreenCanvas: offscreenCanvas}, [offscreenCanvas]);
+            self.postMessage(isInvalidStateError("offscreenCanvas.transferToImageBitmap()", offscreenCanvas));
+            break;
+        case 'test8':
+            self.postMessage(testException());
+            break;
+    }
+};
+
+</script>
+
+<script>
+function makeWorker(test) {
+    var blob = new Blob([document.getElementById("myWorker").textContent]);
+    var worker = new Worker(URL.createObjectURL(blob));
+    worker.onerror = test.unreached_func("error");
+    return worker;
+}
+
+function drawImageBitmap(image, x, y)
+{
+    var drawCanvas = document.createElement('canvas');
+    drawCanvas.width = 100;
+    drawCanvas.height = 50;
+    var dCtx = drawCanvas.getContext('2d');
+    dCtx.drawImage(image, 0, 0);
+    return dCtx.getImageData(x, y, 1, 1).data;
+}
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        assert_true(msg.data);
+    }));
+    worker.postMessage('test1');
+}, "Test that transferToImageBitmap returns an ImageBitmap with correct width and height in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        var clr = drawImageBitmap(msg.data, 50, 25);
+        assert_array_equals(clr, [0, 255, 0, 255]);
+    }));
+    worker.postMessage('test2');
+}, "Test that transferToImageBitmap returns an ImageBitmap with correct color in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        var clr = drawImageBitmap(msg.data, 50, 25);
+        assert_array_equals(clr, [0, 0, 0, 0]);
+    }));
+    worker.postMessage('test3');
+}, "Test that call transferToImageBitmap twice returns an ImageBitmap with correct color in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        var clr = drawImageBitmap(msg.data, 50, 25);
+        assert_array_equals(clr, [0, 0, 0, 255]);
+    }));
+    worker.postMessage('test4');
+}, "Test that call transferToImageBitmap twice on a alpha-disabled context returns an ImageBitmap with correct color in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        assert_true(msg.data);
+    }));
+    worker.postMessage('test5');
+}, "Test that transferToImageBitmap won't change context's property in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        var clr1 = drawImageBitmap(msg.data, 23, 25);
+        assert_array_equals(clr1, [0, 255, 0, 255]);
+        var clr2 = drawImageBitmap(msg.data, 27, 25);
+        assert_array_equals(clr2, [0, 0, 0, 0]);
+    }));
+    worker.postMessage('test6');
+}, "Test that call transferToImageBitmap preserves transform in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        if (msg.data == true || msg.data == false)
+            assert_true(msg.data);
+    }));
+    worker.postMessage('test7');
+}, "Test that call transferToImageBitmap on a detached OffscreenCanvas throws an exception in a worker");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        assert_true(msg.data);
+    }));
+    worker.postMessage('test8');
+}, "Test that call transferToImageBitmap without a context throws an exception in a worker");
+
+</script>
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransfercontroltooffscreenexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen-expected.txt                            (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen-expected.txt       2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+
+FAIL Test that an OffscreenCanvas generated by transferControlToOffscreen gets correct width and height placeholder.transferControlToOffscreen is not a function. (In 'placeholder.transferControlToOffscreen()', 'placeholder.transferControlToOffscreen' is undefined)
+FAIL Test that calling getContext on a placeholder canvas that has already transferred its control throws an exception placeholder.transferControlToOffscreen is not a function. (In 'placeholder.transferControlToOffscreen()', 'placeholder.transferControlToOffscreen' is undefined)
+FAIL Test that calling transferControlToOffscreen twice throws an exception placeholder.transferControlToOffscreen is not a function. (In 'placeholder.transferControlToOffscreen()', 'placeholder.transferControlToOffscreen' is undefined)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransfercontroltooffscreenhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.html                            (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.html       2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+<link rel="help" href="https://html.spec.whatwg.org/#dom-canvas-transfercontroltooffscreen">
+<script>
+
+test(function() {
+    var placeholder = document.createElement('canvas');
+    placeholder.width = 100;
+    placeholder.height = 50;
+    var offscreenCanvas = placeholder.transferControlToOffscreen();
+    assert_equals(offscreenCanvas.width, 100);
+    assert_equals(offscreenCanvas.height, 50);
+}, "Test that an OffscreenCanvas generated by transferControlToOffscreen gets correct width and height");
+
+test(function() {
+    var placeholder = document.createElement('canvas');
+    placeholder.width = 100;
+    placeholder.height = 50;
+    var offscreenCanvas = placeholder.transferControlToOffscreen();
+    assert_throws_dom("InvalidStateError", function() { placeholder.getContext('2d'); });
+}, "Test that calling getContext on a placeholder canvas that has already transferred its control throws an exception");
+
+test(function() {
+    var placeholder = document.createElement('canvas');
+    placeholder.width = 100;
+    placeholder.height = 50;
+    var offscreenCanvas = placeholder.transferControlToOffscreen();
+    assert_throws_dom("InvalidStateError", function() { placeholder.transferControlToOffscreen(); });
+}, "Test that calling transferControlToOffscreen twice throws an exception");
+
+</script>
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransfercontroltooffscreenwexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w-expected.txt                          (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w-expected.txt     2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+
+FAIL Test that an OffscreenCanvas generated by transferControlToOffscreen gets correct width and height when it is transferred to a worker placeholder.transferControlToOffscreen is not a function. (In 'placeholder.transferControlToOffscreen()', 'placeholder.transferControlToOffscreen' is undefined)
+FAIL Test that calling getContext on a placeholder canvas that is transferred its control to an OffscreenCanvas throws an exception, when the OffscreenCanvas is transferred to a worker placeholder.transferControlToOffscreen is not a function. (In 'placeholder.transferControlToOffscreen()', 'placeholder.transferControlToOffscreen' is undefined)
+FAIL Test that calling transferControlToOffscreen twice throws an exception, when its associated OffscreenCanvas is transferred to a worker placeholder.transferControlToOffscreen is not a function. (In 'placeholder.transferControlToOffscreen()', 'placeholder.transferControlToOffscreen' is undefined)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransfercontroltooffscreenwhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w.html                          (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w.html     2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,76 @@
</span><ins>+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+<link rel="help" href="https://html.spec.whatwg.org/#dom-canvas-transfercontroltooffscreen">
+
+<script id="myWorker" type="text/worker">
+
+function testSize(offscreenCanvas)
+{
+    if (offscreenCanvas.width == 100 && offscreenCanvas.height == 50)
+        return true;
+    return false;
+}
+
+self.onmessage = function(e) {
+    switch (e.data.msg) {
+        case 'test1':
+            self.postMessage(testSize(e.data.data));
+            break;
+        case 'test2':
+            self.postMessage("");
+            break;
+        case 'test3':
+            self.postMessage("");
+            break;
+    }
+};
+
+</script>
+
+<script>
+function makeWorker(script)
+{
+    var blob = new Blob([script]);
+    return new Worker(URL.createObjectURL(blob));
+}
+
+async_test(function(t) {
+    var placeholder = document.createElement('canvas');
+    placeholder.width = 100;
+    placeholder.height = 50;
+    var offscreenCanvas = placeholder.transferControlToOffscreen();
+    var worker = makeWorker(document.getElementById("myWorker").textContent);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        assert_true(msg.data);
+    }));
+    worker.postMessage({msg: 'test1', data: offscreenCanvas}, [offscreenCanvas]);
+}, "Test that an OffscreenCanvas generated by transferControlToOffscreen gets correct width and height when it is transferred to a worker");
+
+async_test(function(t) {
+    var placeholder = document.createElement('canvas');
+    placeholder.width = 100;
+    placeholder.height = 50;
+    var offscreenCanvas = placeholder.transferControlToOffscreen();
+    var worker = makeWorker(document.getElementById("myWorker").textContent);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        assert_throws_dom("InvalidStateError", function() { placeholder.getContext('2d'); });
+    }));
+    worker.postMessage({msg: 'test2', data: offscreenCanvas}, [offscreenCanvas]);
+}, "Test that calling getContext on a placeholder canvas that is transferred its control to an OffscreenCanvas throws an exception, when the OffscreenCanvas is transferred to a worker");
+
+async_test(function(t) {
+    var placeholder = document.createElement('canvas');
+    placeholder.width = 100;
+    placeholder.height = 50;
+    var offscreenCanvas = placeholder.transferControlToOffscreen();
+    var worker = makeWorker(document.getElementById("myWorker").textContent);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        assert_throws_dom("InvalidStateError", function() { placeholder.transferControlToOffscreen(); });
+    }));
+    worker.postMessage({msg: 'test3', data: offscreenCanvas}, [offscreenCanvas]);
+}, "Test that calling transferControlToOffscreen twice throws an exception, when its associated OffscreenCanvas is transferred to a worker");
+
+</script>
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransferrableexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable-expected.txt                           (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable-expected.txt      2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+
+PASS Test that offscreenCanvas's size is correct after being transferred to a worker. 
+PASS Test that transfer an OffscreenCanvas that has a context throws exception. 
+PASS Test that transfer an OffscreenCanvas twice throws exception. 
+PASS Test that calling getContext('2d') on a detached OffscreenCanvas throws exception. 
+PASS Test that calling getContext('webgl') on a detached OffscreenCanvas throws exception. 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransferrablehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.html                           (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.html      2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,83 @@
</span><ins>+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+<link rel="help" href="https://html.spec.whatwg.org/#offscreencanvas">
+
+<script id="myWorker" type="text/worker">
+
+function test1(offscreenCanvas)
+{
+    return offscreenCanvas.width == 10 && offscreenCanvas.height == 10;
+}
+
+self.onmessage = function(e) {
+    switch(e.data.msg) {
+        case 'test1':
+            self.postMessage(test1(e.data.data));
+            break;
+    }
+};
+
+</script>
+
+<script>
+function makeWorker(script)
+{
+    var blob = new Blob([script]);
+    return new Worker(URL.createObjectURL(blob));
+}
+
+async_test(function(t) {
+    var worker = makeWorker(document.getElementById("myWorker").textContent);
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    worker.postMessage({msg: 'test1', data: offscreenCanvas}, [offscreenCanvas]);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        assert_true(msg.data);
+    }));
+    assert_equals(offscreenCanvas.width, 0);
+    assert_equals(offscreenCanvas.height, 0);
+}, "Test that offscreenCanvas's size is correct after being transferred to a worker.");
+
+test(function() {
+    function testException(contextType) {
+        var worker = makeWorker(document.getElementById("myWorker").textContent);
+        var offscreenCanvas = new OffscreenCanvas(10, 10);
+        var ctx = offscreenCanvas.getContext(contextType);
+        assert_throws_dom("InvalidStateError", function() {
+            worker.postMessage({offscreenCanvas}, [offscreenCanvas]);
+        });
+    }
+    testException('2d');
+    testException('webgl');
+}, "Test that transfer an OffscreenCanvas that has a context throws exception.");
+
+test(function() {
+    var worker = makeWorker(document.getElementById("myWorker").textContent);
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    worker.postMessage({offscreenCanvas}, [offscreenCanvas]);
+    assert_throws_dom("InvalidStateError", function() {
+        worker.postMessage({offscreenCanvas}, [offscreenCanvas]);
+    });
+}, "Test that transfer an OffscreenCanvas twice throws exception.");
+
+test(function() {
+    var worker = makeWorker(document.getElementById("myWorker").textContent);
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    worker.postMessage({offscreenCanvas}, [offscreenCanvas]);
+    assert_throws_dom("InvalidStateError", function() {
+        offscreenCanvas.getContext('2d');
+    });
+}, "Test that calling getContext('2d') on a detached OffscreenCanvas throws exception.");
+
+test(function() {
+    var worker = makeWorker(document.getElementById("myWorker").textContent);
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    worker.postMessage({offscreenCanvas}, [offscreenCanvas]);
+    assert_throws_dom("InvalidStateError", function() {
+        offscreenCanvas.getContext('webgl');
+    });
+}, "Test that calling getContext('webgl') on a detached OffscreenCanvas throws exception.");
+
+</script>
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransferrablewexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w-expected.txt                         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w-expected.txt    2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+
+PASS Test that OffscreenCanvas's size is correct after being transferred from a worker. 
+PASS Test that transfer an OffscreenCanvas that has a 2d context throws exception in a worker. 
+PASS Test that transfer an OffscreenCanvas that has a webgl context throws exception in a worker. 
+PASS Test that transfer an OffscreenCanvas twice throws exception in a worker. 
+PASS Test that calling getContext('2d') on a detached OffscreenCanvas throws exception in a worker. 
+PASS Test that calling getContext('webgl') on a detached OffscreenCanvas throws exception in a worker. 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasoffscreencanvastransferrablewhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html                         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html    2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,142 @@
</span><ins>+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+<link rel="help" href="https://html.spec.whatwg.org/#offscreencanvas">
+
+<script id="myWorker" type="text/worker">
+
+function isInvalidStateError(funcStr, offscreenCanvas)
+{
+    try {
+        eval(funcStr);
+    } catch (e) {
+        if (e instanceof DOMException && e.name == "InvalidStateError")
+            return true;
+        return false;
+    }
+}
+
+function testExceptionWith2DContext()
+{
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    var ctx = offscreenCanvas.getContext('2d');
+    return isInvalidStateError("self.postMessage(offscreenCanvas, [offscreenCanvas])", offscreenCanvas);
+}
+
+function testExceptionWithWebGLContext()
+{
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    var ctx = offscreenCanvas.getContext('webgl');
+    return isInvalidStateError("self.postMessage(offscreenCanvas, [offscreenCanvas])", offscreenCanvas);
+}
+
+function testExceptionWithDetachedOffscreenCanvas1()
+{
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    self.postMessage(offscreenCanvas, [offscreenCanvas]);
+    return isInvalidStateError("self.postMessage(offscreenCanvas, [offscreenCanvas])", offscreenCanvas);
+}
+
+function testExceptionWithDetachedOffscreenCanvas2()
+{
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    self.postMessage(offscreenCanvas, [offscreenCanvas]);
+    return isInvalidStateError("offscreenCanvas.getContext('2d')", offscreenCanvas);
+}
+
+function testExceptionWithDetachedOffscreenCanvas3()
+{
+    var offscreenCanvas = new OffscreenCanvas(10, 10);
+    self.postMessage(offscreenCanvas, [offscreenCanvas]);
+    return isInvalidStateError("offscreenCanvas.getContext('webgl')", offscreenCanvas);
+}
+
+self.onmessage = function(e) {
+    switch(e.data) {
+        case 'test1':
+            var offscreenCanvas = new OffscreenCanvas(10, 10);
+            self.postMessage(offscreenCanvas, [offscreenCanvas]);
+            break;
+        case 'test2':
+            self.postMessage(testExceptionWith2DContext());
+            break;
+        case 'test3':
+            self.postMessage(testExceptionWithWebGLContext());
+            break;
+        case 'test4':
+            self.postMessage(testExceptionWithDetachedOffscreenCanvas1());
+            break;
+        case 'test5':
+            self.postMessage(testExceptionWithDetachedOffscreenCanvas2());
+            break;
+        case 'test6':
+            self.postMessage(testExceptionWithDetachedOffscreenCanvas3());
+            break;
+    }
+};
+
+</script>
+
+<script>
+function makeWorker(test) {
+    var blob = new Blob([document.getElementById("myWorker").textContent]);
+    var worker = new Worker(URL.createObjectURL(blob));
+    worker.onerror = test.unreached_func("error");
+    return worker;
+}
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        assert_equals(msg.data.width, 10);
+        assert_equals(msg.data.height, 10);
+    }));
+    worker.postMessage('test1');
+}, "Test that OffscreenCanvas's size is correct after being transferred from a worker.");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        assert_true(msg.data);
+    }));
+    worker.postMessage('test2');
+}, "Test that transfer an OffscreenCanvas that has a 2d context throws exception in a worker.");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        assert_true(msg.data);
+    }));
+    worker.postMessage('test3');
+}, "Test that transfer an OffscreenCanvas that has a webgl context throws exception in a worker.");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        if (msg.data == true || msg.data == false)
+            assert_true(msg.data);
+    }));
+    worker.postMessage('test4');
+}, "Test that transfer an OffscreenCanvas twice throws exception in a worker.");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        if (msg.data == true || msg.data == false)
+            assert_true(msg.data);
+    }));
+    worker.postMessage('test5');
+}, "Test that calling getContext('2d') on a detached OffscreenCanvas throws exception in a worker.");
+
+async_test(function(t) {
+    var worker = makeWorker(t);
+    worker.addEventListener('message', t.step_func_done(function(msg) {
+        if (msg.data == true || msg.data == false)
+            assert_true(msg.data);
+    }));
+    worker.postMessage('test6');
+}, "Test that calling getContext('webgl') on a detached OffscreenCanvas throws exception in a worker.");
+
+</script>
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtheoffscreencanvasw3cimportlog"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/w3c-import.log (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/w3c-import.log                               (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/w3c-import.log  2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the WPT github:
+       https://github.com/web-platform-tests/wpt
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.html
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w.html
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.html
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.js
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w.html
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.html
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w.html
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.html
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtransformations2dtransformationgetTransformexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform-expected.txt                               (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform-expected.txt  2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS This test ensures that getTransform works correctly. 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtransformations2dtransformationgetTransformhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform.html                               (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform.html  2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<body>
+<script>
+// Ensure that context2d.getTransform works
+const epsilon = 1e-5;
+const canvas = new OffscreenCanvas(300, 150);
+const ctx = canvas.getContext('2d');
+
+test(function(t) {
+
+  assert_array_equals(ctx.getTransform().toFloat32Array(),
+    [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
+    "Assert that an untransformed matrix is identity");
+
+  ctx.scale(2, 3);
+  transform = ctx.getTransform();
+  assert_array_equals(ctx.getTransform().toFloat32Array(),
+    [2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
+    "Assert that context2d scaling works");
+
+  ctx.rotate(Math.PI/2);
+  transform = ctx.getTransform();
+  assert_array_approx_equals(ctx.getTransform().toFloat32Array(),
+    [0, 3, 0, 0, -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], epsilon,
+    "Assert that context2d rotate works");
+
+  ctx.translate(1, -1);
+  transform = ctx.getTransform();
+  assert_array_approx_equals(ctx.getTransform().toFloat32Array(),
+    [0, 3, 0, 0, -2, 0, 0, 0, 0, 0, 1, 0, 2, 3, 0, 1], epsilon,
+    "Assert context2d translate works.");
+
+  ctx.resetTransform();
+  assert_array_equals(ctx.getTransform().toFloat32Array(),
+    [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
+    "Assert that a reset matrix is identity");
+}, 'This test ensures that getTransform works correctly.');
+</script>
+</body>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenmanualtransformationsw3cimportlog"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/transformations/w3c-import.log (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/transformations/w3c-import.log                            (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/transformations/w3c-import.log       2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the WPT github:
+       https://github.com/web-platform-tests/wpt
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform.html
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenpathobjects2dpathisPointInStrokebasicexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic-expected.txt                          (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic-expected.txt     2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+2d.path.isPointInStroke.basic
+
+detects whether point is in the area contained by the stroke of the path
+
+
+PASS detects whether point is in the area contained by the stroke of the path 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenpathobjects2dpathisPointInStrokebasichtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.html                          (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.html     2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.path.isPointInStroke.basic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+
+<h1>2d.path.isPointInStroke.basic</h1>
+<p class="desc">detects whether point is in the area contained by the stroke of the path</p>
+
+
+<script>
+var t = async_test("detects whether point is in the area contained by the stroke of the path");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+    throw reason;
+});
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.rect(0, 0, 20, 20);
+_assertSame(ctx.isPointInStroke(0, 0), true, "ctx.isPointInStroke(0, 0)", "true");
+_assertSame(ctx.isPointInStroke(30, 10), false, "ctx.isPointInStroke(30, 10)", "false");
+
+var path = new Path2D();
+path.rect(20, 20, 100, 100);
+_assertSame(ctx.isPointInStroke(path, 20, 20), true, "ctx.isPointInStroke(path, 20, 20)", "true");
+_assertSame(ctx.isPointInStroke(path, 120, 20), true, "ctx.isPointInStroke(path, 120, 20)", "true");
+t.done();
+
+});
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenpathobjects2dpathisPointInStrokebasicworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker-expected.txt (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker-expected.txt                           (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker-expected.txt      2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS detects whether point is in the area contained by the stroke of the path 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenpathobjects2dpathisPointInStrokebasicworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.html (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.html                           (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.html      2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+<!-- This file is required for WebKit test infrastructure to run the templated test -->
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenpathobjects2dpathisPointInStrokebasicworkerjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.js (0 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.js                             (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.js        2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.path.isPointInStroke.basic
+// Description:detects whether point is in the area contained by the stroke of the path
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/html/canvas/resources/canvas-tests.js");
+
+var t = async_test("detects whether point is in the area contained by the stroke of the path");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+    throw reason;
+});
+t.step(function() {
+
+var offscreenCanvas = new OffscreenCanvas(100, 50);
+var ctx = offscreenCanvas.getContext('2d');
+
+ctx.strokeStyle = '#0f0';
+ctx.beginPath();
+ctx.rect(0, 0, 20, 20);
+_assertSame(ctx.isPointInStroke(0, 0), true, "ctx.isPointInStroke(0, 0)", "true");
+_assertSame(ctx.isPointInStroke(30, 10), false, "ctx.isPointInStroke(30, 10)", "false");
+
+var path = new Path2D();
+path.rect(20, 20, 100, 100);
+_assertSame(ctx.isPointInStroke(path, 20, 20), true, "ctx.isPointInStroke(path, 20, 20)", "true");
+_assertSame(ctx.isPointInStroke(path, 120, 20), true, "ctx.isPointInStroke(path, 120, 20)", "true");
+t.done();
+
+});
+done();
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreenpathobjectsw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/w3c-import.log (265435 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/w3c-import.log      2020-08-10 17:05:10 UTC (rev 265435)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/w3c-import.log 2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -186,6 +186,8 @@
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.worker.js
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.worker.js
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.html
+/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.js
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.worker.js
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.html
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreentext2dtextmeasurewidthspacehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.html (265435 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.html    2020-08-10 17:05:10 UTC (rev 265435)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.html       2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> fonts.ready.then(function() {
</span><span class="cx">     ctx.font = '50px CanvasTest';
</span><span class="cx">     _assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150");
</span><del>-    _assertSame(ctx.measureText('A  B').width, 150, "ctx.measureText('A  B').width", "150");
</del><ins>+    _assertSame(ctx.measureText('A  B').width, 200, "ctx.measureText('A  B').width", "200");
</ins><span class="cx">     _assertSame(ctx.measureText('A \x09\x0a\x0c\x0d  \x09\x0a\x0c\x0dB').width, 150, "ctx.measureText('A \\x09\\x0a\\x0c\\x0d  \\x09\\x0a\\x0c\\x0dB').width", "150");
</span><span class="cx">     _assert(ctx.measureText('A \x0b B').width >= 200, "ctx.measureText('A \\x0b B').width >= 200");
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlcanvasoffscreentext2dtextmeasurewidthspaceworkerjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js (265435 => 265436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js       2020-08-10 17:05:10 UTC (rev 265435)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js  2020-08-10 17:25:34 UTC (rev 265436)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> fonts.ready.then(function() {
</span><span class="cx">     ctx.font = '50px CanvasTest';
</span><span class="cx">     _assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150");
</span><del>-    _assertSame(ctx.measureText('A  B').width, 150, "ctx.measureText('A  B').width", "150");
</del><ins>+    _assertSame(ctx.measureText('A  B').width, 200, "ctx.measureText('A  B').width", "200");
</ins><span class="cx">     _assertSame(ctx.measureText('A \x09\x0a\x0c\x0d  \x09\x0a\x0c\x0dB').width, 150, "ctx.measureText('A \\x09\\x0a\\x0c\\x0d  \\x09\\x0a\\x0c\\x0dB').width", "150");
</span><span class="cx">     _assert(ctx.measureText('A \x0b B').width >= 200, "ctx.measureText('A \\x0b B').width >= 200");
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>