Bug 1281800 - Add wpt for fillText() in Canvas. r=jmuizelaar, Ms2ger

---
 .../2d.text.draw.fill.maxWidth.negative.html.ini   |  5 ----
 .../2d.text.draw.fill.maxWidth.zero.html.ini       |  5 ----
 testing/web-platform/meta/MANIFEST.json            |  6 ++++
 .../2d.text.draw.fill.maxWidth.NaN.html            | 32 ++++++++++++++++++++++
 .../tests/2dcontext/tools/tests2dtext.yaml         | 13 +++++++++
 5 files changed, 51 insertions(+), 10 deletions(-)
 delete mode 100644 testing/web-platform/meta/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.negative.html.ini
 delete mode 100644 testing/web-platform/meta/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.zero.html.ini
 create mode 100644 testing/web-platform/tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.NaN.html
This commit is contained in:
vincentliu 2016-07-19 10:53:51 +08:00
Родитель acbc420513
Коммит a16e34101b
5 изменённых файлов: 51 добавлений и 10 удалений

Просмотреть файл

@ -1,5 +0,0 @@
[2d.text.draw.fill.maxWidth.negative.html]
type: testharness
[fillText handles maxWidth correctly]
expected: FAIL

Просмотреть файл

@ -1,5 +0,0 @@
[2d.text.draw.fill.maxWidth.zero.html]
type: testharness
[fillText handles maxWidth correctly]
expected: FAIL

Просмотреть файл

@ -36097,6 +36097,12 @@
"deleted_reftests": {}, "deleted_reftests": {},
"items": { "items": {
"testharness": { "testharness": {
"2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.NaN.html": [
{
"path": "2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.NaN.html",
"url": "/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.NaN.html"
}
],
"WebCryptoAPI/generateKey/failures_AES-CBC.worker.js": [ "WebCryptoAPI/generateKey/failures_AES-CBC.worker.js": [
{ {
"path": "WebCryptoAPI/generateKey/failures_AES-CBC.worker.js", "path": "WebCryptoAPI/generateKey/failures_AES-CBC.worker.js",

Просмотреть файл

@ -0,0 +1,32 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.text.draw.fill.maxWidth.NaN</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>2d.text.draw.fill.maxWidth.NaN</h1>
<p class="desc">fillText handles maxWidth correctly</p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("fillText handles maxWidth correctly");
_addTest(function(canvas, ctx) {
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
ctx.fillStyle = '#f00';
ctx.font = '35px Arial, sans-serif';
ctx.fillText('fail fail fail fail fail', 5, 35, NaN);
_assertGreen(ctx, 100, 50);
});
</script>

Просмотреть файл

@ -320,6 +320,19 @@
_assertGreen(ctx, 100, 50); _assertGreen(ctx, 100, 50);
expected: green expected: green
- name: 2d.text.draw.fill.maxWidth.NaN
desc: fillText handles maxWidth correctly
testing:
- 2d.text.draw.maxwidth
code: |
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
ctx.fillStyle = '#f00';
ctx.font = '35px Arial, sans-serif';
ctx.fillText('fail fail fail fail fail', 5, 35, NaN);
_assertGreen(ctx, 100, 50);
expected: green
- name: 2d.text.draw.stroke.basic - name: 2d.text.draw.stroke.basic
desc: strokeText draws stroked text desc: strokeText draws stroked text
manual: manual: