Update web-platform-tests to revision 0d318188757a9c996e20b82db201fd04de5aa255

This commit is contained in:
James Graham 2015-03-27 09:15:38 +00:00
parent b2a5225831
commit 1a81b18b9f
12321 changed files with 544385 additions and 6 deletions

View file

@ -0,0 +1,5 @@
[2d.drawImage.canvas.html]
type: testharness
[Canvas test: 2d.drawImage.canvas]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.drawImage.self.1.html]
type: testharness
[Canvas test: 2d.drawImage.self.1]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.drawImage.self.2.html]
type: testharness
[Canvas test: 2d.drawImage.self.2]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.clearRect.nonfinite.html]
type: testharness
[clearRect() with Infinity/NaN is ignored]
expected: FAIL

View file

@ -0,0 +1,5 @@
[imagesmoothing.html]
type: testharness
[When the CanvasRenderingContext2D object is created, the attribute must be set to true.]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.line.cap.butt.html]
type: testharness
[lineCap \'butt\' is rendered correctly]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.line.cap.closed.html]
type: testharness
[Line caps are not drawn at the corners of an unclosed rectangle]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.line.cross.html]
type: testharness
[Canvas test: 2d.line.cross]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.line.join.open.html]
type: testharness
[Line joins are not drawn at the corner of an unclosed rectangle]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.line.miter.exceeded.html]
type: testharness
[Miter joins are not drawn when the miter limit is exceeded]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.line.miter.rightangle.html]
type: testharness
[Miter joins are not drawn when the miter limit is exceeded, on exact right angles]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.line.width.scaledefault.html]
type: testharness
[Default lineWidth strokes are affected by scale transformations]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.arc.empty.html]
type: testharness
[arc() with an empty path does not draw a straight line to the start point]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.arc.end.html]
type: testharness
[arc() adds the end point of the arc to the subpath]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.arc.nonempty.html]
type: testharness
[arc() with a non-empty path does draw a straight line to the start point]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.arc.selfintersect.1.html]
type: testharness
[arc() with lineWidth > 2*radius is drawn sensibly]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.arc.shape.1.html]
type: testharness
[arc() from 0 to pi does not draw anything in the wrong half]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.arc.shape.3.html]
type: testharness
[arc() from 0 to -pi/2 does not draw anything in the wrong quadrant]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.arc.shape.5.html]
type: testharness
[arc() from 0 to 5pi does not draw crazy things]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.arc.twopie.1.html]
type: testharness
[arc() draws nothing when end = start + 2pi-e and anticlockwise]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.arc.zero.1.html]
type: testharness
[arc() draws nothing when startAngle = endAngle and anticlockwise]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.arc.zero.2.html]
type: testharness
[arc() draws nothing when startAngle = endAngle and clockwise]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.arc.zeroradius.html]
type: testharness
[arc() with zero radius draws a line to the start point]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.bezierCurveTo.basic.html]
type: testharness
[Canvas test: 2d.path.bezierCurveTo.basic]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.bezierCurveTo.ensuresubpath.1.html]
type: testharness
[If there is no subpath, the first control point is added (and nothing is drawn up to it)]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.bezierCurveTo.nonfinite.html]
type: testharness
[bezierCurveTo() with Infinity/NaN is ignored]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.bezierCurveTo.scaled.html]
type: testharness
[Canvas test: 2d.path.bezierCurveTo.scaled]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.closePath.newline.html]
type: testharness
[Canvas test: 2d.path.closePath.newline]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.closePath.nextpoint.html]
type: testharness
[Canvas test: 2d.path.closePath.nextpoint]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.lineTo.basic.html]
type: testharness
[Canvas test: 2d.path.lineTo.basic]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.lineTo.ensuresubpath.1.html]
type: testharness
[If there is no subpath, the point is added and nothing is drawn]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.lineTo.ensuresubpath.2.html]
type: testharness
[If there is no subpath, the point is added and used for subsequent drawing]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.lineTo.nextpoint.html]
type: testharness
[Canvas test: 2d.path.lineTo.nextpoint]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.lineTo.nonfinite.html]
type: testharness
[lineTo() with Infinity/NaN is ignored]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.moveTo.multiple.html]
type: testharness
[Canvas test: 2d.path.moveTo.multiple]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.moveTo.nonfinite.html]
type: testharness
[moveTo() with Infinity/NaN is ignored]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.quadraticCurveTo.basic.html]
type: testharness
[Canvas test: 2d.path.quadraticCurveTo.basic]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.quadraticCurveTo.ensuresubpath.1.html]
type: testharness
[If there is no subpath, the first control point is added (and nothing is drawn up to it)]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.quadraticCurveTo.nonfinite.html]
type: testharness
[quadraticCurveTo() with Infinity/NaN is ignored]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.quadraticCurveTo.scaled.html]
type: testharness
[Canvas test: 2d.path.quadraticCurveTo.scaled]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.stroke.empty.html]
type: testharness
[Empty subpaths are not stroked]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.stroke.prune.closed.html]
type: testharness
[Zero-length line segments from closed paths are removed before stroking]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.stroke.prune.corner.html]
type: testharness
[Zero-length line segments are removed before stroking with miters]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.stroke.prune.curve.html]
type: testharness
[Zero-length line segments from quadraticCurveTo and bezierCurveTo are removed before stroking]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.path.stroke.prune.line.html]
type: testharness
[Zero-length line segments from lineTo are removed before stroking]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.imageData.get.nonfinite.html]
type: testharness
[getImageData() throws TypeError if arguments are not finite]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.imageData.put.nonfinite.html]
type: testharness
[putImageData() throws TypeError if arguments are not finite]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.shadow.stroke.cap.1.html]
type: testharness
[Shadows are not drawn for areas outside stroke caps]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.shadow.stroke.join.1.html]
type: testharness
[Shadows are not drawn for areas outside stroke joins]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.shadow.stroke.join.3.html]
type: testharness
[Shadows are drawn for stroke joins respecting miter limit]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.transformation.scale.nonfinite.html]
type: testharness
[scale() with Infinity/NaN is ignored]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.transformation.setTransform.nonfinite.html]
type: testharness
[setTransform() with Infinity/NaN is ignored]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.transformation.transform.nonfinite.html]
type: testharness
[transform() with Infinity/NaN is ignored]
expected: FAIL

