Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
1 <!DOCTYPE html>
2 <!--
3 Any copyright is dedicated to the Public Domain.
4 http://creativecommons.org/licenses/publicdomain/
6 Checks if huge values that overflow when converted to PRInt32 and small
7 non-zero values do not cause a crash or an unexpected behavior.
8 -->
9 <html>
10 <head>
11 <title>Testcases: -moz-image-rect() [bug 113577]</title>
12 <style>
13 div.wrapper {
14 width: 32px;
15 height: 32px;
16 margin: 10px;
17 background-color: red;
18 }
19 div.wrapper div {
20 width: 32px;
21 height: 32px;
22 }
23 /* Huge values that exceed PR_INT32_MAX are clamped to PR_INT32_MAX, so
24 all the tests below should display the entire 32x32 image. */
25 #test1 {
26 background-image: -moz-image-rect(url(green-16x16-in-blue-32x32.png), 0, 10000000000, 32, 0);
27 }
28 #test2 {
29 background-image: -moz-image-rect(url(green-16x16-in-blue-32x32.png), 0%, 10000000000%, 100%, 0%);
30 }
31 /* Small values (smaller than machine epsilon) are rounded to zero, so
32 all the tests below should display the entire 32x32 image. */
33 #test3 {
34 background-image: -moz-image-rect(url(green-16x16-in-blue-32x32.png), 0.00000000001, 32, 32, 0);
35 }
36 #test4 {
37 background-image: -moz-image-rect(url(green-16x16-in-blue-32x32.png), 0.00000000001%, 100%, 100%, 0%);
38 }
39 </style>
40 </head>
41 <body>
42 <div class="wrapper"><div id="test1"></div></div>
43 <div class="wrapper"><div id="test2"></div></div>
44 <div class="wrapper"><div id="test3"></div></div>
45 <div class="wrapper"><div id="test4"></div></div>
46 </body>
47 </html>