blob: cbf7cebc8bfa7068960c8a410c57f3a9b212d707 [file] [log] [blame]
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.line.cap.invalid</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<h1>2d.line.cap.invalid</h1>
<p class="desc">Setting lineCap to invalid values is ignored</p>
<script>
var t = async_test("Setting lineCap to invalid values is ignored");
t.step(function() {
var offscreenCanvas = new OffscreenCanvas(100, 50);
var ctx = offscreenCanvas.getContext('2d');
ctx.lineCap = 'butt'
_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
ctx.lineCap = 'butt';
ctx.lineCap = 'invalid';
_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
ctx.lineCap = 'butt';
ctx.lineCap = 'ROUND';
_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
ctx.lineCap = 'butt';
ctx.lineCap = 'round\0';
_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
ctx.lineCap = 'butt';
ctx.lineCap = 'round ';
_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
ctx.lineCap = 'butt';
ctx.lineCap = "";
_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
ctx.lineCap = 'butt';
ctx.lineCap = 'bevel';
_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
t.done();
});
</script>