View file

@ -0,0 +1,5 @@
[2d.transformation.translate.nonfinite.html]
type: testharness
[translate() with Infinity/NaN is ignored]
expected: FAIL

View file

@ -9547,6 +9547,10 @@
"path": "XMLHttpRequest/send-non-same-origin.sub.htm",
"url": "/XMLHttpRequest/send-non-same-origin.sub.htm"
},
{
"path": "XMLHttpRequest/send-receive-utf16.htm",
"url": "/XMLHttpRequest/send-receive-utf16.htm"
},
{
"path": "XMLHttpRequest/send-redirect-bogus-sync.htm",
"url": "/XMLHttpRequest/send-redirect-bogus-sync.htm"
@ -14187,10 +14191,6 @@
"path": "html/semantics/forms/the-textarea-element/textarea-type.html",
"url": "/html/semantics/forms/the-textarea-element/textarea-type.html"
},
{
"path": "html/semantics/grouping-content/the-blockquote-element/grouping-blockquote.sub.html",
"url": "/html/semantics/grouping-content/the-blockquote-element/grouping-blockquote.sub.html"
},
{
"path": "html/semantics/grouping-content/the-dd-element/grouping-dd.html",
"url": "/html/semantics/grouping-content/the-dd-element/grouping-dd.html"
@ -25034,7 +25034,7 @@
}
]
},
"rev": "29dfb8944e535d439ca94cf7d1b1d9138a8ad11f",
"rev": "0d318188757a9c996e20b82db201fd04de5aa255",
"url_base": "/",
"version": 2
}

View file

@ -0,0 +1,9 @@
[event_constructor.html]
type: testharness
expected: TIMEOUT
[Web Storage]
expected: FAIL
[storageeventinit test]
expected: NOTRUN

View file

@ -0,0 +1,9 @@
[event_constructor_js.html]
type: testharness
expected: TIMEOUT
[Web Storage]
expected: FAIL
[StorageEvent constructor and nulls]
expected: NOTRUN

View file

@ -0,0 +1,9 @@
[event_local_storageeventinit.html]
type: testharness
expected: TIMEOUT
[Web Storage]
expected: FAIL
[storageeventinit test]
expected: NOTRUN

View file

@ -0,0 +1,9 @@
[event_session_storageeventinit.html]
type: testharness
expected: TIMEOUT
[Web Storage]
expected: FAIL
[storageeventinit test]
expected: NOTRUN

View file

@ -0,0 +1,5 @@
[missing_arguments.html]
type: testharness
[Should throw TypeError for function "function () { new StorageEvent(); }".]
expected: FAIL

View file

