1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/canvas/test/test_bug764125.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,36 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=764125 1.8 + 1.9 +Test the correct behaviour for isPointInPath in the presence of multiple transforms, 1.10 +where only one tranform ought to be applied. 1.11 +--> 1.12 +<head> 1.13 + <title>Test for Bug 764125</title> 1.14 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.15 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.16 +</head> 1.17 +<body> 1.18 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=764125">Mozilla Bug 764125</a> 1.19 +<p id="display"></p> 1.20 +<div id="content" style="display: none"> 1.21 + 1.22 +</div> 1.23 +<pre id="test"> 1.24 +<script> 1.25 +/** Test for Bug 764125 **/ 1.26 + 1.27 +var c = document.createElement("canvas"); 1.28 + 1.29 +var ctx = c.getContext("2d"); 1.30 +ctx.translate(50, 0); 1.31 +ctx.rect(50, 0, 20, 20); 1.32 +ctx.translate(0, 50); 1.33 +ok(ctx.isPointInPath(60, 10) === false, "ctx.isPointInPath(60, 10) === false"); 1.34 +ok(ctx.isPointInPath(110, 10) === true, "ctx.isPointInPath(110, 10) === true"); 1.35 +ok(ctx.isPointInPath(110, 60) === false, "ctx.isPointInPath(110, 60) === false"); 1.36 +</script> 1.37 +</pre> 1.38 +</body> 1.39 +</html>