mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e
This commit is contained in:
parent
81ca858678
commit
d6ba94ca28
2339 changed files with 89274 additions and 9328 deletions
|
@ -23,9 +23,9 @@ function consumeImageBitmap(image, t)
|
|||
|
||||
createImageBitmap(myCanvas).then(t.step_func_done(function(imageBitmap) {
|
||||
// Per spec, when transferFromImageBitmap happens, the transferred
|
||||
// ImageBitmap (|image| here) should be the intrinsic size of
|
||||
// ImageBitmap (|image| here) must determine the intrinsic size of
|
||||
// myCanvas, and hence myCanvas.width/height is ignored. Therefore,
|
||||
// this created |imageBitmap| should have the same size as the |image|.
|
||||
// |imageBitmap| should have the same size as the |image|.
|
||||
assert_equals(imageBitmap.width, width);
|
||||
assert_equals(imageBitmap.height, height);
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ promise_test(function() {
|
|||
var ctx = srcCanvas.getContext('2d');
|
||||
ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
|
||||
ctx.fillRect(0, 0, width, height);
|
||||
createImageBitmap(srcCanvas).then(function(image) {
|
||||
return createImageBitmap(srcCanvas).then(function(image) {
|
||||
consumeImageBitmap(image, 'false', 0, 127, 0, 255);
|
||||
});
|
||||
}, "Test that an ImageBitmapRenderingContext with alpha disabled makes the canvas opaque");
|
||||
|
@ -55,7 +55,7 @@ promise_test(function() {
|
|||
var ctx = srcCanvas.getContext('2d');
|
||||
ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
|
||||
ctx.fillRect(0, 0, width, height);
|
||||
createImageBitmap(srcCanvas).then(function(image) {
|
||||
return createImageBitmap(srcCanvas).then(function(image) {
|
||||
consumeImageBitmap(image, 'true', 0, 255, 0, 127);
|
||||
});
|
||||
}, "Test that an ImageBitmapRenderingContext with alpha enabled preserves the alpha");
|
||||
|
@ -67,7 +67,7 @@ promise_test(function() {
|
|||
var ctx = srcCanvas.getContext('2d');
|
||||
ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
|
||||
ctx.fillRect(0, 0, width, height);
|
||||
createImageBitmap(srcCanvas).then(function(image) {
|
||||
return createImageBitmap(srcCanvas).then(function(image) {
|
||||
consumeImageBitmap(image, '', 0, 255, 0, 127);
|
||||
});
|
||||
}, "Test that the 'alpha' context creation attribute is true by default");
|
||||
|
|
|
@ -28,7 +28,7 @@ promise_test(function() {
|
|||
var ctx = srcCanvas.getContext('2d');
|
||||
ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
|
||||
ctx.fillRect(0, 0, width, height);
|
||||
createImageBitmap(srcCanvas).then(testException);
|
||||
return createImageBitmap(srcCanvas).then(testException);
|
||||
}, "Test transferFromImageBitmap(image) with a detached image should throw InvalidStateError");
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue