servo/tests/wpt/web-platform-tests/offscreen-canvas/text/2d.text.draw.fill.maxWidth.large-manual.html

28 lines
773 B
HTML

<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.text.draw.fill.maxWidth.large</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<h1>2d.text.draw.fill.maxWidth.large</h1>
<p class="desc">fillText handles maxWidth correctly</p>
<script>
var t = async_test("fillText handles maxWidth correctly");
t.step(function() {
var offscreenCanvas = new OffscreenCanvas(100, 50);
var ctx = offscreenCanvas.getContext('2d');
ctx.fillStyle = '#000';
ctx.fillRect(0, 0, 100, 50);
ctx.fillStyle = '#0f0';
ctx.font = '35px Arial, sans-serif';
ctx.fillText('PASS', 5, 35, 200);
t.done();
});
</script>