Bug 1018527 - test for clearRect API with input in double precision, r=jmuizelaar

This commit is contained in:
peter chang 2015-12-09 01:09:00 +01:00
parent b353fcb964
commit 206146e057

View File

@ -21536,6 +21536,20 @@ isPixel(ctx, 50,25, 0,255,0,255, 0);
</script>
<!-- [[[ test_2d.clearRect.testdoubleprecision.html ]]] -->
<p>Canvas test: 2d.clearRect.testdoubleprecision</p>
<canvas id="c690" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<script>
function test_2d_clearRect_testdoubleprecision() {
var canvas = document.getElementById('c690');
ctx = canvas.getContext('2d');
ctx.setTransform(1, 1, 1, 1, 0, 0);
ctx.clearRect(-1.79e+308, 0, 1.79e+308, 8);
}
</script>
<script>
function asyncTestsDone() {
@ -24835,7 +24849,13 @@ try {
} catch (e) {
ok(false, "unexpected exception thrown in: test_type_replace");
}
try {
test_2d_clearRect_testdoubleprecision();
} catch(e) {
throw e;
ok(false, "unexpected exception thrown in: test_2d_clearRect_testdoubleprecision");
}
//run the asynchronous tests
try {
test_2d_drawImage_animated_apng();