@ -0,0 +1,5 @@
[storage_local_key.html]
type: testharness
[Web Storage 3]
expected: FAIL

@ -1 +0,0 @@
Subproject commit 29dfb8944e535d439ca94cf7d1b1d9138a8ad11f

11
tests/wpt/web-platform-tests/.gitignore vendored Normal file
View file

@ -0,0 +1,11 @@
*#
*.py[co]
*.sw[po]
*~
MANIFEST.json
\#*
_certs
config.json
node_modules
scratch
testharness_runner.html

View file

@ -0,0 +1,7 @@
[submodule "resources"]
path = resources
url = https://github.com/w3c/testharness.js.git
ignore = dirty
[submodule "tools"]
path = tools
url = https://github.com/w3c/wpt-tools.git

View file

@ -0,0 +1,7 @@
language: python
python:
- "2.7"
before_install:
- git submodule update --init --recursive
# command to run tests, e.g. python setup.py test
script: ./lint

View file

@ -0,0 +1,11 @@
<!doctype HTML>
<html>
<head>
<title>HTML5 Canvas Test: arcTo() adds to subpath if same point</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com" />
</head>
<body>
<p>Description: If x1,y1 and x2,y2 are the same point, then arcTo must add x1,y1 to the subpath, and connect that point to x0,y0 with a straight line.</p>
<div><img src="/images/canvas-line.png" alt="line" /></div>
</body>
</html>

View file

@ -0,0 +1,26 @@
<!doctype HTML>
<html>
<head>
<title>HTML5 Canvas Test: arcTo() adds to subpath if same point</title>
<link rel="match" href="canvas_complexshapes_arcto_001-ref.htm">
<link rel="author" title="Microsoft" href="http://www.microsoft.com" />
<link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-arcto" />
<meta name="assert" content="If x1,y1 and x2,y2 are the same point, then arcTo must add x1,y1 to the subpath, and connect that point to x0,y0 with a straight line." />
<script type="text/javascript">
function runTest()
{
var canvas = document.getElementById("canvas1");
var ctx = canvas.getContext("2d");
ctx.moveTo(0, 50);
// Since (x1, y1) and (x2, y2) are the same point, (x1, y1) must be added to the subpath, thus creating a line.
ctx.arcTo(100, 50, 100, 50, 10);
ctx.stroke();
}
</script>
</head>
<body onload="runTest()">
<p>Description: If x1,y1 and x2,y2 are the same point, then arcTo must add x1,y1 to the subpath, and connect that point to x0,y0 with a straight line.</p>
<canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!doctype HTML>
<html>
<head>
<title>HTML5 Canvas Test: bezierCurveTo() must ensure subpaths</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com" />
</head>
<body>
<p>Description: bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) must ensure there is a subpath for the point (cp1x,cp1y) if the context has no subpaths, then it must connect the last point in the subpath to the point (x,y).</p>
<div><img src='/images/smiley.png' alt='smiley' /></div>
</body>
</html>

View file

