mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 7a767a52741f628430ffbbed46e7f3df68ba3534
Fixes #15648.
This commit is contained in:
parent
a1e4c547f0
commit
4fadf9b0b6
1184 changed files with 22551 additions and 9856 deletions
|
@ -1,29 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
|
||||
<title>Canvas test: toBlob.jpeg</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/canvas-tests.js"></script>
|
||||
<link rel="stylesheet" href="/common/canvas-tests.css">
|
||||
<body class="show_output">
|
||||
|
||||
<h1>toBlob.jpeg</h1>
|
||||
<p class="desc">toBlob with image/jpeg returns a JPEG Blob</p>
|
||||
|
||||
|
||||
<p class="output">Actual output:</p>
|
||||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
|
||||
|
||||
<ul id="d"></ul>
|
||||
<div id="log"></div>
|
||||
<canvas id="c"></canvas>
|
||||
<script>
|
||||
var t = async_test("toBlob with image/jpeg returns a JPEG Blob");
|
||||
_addTest(function(canvas, ctx) {
|
||||
|
||||
canvas.toBlob(function(data){
|
||||
_assertSame(data.type, "image/jpeg", "data.type", "\"image/jpeg\"");
|
||||
}, 'image/jpeg');
|
||||
|
||||
|
||||
});
|
||||
async_test(function() {
|
||||
on_event(window, "load", this.step_func(function() {
|
||||
var canvas = document.getElementById('c');
|
||||
var ctx = canvas.getContext('2d');
|
||||
canvas.toBlob(this.step_func_done(function(data) {
|
||||
assert_equals(data.type, "image/jpeg");
|
||||
}), 'image/jpeg');
|
||||
}));
|
||||
}, "toBlob with image/jpeg returns a JPEG Blob");
|
||||
</script>
|
||||
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>Canvas test: toBlob.null</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/canvas-tests.js"></script>
|
||||
<link rel="stylesheet" href="/common/canvas-tests.css">
|
||||
<body class="show_output">
|
||||
|
||||
<h1>toBlob.null</h1>
|
||||
<p class="desc">toBlob with zero dimension returns a null Blob</p>
|
||||
|
||||
<p class="output">Actual output:</p>
|
||||
<canvas id="c" class="output" width="100" height="0"><p class="fallback">FAIL (fallback content)</p></canvas>
|
||||
|
||||
<ul id="d"></ul>
|
||||
<script>
|
||||
async_test(function() {
|
||||
on_event(window, "load", this.step_func(function() {
|
||||
var toBlobCalled = false;
|
||||
c.toBlob(this.step_func(function(blob) {
|
||||
toBlobCalled = true;
|
||||
_assertSame(blob, null, "blob", "null");
|
||||
c.width = 0;
|
||||
c.height = 100;
|
||||
c.toBlob(this.step_func_done(function(blob) {
|
||||
_assertSame(blob, null, "blob", "null");
|
||||
}), 'image/jpeg');
|
||||
}), 'image/jpeg');
|
||||
assert_false(toBlobCalled, "toBlob callback shouldn't be called synchronously");
|
||||
}));
|
||||
}, "toBlob with zero dimension returns a null Blob");
|
||||
</script>
|
|
@ -1,29 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
|
||||
<title>Canvas test: toBlob.png</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/canvas-tests.js"></script>
|
||||
<link rel="stylesheet" href="/common/canvas-tests.css">
|
||||
<body class="show_output">
|
||||
|
||||
<h1>toBlob.png</h1>
|
||||
<p class="desc">toBlob with image/png returns a PNG Blob</p>
|
||||
|
||||
|
||||
<p class="output">Actual output:</p>
|
||||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
|
||||
|
||||
<ul id="d"></ul>
|
||||
<div id="log"></div>
|
||||
<canvas id="c"></canvas>
|
||||
<script>
|
||||
var t = async_test("toBlob with image/png returns a PNG Blob");
|
||||
_addTest(function(canvas, ctx) {
|
||||
|
||||
canvas.toBlob(function(data){
|
||||
_assertSame(data.type, "image/png", "data.type", "\"image/png\"");
|
||||
}, 'image/png');
|
||||
|
||||
|
||||
});
|
||||
async_test(function() {
|
||||
on_event(window, "load", this.step_func(function() {
|
||||
var canvas = document.getElementById('c');
|
||||
var ctx = canvas.getContext('2d');
|
||||
canvas.toBlob(this.step_func_done(function(data) {
|
||||
assert_equals(data.type, "image/png");
|
||||
}), 'image/png');
|
||||
}));
|
||||
}, "toBlob with image/png returns a PNG Blob");
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue