mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 800556; test for mozDashOffset errors; r=Ms2ger
--HG-- extra : rebase_source : 834c2d1c426a8f33b66ee60e3fef912d652d5f59
This commit is contained in:
parent
b75eec07c3
commit
6d44a38ee5
@ -60,6 +60,7 @@ MOCHITEST_FILES = \
|
||||
test_bug764125.html \
|
||||
test_drawImage_edge_cases.html \
|
||||
test_drawImage_document_domain.html \
|
||||
test_mozDashOffset.html \
|
||||
file_drawImage_document_domain.html \
|
||||
$(NULL)
|
||||
|
||||
|
39
content/canvas/test/test_mozDashOffset.html
Normal file
39
content/canvas/test/test_mozDashOffset.html
Normal file
@ -0,0 +1,39 @@
|
||||
<!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>
|
Loading…
Reference in New Issue
Block a user