mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision e1edaa3dd1bea4415ee88e042affee32028d7f1d
This commit is contained in:
parent
0bd2661492
commit
0cb6acf9a2
4828 changed files with 87680 additions and 41620 deletions
|
@ -19,7 +19,7 @@
|
|||
var t = async_test("");
|
||||
_addTest(function(canvas, ctx) {
|
||||
|
||||
assert_throws(new TypeError(), function() { canvas.getContext(); });
|
||||
assert_throws_js(TypeError, function() { canvas.getContext(); });
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -34,10 +34,10 @@ t("transferControlToProxy", canvas);
|
|||
t("CanvasProxy", window);
|
||||
t("commit", canvas);
|
||||
test(function() {
|
||||
assert_throws(new TypeError(), function() {
|
||||
assert_throws_js(TypeError, function() {
|
||||
new CanvasRenderingContext2D();
|
||||
}, 'no arguments');
|
||||
assert_throws(new TypeError(), function() {
|
||||
assert_throws_js(TypeError, function() {
|
||||
new CanvasRenderingContext2D(1, 1);
|
||||
}, 'with arguments');
|
||||
}, "CanvasRenderingContext2D constructors");
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_throws("IndexSizeError", function() {
|
||||
assert_throws_dom("IndexSizeError", function() {
|
||||
new ImageData(0, 1);
|
||||
});
|
||||
}, "ImageData(w, h), width cannot be 0");
|
||||
|
||||
test(function() {
|
||||
assert_throws("IndexSizeError", function() {
|
||||
assert_throws_dom("IndexSizeError", function() {
|
||||
new ImageData(1, 0);
|
||||
});
|
||||
}, "ImageData(w, h), height cannot be 0");
|
||||
|
@ -25,25 +25,25 @@ test(function() {
|
|||
}, "ImageData(w, h), exposed attributes check");
|
||||
|
||||
test(function() {
|
||||
assert_throws("InvalidStateError", function() {
|
||||
assert_throws_dom("InvalidStateError", function() {
|
||||
new ImageData(new Uint8ClampedArray(3), 1);
|
||||
});
|
||||
}, "ImageData(buffer, w), the buffer size must be a multiple of 4");
|
||||
|
||||
test(function() {
|
||||
assert_throws("IndexSizeError", function() {
|
||||
assert_throws_dom("IndexSizeError", function() {
|
||||
new ImageData(new Uint8ClampedArray(16), 3);
|
||||
});
|
||||
}, "ImageData(buffer, w), buffer size must be a multiple of the image width");
|
||||
|
||||
test(function() {
|
||||
assert_throws("IndexSizeError", function() {
|
||||
assert_throws_dom("IndexSizeError", function() {
|
||||
new ImageData(new Uint8ClampedArray(16), 4, 3);
|
||||
});
|
||||
}, "ImageData(buffer, w, h), buffer.length == 4 * w * h must be true");
|
||||
|
||||
test(function() {
|
||||
assert_throws(new TypeError(), function() {
|
||||
assert_throws_js(TypeError, function() {
|
||||
new ImageData(new Int8Array(1), 1);
|
||||
});
|
||||
}, "ImageData(buffer, w, opt h), Uint8ClampedArray argument type check");
|
||||
|
|
|
@ -25,8 +25,8 @@ canvas2.height = 50;
|
|||
var ctx2 = canvas2.getContext('2d');
|
||||
ctx2.drawImage(document.getElementById('yellow.png'), 0, 0);
|
||||
ctx.drawImage(canvas2, 0, 0);
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -25,8 +25,8 @@ canvas2.height = 50;
|
|||
var ctx2 = canvas2.getContext('2d');
|
||||
ctx2.drawImage(document.getElementById('yellow.png'), 0, 0);
|
||||
ctx.drawImage(canvas2, 0, 0);
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -20,8 +20,8 @@ var t = async_test("drawImage of different-origin image makes the canvas origin-
|
|||
_addTest(function(canvas, ctx) {
|
||||
|
||||
ctx.drawImage(document.getElementById('yellow.png'), 0, 0);
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -20,8 +20,8 @@ var t = async_test("drawImage of different-origin image makes the canvas origin-
|
|||
_addTest(function(canvas, ctx) {
|
||||
|
||||
ctx.drawImage(document.getElementById('yellow.png'), 0, 0);
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -27,8 +27,8 @@ ctx2.drawImage(document.getElementById('yellow.png'), 0, 0);
|
|||
var p = ctx.createPattern(canvas2, 'repeat');
|
||||
ctx.fillStyle = p;
|
||||
ctx.fillStyle = 'red';
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -27,8 +27,8 @@ ctx2.drawImage(document.getElementById('yellow.png'), 0, 0);
|
|||
var p = ctx.createPattern(canvas2, 'repeat');
|
||||
ctx.fillStyle = p;
|
||||
ctx.fillStyle = 'red';
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -27,8 +27,8 @@ ctx2.drawImage(document.getElementById('yellow.png'), 0, 0);
|
|||
var p = ctx.createPattern(canvas2, 'repeat');
|
||||
ctx.strokeStyle = p;
|
||||
ctx.strokeStyle = 'red';
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -27,8 +27,8 @@ ctx2.drawImage(document.getElementById('yellow.png'), 0, 0);
|
|||
var p = ctx.createPattern(canvas2, 'repeat');
|
||||
ctx.strokeStyle = p;
|
||||
ctx.strokeStyle = 'red';
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -26,8 +26,8 @@ var ctx2 = canvas2.getContext('2d');
|
|||
var p = ctx2.createPattern(document.getElementById('yellow.png'), 'repeat');
|
||||
ctx.fillStyle = p;
|
||||
ctx.fillRect(0, 0, 100, 50);
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
canvas2.toDataURL();
|
||||
ctx2.getImageData(0, 0, 1, 1);
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ var ctx2 = canvas2.getContext('2d');
|
|||
var p = ctx2.createPattern(document.getElementById('yellow.png'), 'repeat');
|
||||
ctx.fillStyle = p;
|
||||
ctx.fillRect(0, 0, 100, 50);
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
canvas2.toDataURL();
|
||||
ctx2.getImageData(0, 0, 1, 1);
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ forEachCanvasSource(get_host_info().HTTP_REMOTE_ORIGIN,
|
|||
const pattern = ctx.createPattern(source, 'repeat');
|
||||
ctx.fillStyle = pattern;
|
||||
ctx.fillStyle = 'red';
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
});
|
||||
}, `${name}: Setting fillStyle to an origin-unclear pattern makes the canvas origin-unclean`);
|
||||
});
|
||||
|
|
|
@ -22,8 +22,8 @@ _addTest(function(canvas, ctx) {
|
|||
var p = ctx.createPattern(document.getElementById('yellow.png'), 'repeat');
|
||||
ctx.fillStyle = p;
|
||||
ctx.fillStyle = 'red';
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -22,8 +22,8 @@ _addTest(function(canvas, ctx) {
|
|||
var p = ctx.createPattern(document.getElementById('yellow.png'), 'repeat');
|
||||
ctx.fillStyle = p;
|
||||
ctx.fillStyle = 'red';
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -22,8 +22,8 @@ _addTest(function(canvas, ctx) {
|
|||
var p = ctx.createPattern(document.getElementById('yellow.png'), 'repeat');
|
||||
ctx.strokeStyle = p;
|
||||
ctx.strokeStyle = 'red';
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -22,8 +22,8 @@ _addTest(function(canvas, ctx) {
|
|||
var p = ctx.createPattern(document.getElementById('yellow.png'), 'repeat');
|
||||
ctx.strokeStyle = p;
|
||||
ctx.strokeStyle = 'red';
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); });
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -21,7 +21,7 @@ _addTest(function(canvas, ctx) {
|
|||
|
||||
canvas.width = 50;
|
||||
ctx.drawImage(document.getElementById('yellow.png'), 0, 0);
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
canvas.width = 100;
|
||||
canvas.toDataURL();
|
||||
ctx.getImageData(0, 0, 1, 1);
|
||||
|
|
|
@ -21,7 +21,7 @@ _addTest(function(canvas, ctx) {
|
|||
|
||||
canvas.width = 50;
|
||||
ctx.drawImage(document.getElementById('yellow.png'), 0, 0);
|
||||
assert_throws("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); });
|
||||
canvas.width = 100;
|
||||
canvas.toDataURL();
|
||||
ctx.getImageData(0, 0, 1, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue