blob: fb3d358bd28d842cb9801163fb4f6d4e1901cfc3 [file] [log] [blame]
<!DOCTYPE html>
<title>Canvas test: size.attributes.default</title>
<meta name="author" content="Philip Taylor">
<script src="../common/canvas-tests.js"></script>
<link rel="stylesheet" href="../common/canvas-tests.css">
<body class="show_output">
<h1><a href="index.size.html">size</a>.<a href="index.size.attributes.html">attributes</a>.default</h1>
<p class="desc">Default width/height when attributes are missing</p>
<div class="refs">Spec references:
<ul>
<li><a href="../annotated-spec/canvas.html#testrefs.size.default">size.default</a>
<li><a href="../annotated-spec/canvas.html#testrefs.size.missing">size.missing</a>
</ul>
</div>
<p class="output">Actual output:</p>
<canvas id="c" class="output" ><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="resources/size.attributes.default.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
_addTest(function(canvas, ctx) {
_assertSame(canvas.width, 300, "canvas.width", "300");
_assertSame(canvas.height, 150, "canvas.height", "150");
_assert(!canvas.hasAttribute('width'), "!canvas.hasAttribute('width')");
_assert(!canvas.hasAttribute('height'), "!canvas.hasAttribute('height')");
});
</script>