Backing out more stuff to try to fix test failure
authorRobert O'Callahan <robert@ocallahan.org>
Thu, 04 Mar 2010 17:50:01 +1300
changeset 38919 1f69995e7968bca0a62603877139d25b8552d63f
parent 38917 a571c7103224224bafa824bdba5c4c2245afee69 (current diff)
parent 38918 8a2cc715362cb1ac5a88895c3d699d996a03e566 (diff)
child 38921 e99cd091fdf0d43880eeba3f992268b06affd5ca
push id11937
push userrocallahan@mozilla.com
push dateThu, 04 Mar 2010 04:51:19 +0000
treeherderautoland@e99cd091fdf0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.3a3pre
Backing out more stuff to try to fix test failure
--- a/content/canvas/test/test_canvas.html
+++ b/content/canvas/test/test_canvas.html
@@ -3965,17 +3965,17 @@ ok(ctx.fillStyle == '#000000', "ctx.fill
 <script>
 
 function test_2d_fillStyle_get_semitransparent() {
 
 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+\\)$/");
 
 
 }
 </script>
 
 <!-- [[[ test_2d.fillStyle.get.solid.html ]]] -->
 
 <p>Canvas test: 2d.fillStyle.get.solid</p>
@@ -5406,17 +5406,17 @@ isPixel(ctx, 50,25, 128,128,128,255, 0);
 function test_2d_fillStyle_parse_system() {
 
 var canvas = document.getElementById('c203');
 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
 
 
 }
 </script>
 
 <!-- [[[ test_2d.fillStyle.parse.transparent-1.html ]]] -->
 
 <p>Canvas test: 2d.fillStyle.parse.transparent-1</p>
@@ -7953,23 +7953,23 @@ isPixel(ctx, 75,25, 0,255,0,255, 2);
 
 function test_2d_imageData_get_zero() {
 
 var canvas = document.getElementById('c278');
 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");
 
 
 }
 </script>
 
 <!-- [[[ test_2d.imageData.object.clamp.html ]]] -->
 
 <p>Canvas test: 2d.imageData.object.clamp</p>
@@ -7981,41 +7981,41 @@ function test_2d_imageData_object_clamp(
 
 var canvas = document.getElementById('c279');
 var ctx = canvas.getContext('2d');
 
 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");
 
 
 }
 </script>
 
 <!-- [[[ test_2d.imageData.object.ctor.html ]]] -->
 
 <p>Canvas test: 2d.imageData.object.ctor</p>
@@ -8047,20 +8047,20 @@ try { var _thrown = false;
 function test_2d_imageData_object_nan() {
 
 var canvas = document.getElementById('c281');
 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");
 
 
 }
 </script>
 
 <!-- [[[ test_2d.imageData.object.properties.html ]]] -->
 
 <p>Canvas test: 2d.imageData.object.properties</p>
@@ -8096,23 +8096,23 @@ var ctx = canvas.getContext('2d');
 
 var imgdata = ctx.getImageData(0, 0, 10, 10);
 var w = imgdata.width;
 var h = imgdata.height;
 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");
 
 
 }
 </script>
 
 <!-- [[[ test_2d.imageData.object.round.html ]]] -->
 
 <p>Canvas test: 2d.imageData.object.round</p>
