Bug 458861. Validate TrueType headers before activating downloaded font. r=roc, sr...
[wine-gecko.git] / layout / style / test / test_bug379440.html
blob2c9da4c92cfcc9bdde03d393e7804f743e9abf0b
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=379440
5 -->
6 <head>
7 <title>Test for Bug 379440</title>
8 <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
9 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
11 <style type="text/css">
12 #display > * { cursor: auto }
13 #t1 {
14 cursor: url(file:///tmp/foo), url(file:///c|/),
15 url(http://www.example.com/), crosshair;
17 #t2 {
18 cursor: url(file:///tmp/foo), url(file:///c|/), crosshair;
20 #t3 {
21 cursor: url(http://www.example.com/), crosshair;
23 #t4 {
24 cursor: url(http://www.example.com/);
26 #t5 {
27 cursor: url(http://www.example.com/), no-such-cursor-exists;
29 #t6 {
30 cursor: crosshair;
32 #t7 {
33 cursor: no-such-cursor-exists;
35 </style>
36 </head>
37 <body>
38 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=379440">Mozilla Bug 379440</a>
39 <p id="display">
40 <div id="t1"> </div>
41 <div id="t2"></div>
42 <div id="t3"></div>
43 <div id="t4"></div>
44 <div id="t5"></div>
45 <div id="t6"></div>
46 <div id="t7"></div>
47 </p>
48 <div id="content" style="display: none">
50 </div>
51 <pre id="test">
52 <script class="testbody" type="text/javascript">
54 /** Test for Bug 379440 **/
56 function cur(id) {
57 return document.defaultView.getComputedStyle($(id), "").cursor;
60 is(cur("t1"), "url(http://www.example.com/), crosshair",
61 "Drop unloadable URIs");
62 is(cur("t2"), "crosshair", "Drop unloadable URIs again");
63 is(cur("t3"), "url(http://www.example.com/), crosshair", "URI + fallback");
64 is(cur("t4"), "auto", "Must have a fallback");
65 is(cur("t5"), "auto", "Fallback must be recognized");
66 is(cur("t6"), "crosshair", "Just a fallback");
67 is(cur("t7"), "auto", "Invalid fallback means ignore");
69 </script>
70 </pre>
71 </body>
72 </html>