mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 08:35:26 +00:00
b3a448668a
--HG-- extra : rebase_source : 834c2d1c426a8f33b66ee60e3fef912d652d5f59
40 lines
1021 B
HTML
40 lines
1021 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Test for mozDashOffset</title>
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
</head>
|
|
<body>
|
|
<p id="display">
|
|
<canvas id="c" width="100" height="100"><p class="fallback">FAIL (fallback content)</p></canvas>
|
|
</p>
|
|
<div id="content" style="display: none">
|
|
</div>
|
|
<pre id="test">
|
|
<script>
|
|
try {
|
|
var canvas = document.getElementById('c');
|
|
var ctx = canvas.getContext('2d');
|
|
|
|
ctx.mozDash = [1, 1];
|
|
|
|
ctx.mozDashOffset = 1;
|
|
ctx.mozDashOffset = Infinity;
|
|
ok(ctx.mozDashOffset === 1, "ctx.mozDashOffset === 1");
|
|
|
|
ctx.mozDashOffset = 1;
|
|
ctx.mozDashOffset = -Infinity;
|
|
ok(ctx.mozDashOffset === 1, "ctx.mozDashOffset === 1");
|
|
|
|
ctx.mozDashOffset = 1;
|
|
ctx.mozDashOffset = NaN;
|
|
ok(ctx.mozDashOffset === 1, "ctx.mozDashOffset === 1");
|
|
} catch(e) {
|
|
ok(false, "unexpected exception thrown in: test_mozDashOffset.html");
|
|
}
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|