@ -0,0 +1,35 @@
<!doctype HTML>
<html>
<head>
<title>HTML5 Canvas Test: bezierCurveTo() must ensure subpaths</title>
<link rel="match" href="canvas_complexshapes_beziercurveto_001-ref.htm">
<link rel="author" title="Microsoft" href="http://www.microsoft.com" />
<link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-beziercurveto" />
<meta name="assert" content="bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) must ensure there is a subpath for the point (cp1x,cp1y) if the context has no subpaths, then it must connect the last point in the subpath to the point (x,y)." />
<script type="text/javascript">
function runTest()
{
var canvas = document.getElementById("canvas1");
var ctx = canvas.getContext("2d");
// Since the canvas has no subpaths, a virtual moveTo must be performed to (65,25) before creating the bezier.
ctx.bezierCurveTo(65, 25, 65, 25, 65, 65);
ctx.stroke();
ctx.beginPath();
// Since the canvas has no subpaths, a virtual moveTo must be performed to (35,25) before creating the bezier.
ctx.bezierCurveTo(35, 25, 35, 25, 35, 65);
ctx.stroke();
ctx.beginPath();
// Since the canvas has no subpaths, a virtual moveTo must be performed to (0,75) before creating the bezier.
ctx.bezierCurveTo(0, 75, 50, 150, 100, 75);
ctx.stroke();
}
</script>
</head>
<body onload="runTest()">
<p>Description: bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) must ensure there is a subpath for the point (cp1x,cp1y) if the context has no subpaths, then it must connect the last point in the subpath to the point (x,y).</p>
<canvas id="canvas1" width="300" height="150">Browser does not support HTML5 Canvas.</canvas>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 B

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.composite.canvas.copy</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">
<h1>2d.composite.canvas.copy</h1>
<p class="desc"></p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.copy.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("");
_addTest(function(canvas, ctx) {
var canvas2 = document.createElement('canvas');
canvas2.width = canvas.width;
canvas2.height = canvas.height;
var ctx2 = canvas2.getContext('2d');
ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'copy';
ctx.drawImage(canvas2, 0, 0);
_assertPixelApprox(canvas, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 5);
});
</script>
<img src="/images/yellow75.png" id="yellow75.png" class="resource">

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.composite.canvas.destination-atop</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">
<h1>2d.composite.canvas.destination-atop</h1>
<p class="desc"></p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.destination-atop.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("");
_addTest(function(canvas, ctx) {
var canvas2 = document.createElement('canvas');
canvas2.width = canvas.width;
canvas2.height = canvas.height;
var ctx2 = canvas2.getContext('2d');
ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'destination-atop';
ctx.drawImage(canvas2, 0, 0);
_assertPixelApprox(canvas, 50,25, 128,255,128,191, "50,25", "128,255,128,191", 5);
});
</script>
<img src="/images/yellow75.png" id="yellow75.png" class="resource">

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.composite.canvas.destination-in</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">
<h1>2d.composite.canvas.destination-in</h1>
<p class="desc"></p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.destination-in.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("");
_addTest(function(canvas, ctx) {
var canvas2 = document.createElement('canvas');
canvas2.width = canvas.width;
canvas2.height = canvas.height;
var ctx2 = canvas2.getContext('2d');
ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'destination-in';
ctx.drawImage(canvas2, 0, 0);
_assertPixelApprox(canvas, 50,25, 0,255,255,96, "50,25", "0,255,255,96", 5);
});
</script>
<img src="/images/yellow75.png" id="yellow75.png" class="resource">

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.composite.canvas.destination-out</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">
<h1>2d.composite.canvas.destination-out</h1>
<p class="desc"></p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.destination-out.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("");
_addTest(function(canvas, ctx) {
var canvas2 = document.createElement('canvas');
canvas2.width = canvas.width;
canvas2.height = canvas.height;
var ctx2 = canvas2.getContext('2d');
ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'destination-out';
ctx.drawImage(canvas2, 0, 0);
_assertPixelApprox(canvas, 50,25, 0,255,255,32, "50,25", "0,255,255,32", 5);
});
</script>
<img src="/images/yellow75.png" id="yellow75.png" class="resource">

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.composite.canvas.destination-over</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">
<h1>2d.composite.canvas.destination-over</h1>
<p class="desc"></p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.destination-over.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("");
_addTest(function(canvas, ctx) {
var canvas2 = document.createElement('canvas');
canvas2.width = canvas.width;
canvas2.height = canvas.height;
var ctx2 = canvas2.getContext('2d');
ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'destination-over';
ctx.drawImage(canvas2, 0, 0);
_assertPixelApprox(canvas, 50,25, 109,255,146,223, "50,25", "109,255,146,223", 5);
});
</script>
<img src="/images/yellow75.png" id="yellow75.png" class="resource">

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.composite.canvas.lighter</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">
<h1>2d.composite.canvas.lighter</h1>
<p class="desc"></p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.lighter.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("");
_addTest(function(canvas, ctx) {
var canvas2 = document.createElement('canvas');
canvas2.width = canvas.width;
canvas2.height = canvas.height;
var ctx2 = canvas2.getContext('2d');
ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'lighter';
ctx.drawImage(canvas2, 0, 0);
_assertPixelApprox(canvas, 50,25, 191,255,128,255, "50,25", "191,255,128,255", 5);
});
</script>
<img src="/images/yellow75.png" id="yellow75.png" class="resource">

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.composite.canvas.source-atop</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">
<h1>2d.composite.canvas.source-atop</h1>
<p class="desc"></p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.source-atop.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("");
_addTest(function(canvas, ctx) {
var canvas2 = document.createElement('canvas');
canvas2.width = canvas.width;
canvas2.height = canvas.height;
var ctx2 = canvas2.getContext('2d');
ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'source-atop';
ctx.drawImage(canvas2, 0, 0);
_assertPixelApprox(canvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5);
});
</script>
<img src="/images/yellow75.png" id="yellow75.png" class="resource">

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.composite.canvas.source-in</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">
<h1>2d.composite.canvas.source-in</h1>
<p class="desc"></p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.source-in.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("");
_addTest(function(canvas, ctx) {
var canvas2 = document.createElement('canvas');
canvas2.width = canvas.width;
canvas2.height = canvas.height;
var ctx2 = canvas2.getContext('2d');
ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'source-in';
ctx.drawImage(canvas2, 0, 0);
_assertPixelApprox(canvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5);
});
</script>
<img src="/images/yellow75.png" id="yellow75.png" class="resource">

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.composite.canvas.source-out</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">
<h1>2d.composite.canvas.source-out</h1>
<p class="desc"></p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.source-out.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("");
_addTest(function(canvas, ctx) {
var canvas2 = document.createElement('canvas');
canvas2.width = canvas.width;
canvas2.height = canvas.height;
var ctx2 = canvas2.getContext('2d');
ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'source-out';
ctx.drawImage(canvas2, 0, 0);
_assertPixelApprox(canvas, 50,25, 255,255,0,96, "50,25", "255,255,0,96", 5);
});
</script>
<img src="/images/yellow75.png" id="yellow75.png" class="resource">

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.composite.canvas.source-over</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">
<h1>2d.composite.canvas.source-over</h1>
<p class="desc"></p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.source-over.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("");
_addTest(function(canvas, ctx) {
var canvas2 = document.createElement('canvas');
canvas2.width = canvas.width;
canvas2.height = canvas.height;
var ctx2 = canvas2.getContext('2d');
ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'source-over';
ctx.drawImage(canvas2, 0, 0);
_assertPixelApprox(canvas, 50,25, 219,255,36,223, "50,25", "219,255,36,223", 5);
});
</script>
<img src="/images/yellow75.png" id="yellow75.png" class="resource">

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.composite.canvas.xor</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">
<h1>2d.composite.canvas.xor</h1>
<p class="desc"></p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="2d.composite.canvas.xor.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("");
_addTest(function(canvas, ctx) {
var canvas2 = document.createElement('canvas');
canvas2.width = canvas.width;
canvas2.height = canvas.height;
var ctx2 = canvas2.getContext('2d');
ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0);
ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'xor';
ctx.drawImage(canvas2, 0, 0);
_assertPixelApprox(canvas, 50,25, 191,255,64,128, "50,25", "191,255,64,128", 5);
});
</script>
<img src="/images/yellow75.png" id="yellow75.png" class="resource">

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.composite.clip.copy</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">
<h1>2d.composite.clip.copy</h1>
<p class="desc">fill() does not affect pixels outside the clip region.</p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("fill() does not affect pixels outside the clip region.");
_addTest(function(canvas, ctx) {
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'copy';
ctx.rect(-20, -20, 10, 10);
ctx.clip();
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 50, 50);
_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
});
</script>

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.composite.clip.destination-atop</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">
<h1>2d.composite.clip.destination-atop</h1>
<p class="desc">fill() does not affect pixels outside the clip region.</p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("fill() does not affect pixels outside the clip region.");
_addTest(function(canvas, ctx) {
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'destination-atop';
ctx.rect(-20, -20, 10, 10);
ctx.clip();
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 50, 50);
_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
});
</script>

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.composite.clip.destination-in</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">
<h1>2d.composite.clip.destination-in</h1>
<p class="desc">fill() does not affect pixels outside the clip region.</p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("fill() does not affect pixels outside the clip region.");
_addTest(function(canvas, ctx) {
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'destination-in';
ctx.rect(-20, -20, 10, 10);
ctx.clip();
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 50, 50);
_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
});
</script>

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.composite.clip.destination-out</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">
<h1>2d.composite.clip.destination-out</h1>
<p class="desc">fill() does not affect pixels outside the clip region.</p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("fill() does not affect pixels outside the clip region.");
_addTest(function(canvas, ctx) {
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'destination-out';
ctx.rect(-20, -20, 10, 10);
ctx.clip();
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 50, 50);
_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
});
</script>

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.composite.clip.destination-over</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">
<h1>2d.composite.clip.destination-over</h1>
<p class="desc">fill() does not affect pixels outside the clip region.</p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("fill() does not affect pixels outside the clip region.");
_addTest(function(canvas, ctx) {
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'destination-over';
ctx.rect(-20, -20, 10, 10);
ctx.clip();
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 50, 50);
_assertPixel(canvas, 25,25, 0,255,0,255, "25,25", "0,255,0,255");
_assertPixel(canvas, 75,25, 0,255,0,255, "75,25", "0,255,0,255");
});
</script>

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