@@ -8122,37 +8122,37 @@ ok(imgdata.data[3] === 0, "imgdata.data[
 
 function test_2d_imageData_object_round() {
 
 var canvas = document.getElementById('c284');
 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");
 
 
 }
 </script>
 
 <!-- [[[ test_2d.imageData.object.set.html ]]] -->
 
 <p>Canvas test: 2d.imageData.object.set</p>
@@ -8185,23 +8185,23 @@ ok(imgdata.data[0] === 200, "imgdata.dat
 function test_2d_imageData_object_string() {
 
 var canvas = document.getElementById('c286');
 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");
 
 
 }
 </script>
 
 <!-- [[[ test_2d.imageData.object.undefined.html ]]] -->
 
 <p>Canvas test: 2d.imageData.object.undefined</p>
@@ -8212,17 +8212,17 @@ ok(imgdata.data[0] === 130, "imgdata.dat
 function test_2d_imageData_object_undefined() {
 
 var canvas = document.getElementById('c287');
 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");
 
 
 }
 </script>
 
 <!-- [[[ test_2d.imageData.put.alpha.html ]]] -->
 
 <p>Canvas test: 2d.imageData.put.alpha</p>
@@ -8866,17 +8866,17 @@ var _thrown = undefined; try {
 
 function test_2d_imageData_put_null() {
 
 var canvas = document.getElementById('c300');
 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");
 
 
 }
 </script>
 
 <!-- [[[ test_2d.imageData.put.path.html ]]] -->
 
 <p>Canvas test: 2d.imageData.put.path</p>
@@ -8981,20 +8981,20 @@ var canvas = document.getElementById('c3
 var ctx = canvas.getContext('2d');
 
 var imgdata = { width: 1, height: 1, data: [255, 0, 0, 255] };
 var _thrown = undefined; try {
   ctx.putImageData(imgdata, 0, 0);
 } 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");
 
 
 }
 </script>
 
 <!-- [[[ test_2d.line.cap.butt.html ]]] -->
 
 <p>Canvas test: 2d.line.cap.butt</p>
@@ -20456,17 +20456,17 @@ function test_toDataURL_arguments_1() {
 
 var canvas = document.getElementById('c664');
 var ctx = canvas.getContext('2d');
 
 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;
 }
 todo(!_thrown_outer, 'should not throw exception');
 
 
 }
@@ -20483,17 +20483,17 @@ function test_toDataURL_arguments_2() {
 
 var canvas = document.getElementById('c665');
 var ctx = canvas.getContext('2d');
 
 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;
 }
 todo(!_thrown_outer, 'should not throw exception');
 
 
 }
@@ -20511,17 +20511,17 @@ function test_toDataURL_arguments_3() {
 var canvas = document.getElementById('c666');
 var ctx = canvas.getContext('2d');
 
 var _thrown_outer = false;
 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;
 }
 todo(!_thrown_outer, 'should not throw exception');
 
 
 }
@@ -20575,17 +20575,17 @@ img.src = canvas667.toDataURL();
 <script>
 
 function test_toDataURL_default() {
 
 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[;,]/");
 
 
 }
 </script>
 
 <!-- [[[ test_toDataURL.lowercase.html ]]] -->
 
 <p>Canvas test: toDataURL.lowercase - bug 401795</p>
@@ -20597,17 +20597,17 @@ function test_toDataURL_lowercase() {
 
 var canvas = document.getElementById('c669');
 var ctx = canvas.getContext('2d');
 
 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;
 }
 todo(!_thrown_outer, 'should not throw exception');
 
 
 }
@@ -20621,19 +20621,18 @@ todo(!_thrown_outer, 'should not throw e
 <script>
 
 function test_toDataURL_nocontext() {
 
 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[;,]/");
 
 
 }
 </script>
 
 <!-- [[[ test_toDataURL.png.html ]]] -->
 
 <p>Canvas test: toDataURL.png</p>
@@ -20642,17 +20641,17 @@ ok(/^data:image\/png[;,]/.test(data), "d
 <script>
 
 function test_toDataURL_png() {
 
 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[;,]/");
 
 
 }
 </script>
 
 <!-- [[[ test_toDataURL.primarycolours.html ]]] -->
 
 <p>Canvas test: toDataURL.primarycolours</p>
@@ -20705,17 +20704,17 @@ function test_toDataURL_unrecognised() {
 
 var canvas = document.getElementById('c673');
 var ctx = canvas.getContext('2d');
 
 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;
 }
 todo(!_thrown_outer, 'should not throw exception');
 
 
 }