4 https://bugzilla.mozilla.org/show_bug.cgi?id=379440
7 <title>Test for Bug
379440</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
10 <style type=
"text/css">
11 #display > * { cursor: auto
}
13 cursor: url
(file:///tmp
/foo
), url
(file:///c|
/),
14 url
(http://example
.com
/), crosshair
;
17 cursor: url
(file:///tmp
/foo
), url
(file:///c|
/), crosshair
;
20 cursor: url
(http://example
.com
/), crosshair
;
23 cursor: url
(http://example
.com
/);
26 cursor: url
(http://example
.com
/), no-such-cursor-exists
;
32 cursor: no-such-cursor-exists
;
37 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=379440">Mozilla Bug
379440</a>
47 <div id=
"content" style=
"display: none">
51 <script class=
"testbody" type=
"text/javascript">
53 /** Test for Bug
379440 **/
56 return document.defaultView.getComputedStyle($(id)).cursor;
59 is(cur(
"t1"), 'url(
"file:///tmp/foo"), url(
"file:///c:/"), ' +
60 'url(
"http://example.com/"), crosshair',
61 "Serialize unloadable URLs using their specified value");
62 is(cur(
"t2"), 'url(
"file:///tmp/foo"), url(
"file:///c:/"), crosshair',
63 "Serialize unloadable URLs using their specified value");
64 is(cur(
"t3"), 'url(
"http://example.com/"), crosshair',
"URI + fallback");
65 is(cur(
"t4"),
"auto",
"Must have a fallback");
66 is(cur(
"t5"),
"auto",
"Fallback must be recognized");
67 is(cur(
"t6"),
"crosshair",
"Just a fallback");
68 is(cur(
"t7"),
"auto",
"Invalid fallback means ignore");