Backing out more stuff to try to fix test failure

This commit is contained in:
Robert O'Callahan 2010-03-04 17:50:01 +13:00
commit 0690ce49ba

View File

@ -3970,7 +3970,7 @@ var canvas = document.getElementById('c138');
var ctx = canvas.getContext('2d');
ctx.fillStyle = 'rgba(255,255,255,0.45)';
ok(/^rgba\(255, 255, 255, 0\.4\d+\)$/.test(ctx.fillStyle), "ctx.fillStyle =~ /^rgba\\(255, 255, 255, 0\\.4\\d+\\)$/");
ok(ctx.fillStyle =~ /^rgba\(255, 255, 255, 0\.4\d+\)$/, "ctx.fillStyle =~ /^rgba\\(255, 255, 255, 0\\.4\\d+\\)$/");
}
@ -5411,7 +5411,7 @@ var ctx = canvas.getContext('2d');
ctx.fillStyle = '#f00';
ctx.fillStyle = 'ThreeDDarkShadow';
ok(/^#(?!(FF0000|ff0000|f00)$)/.test(ctx.fillStyle), "ctx.fillStyle =~ /^#(?!(FF0000|ff0000|f00)$)/"); // test that it's not red
ok(ctx.fillStyle =~ /^#(?!(FF0000|ff0000|f00)$)/, "ctx.fillStyle =~ /^#(?!(FF0000|ff0000|f00)$)/"); // test that it's not red
}
@ -7958,13 +7958,13 @@ var ctx = canvas.getContext('2d');
var _thrown = undefined; try {
ctx.getImageData(1, 1, 10, 0);
} catch (e) { _thrown = e }; ok(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
var _thrown = undefined; try {
ctx.getImageData(1, 1, 0, 10);
} catch (e) { _thrown = e }; ok(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
var _thrown = undefined; try {
ctx.getImageData(1, 1, 0, 0);
} catch (e) { _thrown = e }; ok(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.INDEX_SIZE_ERR, "should throw INDEX_SIZE_ERR");
}
@ -7986,31 +7986,31 @@ var imgdata = ctx.getImageData(0, 0, 10, 10);
imgdata.data[0] = 100;
imgdata.data[0] = 300;
ok(imgdata.data[0] === 255, "imgdata.data[\""+(0)+"\"] === 255");
todo(imgdata.data[0] === 255, "imgdata.data[\""+(0)+"\"] === 255");
imgdata.data[0] = 100;
imgdata.data[0] = -100;
ok(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
todo(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
imgdata.data[0] = 100;
imgdata.data[0] = 200+Math.pow(2, 32);
ok(imgdata.data[0] === 255, "imgdata.data[\""+(0)+"\"] === 255");
todo(imgdata.data[0] === 255, "imgdata.data[\""+(0)+"\"] === 255");
imgdata.data[0] = 100;
imgdata.data[0] = -200-Math.pow(2, 32);
ok(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
todo(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
imgdata.data[0] = 100;
imgdata.data[0] = Math.pow(10, 39);
ok(imgdata.data[0] === 255, "imgdata.data[\""+(0)+"\"] === 255");
todo(imgdata.data[0] === 255, "imgdata.data[\""+(0)+"\"] === 255");
imgdata.data[0] = 100;
imgdata.data[0] = -Math.pow(10, 39);
ok(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
todo(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
imgdata.data[0] = 100;
imgdata.data[0] = -Infinity;
ok(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
todo(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
imgdata.data[0] = 100;
imgdata.data[0] = Infinity;
ok(imgdata.data[0] === 255, "imgdata.data[\""+(0)+"\"] === 255");
todo(imgdata.data[0] === 255, "imgdata.data[\""+(0)+"\"] === 255");
}
@ -8052,10 +8052,10 @@ var ctx = canvas.getContext('2d');
var imgdata = ctx.getImageData(0, 0, 10, 10);
imgdata.data[0] = 100;
imgdata.data[0] = NaN;
ok(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
todo(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
imgdata.data[0] = 100;
imgdata.data[0] = "cheese";
ok(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
todo(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
}
@ -8101,13 +8101,13 @@ var d = imgdata.data;
imgdata.width = 123;
imgdata.height = 123;
imgdata.data = [100,100,100,100];
ok(imgdata.width === w, "imgdata.width === w");
ok(imgdata.height === h, "imgdata.height === h");
ok(imgdata.data === d, "imgdata.data === d");
ok(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
ok(imgdata.data[1] === 0, "imgdata.data[\""+(1)+"\"] === 0");
ok(imgdata.data[2] === 0, "imgdata.data[\""+(2)+"\"] === 0");
ok(imgdata.data[3] === 0, "imgdata.data[\""+(3)+"\"] === 0");
todo(imgdata.width === w, "imgdata.width === w");
todo(imgdata.height === h, "imgdata.height === h");
todo(imgdata.data === d, "imgdata.data === d");
todo(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
todo(imgdata.data[1] === 0, "imgdata.data[\""+(1)+"\"] === 0");
todo(imgdata.data[2] === 0, "imgdata.data[\""+(2)+"\"] === 0");
todo(imgdata.data[3] === 0, "imgdata.data[\""+(3)+"\"] === 0");
}
@ -8127,27 +8127,27 @@ var ctx = canvas.getContext('2d');
var imgdata = ctx.getImageData(0, 0, 10, 10);
imgdata.data[0] = 0.499;
ok(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
todo(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
imgdata.data[0] = 0.5;
ok(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
todo(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
imgdata.data[0] = 0.501;
ok(imgdata.data[0] === 1, "imgdata.data[\""+(0)+"\"] === 1");
todo(imgdata.data[0] === 1, "imgdata.data[\""+(0)+"\"] === 1");
imgdata.data[0] = 1.499;
ok(imgdata.data[0] === 1, "imgdata.data[\""+(0)+"\"] === 1");
todo(imgdata.data[0] === 1, "imgdata.data[\""+(0)+"\"] === 1");
imgdata.data[0] = 1.5;
ok(imgdata.data[0] === 2, "imgdata.data[\""+(0)+"\"] === 2");
todo(imgdata.data[0] === 2, "imgdata.data[\""+(0)+"\"] === 2");
imgdata.data[0] = 1.501;
ok(imgdata.data[0] === 2, "imgdata.data[\""+(0)+"\"] === 2");
todo(imgdata.data[0] === 2, "imgdata.data[\""+(0)+"\"] === 2");
imgdata.data[0] = 2.5;
ok(imgdata.data[0] === 2, "imgdata.data[\""+(0)+"\"] === 2");
todo(imgdata.data[0] === 2, "imgdata.data[\""+(0)+"\"] === 2");
imgdata.data[0] = 3.5;
ok(imgdata.data[0] === 4, "imgdata.data[\""+(0)+"\"] === 4");
todo(imgdata.data[0] === 4, "imgdata.data[\""+(0)+"\"] === 4");
imgdata.data[0] = 252.5;
ok(imgdata.data[0] === 252, "imgdata.data[\""+(0)+"\"] === 252");
todo(imgdata.data[0] === 252, "imgdata.data[\""+(0)+"\"] === 252");
imgdata.data[0] = 253.5;
ok(imgdata.data[0] === 254, "imgdata.data[\""+(0)+"\"] === 254");
todo(imgdata.data[0] === 254, "imgdata.data[\""+(0)+"\"] === 254");
imgdata.data[0] = 254.5;
ok(imgdata.data[0] === 254, "imgdata.data[\""+(0)+"\"] === 254");
todo(imgdata.data[0] === 254, "imgdata.data[\""+(0)+"\"] === 254");
}
@ -8190,13 +8190,13 @@ var ctx = canvas.getContext('2d');
var imgdata = ctx.getImageData(0, 0, 10, 10);
imgdata.data[0] = 100;
imgdata.data[0] = "110";
ok(imgdata.data[0] === 110, "imgdata.data[\""+(0)+"\"] === 110");
todo(imgdata.data[0] === 110, "imgdata.data[\""+(0)+"\"] === 110");
imgdata.data[0] = 100;
imgdata.data[0] = "0x78";
ok(imgdata.data[0] === 120, "imgdata.data[\""+(0)+"\"] === 120");
todo(imgdata.data[0] === 120, "imgdata.data[\""+(0)+"\"] === 120");
imgdata.data[0] = 100;
imgdata.data[0] = " +130e0 ";
ok(imgdata.data[0] === 130, "imgdata.data[\""+(0)+"\"] === 130");
todo(imgdata.data[0] === 130, "imgdata.data[\""+(0)+"\"] === 130");
}
@ -8217,7 +8217,7 @@ var ctx = canvas.getContext('2d');
var imgdata = ctx.getImageData(0, 0, 10, 10);
imgdata.data[0] = 100;
imgdata.data[0] = undefined;
ok(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
todo(imgdata.data[0] === 0, "imgdata.data[\""+(0)+"\"] === 0");
}
@ -8871,7 +8871,7 @@ var ctx = canvas.getContext('2d');
var _thrown = undefined; try {
ctx.putImageData(null, 0, 0);
} catch (e) { _thrown = e }; ok(_thrown && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TYPE_MISMATCH_ERR");
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TYPE_MISMATCH_ERR");
}
@ -8986,10 +8986,10 @@ var _thrown = undefined; try {
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TYPE_MISMATCH_ERR");
var _thrown = undefined; try {
ctx.putImageData("cheese", 0, 0);
} catch (e) { _thrown = e }; ok(_thrown && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TYPE_MISMATCH_ERR");
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TYPE_MISMATCH_ERR");
var _thrown = undefined; try {
ctx.putImageData(42, 0, 0);
} catch (e) { _thrown = e }; ok(_thrown && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TYPE_MISMATCH_ERR");
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TYPE_MISMATCH_ERR");
}
@ -20461,7 +20461,7 @@ var _thrown_outer = false;
try {
var data = canvas.toDataURL('image/png', 'another argument that should not raise an exception');
ok(/^data:image\/png[;,]/.test(data), "data =~ /^data:image\\/png[;,]/");
ok(data =~ /^data:image\/png[;,]/, "data =~ /^data:image\\/png[;,]/");
} catch (e) {
_thrown_outer = true;
@ -20488,7 +20488,7 @@ var _thrown_outer = false;
try {
var data = canvas.toDataURL('image/png', 'another argument that should not raise an exception', 'and another');
ok(/^data:image\/png[;,]/.test(data), "data =~ /^data:image\\/png[;,]/");
ok(data =~ /^data:image\/png[;,]/, "data =~ /^data:image\\/png[;,]/");
} catch (e) {
_thrown_outer = true;
@ -20516,7 +20516,7 @@ try {
// More arguments that should not raise exceptions
var data = canvas.toDataURL('image/png', null, null, null);
ok(/^data:image\/png[;,]/.test(data), "data =~ /^data:image\\/png[;,]/");
ok(data =~ /^data:image\/png[;,]/, "data =~ /^data:image\\/png[;,]/");
} catch (e) {
_thrown_outer = true;
@ -20580,7 +20580,7 @@ var canvas = document.getElementById('c668');
var ctx = canvas.getContext('2d');
var data = canvas.toDataURL();
ok(/^data:image\/png[;,]/.test(data), "data =~ /^data:image\\/png[;,]/");
ok(data =~ /^data:image\/png[;,]/, "data =~ /^data:image\\/png[;,]/");
}
@ -20602,7 +20602,7 @@ var _thrown_outer = false;
try {
var data = canvas.toDataURL('ImAgE/PnG');
ok(/^data:image\/png[;,]/.test(data), "data =~ /^data:image\\/png[;,]/");
ok(data =~ /^data:image\/png[;,]/, "data =~ /^data:image\\/png[;,]/");
} catch (e) {
_thrown_outer = true;
@ -20626,9 +20626,8 @@ var canvas = document.getElementById('c670');
var ctx = canvas.getContext('2d');
var canvas2 = document.createElement('canvas');
var data = canvas2.toDataURL();
ok(/^data:image\/png[;,]/.test(data), "data =~ /^data:image\\/png[;,]/");
ok(data =~ /^data:image\/png[;,]/, "data =~ /^data:image\\/png[;,]/");
}
@ -20647,7 +20646,7 @@ var canvas = document.getElementById('c671');
var ctx = canvas.getContext('2d');
var data = canvas.toDataURL('image/png');
ok(/^data:image\/png[;,]/.test(data), "data =~ /^data:image\\/png[;,]/");
ok(data =~ /^data:image\/png[;,]/, "data =~ /^data:image\\/png[;,]/");
}
@ -20710,7 +20709,7 @@ var _thrown_outer = false;
try {
var data = canvas.toDataURL('image/example');
ok(/^data:image\/png[;,]/.test(data), "data =~ /^data:image\\/png[;,]/");
ok(data =~ /^data:image\/png[;,]/, "data =~ /^data:image\\/png[;,]/");
} catch (e) {
_thrown_outer = true;