mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
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:
parent
acbc420513
commit
a16e34101b
@ -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": {},
|
||||
"items": {
|
||||
"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": [
|
||||
{
|
||||
"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);
|
||||
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
|
||||
desc: strokeText draws stroked text
|
||||
manual:
|
||||
|
Loading…
Reference in New Issue
Block a user