Submit the remaining 2dcontext reftests to wpt.

This commit is contained in:
Ms2ger 2015-05-16 15:25:15 +02:00
parent 3934831da3
commit 391417cb44
6 changed files with 4758 additions and 31 deletions

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset=utf-8>
<link rel=match href=lineto_ref.html>
<style>
html, body {
margin: 0;
padding: 0;
}
</style>
<canvas id="c" width="150" height="150" >
Your browser does not support the HTML5 canvas tag.</canvas>
<script>
var c = document.getElementById("c");
var ctx = c.getContext("2d");
ctx.beginPath();
ctx.moveTo(20, 20);
ctx.lineTo(20, 130);
ctx.lineTo(130, 130);
ctx.lineTo(130, 20);
ctx.closePath();
ctx.fillStyle = '#90EE90';
ctx.fill();
</script>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset=utf-8>
<style>
html, body {
margin: 0;
padding: 0;
}
div {
background: #90EE90;
width: 110px;
height: 110px;
margin: 20px;
}
</style>
<div></div>

View file

@ -0,0 +1,22 @@
<!doctype html>
<meta charset=utf-8>
<link rel=match href=transform_ref.html>
<style>
html, body {
margin: 0;
}
</style>
<canvas id=c width=400 height=300></canvas>
<script>
var canvas = document.getElementById('c');
var ctx = canvas.getContext('2d');
ctx.scale(3, 3);
ctx.fillStyle = 'rgb(255, 0, 0)';
ctx.beginPath();
ctx.moveTo(10, 10);
ctx.bezierCurveTo(10, 10, 20, 10, 20, 10);
ctx.bezierCurveTo(20, 10, 20, 20, 20, 20);
ctx.bezierCurveTo(20, 20, 10, 20, 10, 20);
ctx.closePath();
ctx.fill();
</script>

View file

@ -0,0 +1,16 @@
<!doctype html>
<meta charset=utf-8>
<style>
html, body {
margin: 0;
}
section {
position: absolute;
background: rgb(255, 0, 0);
width: 30px;
height: 30px;
top: 30px;
left: 30px;
}
</style>
<section></section>