2007-05-03 10:33:13 +04:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<!--
|
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=379440
|
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<title>Test for Bug 379440</title>
|
2009-05-07 00:46:04 +04:00
|
|
|
<script type="text/javascript" src="/MochiKit/packed.js"></script>
|
2007-05-03 10:33:13 +04:00
|
|
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
|
|
<style type="text/css">
|
|
|
|
#display > * { cursor: auto }
|
|
|
|
#t1 {
|
|
|
|
cursor: url(file:///tmp/foo), url(file:///c|/),
|
2008-11-26 00:27:53 +03:00
|
|
|
url(http://example.com/), crosshair;
|
2007-05-03 10:33:13 +04:00
|
|
|
}
|
|
|
|
#t2 {
|
|
|
|
cursor: url(file:///tmp/foo), url(file:///c|/), crosshair;
|
|
|
|
}
|
|
|
|
#t3 {
|
2008-11-26 00:27:53 +03:00
|
|
|
cursor: url(http://example.com/), crosshair;
|
2007-05-03 10:33:13 +04:00
|
|
|
}
|
|
|
|
#t4 {
|
2008-11-26 00:27:53 +03:00
|
|
|
cursor: url(http://example.com/);
|
2007-05-03 10:33:13 +04:00
|
|
|
}
|
|
|
|
#t5 {
|
2008-11-26 00:27:53 +03:00
|
|
|
cursor: url(http://example.com/), no-such-cursor-exists;
|
2007-05-03 10:33:13 +04:00
|
|
|
}
|
|
|
|
#t6 {
|
|
|
|
cursor: crosshair;
|
|
|
|
}
|
|
|
|
#t7 {
|
|
|
|
cursor: no-such-cursor-exists;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=379440">Mozilla Bug 379440</a>
|
|
|
|
<p id="display">
|
|
|
|
<div id="t1"> </div>
|
|
|
|
<div id="t2"></div>
|
|
|
|
<div id="t3"></div>
|
|
|
|
<div id="t4"></div>
|
|
|
|
<div id="t5"></div>
|
|
|
|
<div id="t6"></div>
|
|
|
|
<div id="t7"></div>
|
|
|
|
</p>
|
|
|
|
<div id="content" style="display: none">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<pre id="test">
|
|
|
|
<script class="testbody" type="text/javascript">
|
|
|
|
|
|
|
|
/** Test for Bug 379440 **/
|
|
|
|
|
|
|
|
function cur(id) {
|
|
|
|
return document.defaultView.getComputedStyle($(id), "").cursor;
|
|
|
|
}
|
|
|
|
|
2009-03-06 07:05:01 +03:00
|
|
|
is(cur("t1"), "url(\"http://example.com/\"), crosshair",
|
2007-05-03 10:33:13 +04:00
|
|
|
"Drop unloadable URIs");
|
|
|
|
is(cur("t2"), "crosshair", "Drop unloadable URIs again");
|
2009-03-06 07:05:01 +03:00
|
|
|
is(cur("t3"), "url(\"http://example.com/\"), crosshair", "URI + fallback");
|
2007-05-03 10:33:13 +04:00
|
|
|
is(cur("t4"), "auto", "Must have a fallback");
|
|
|
|
is(cur("t5"), "auto", "Fallback must be recognized");
|
|
|
|
is(cur("t6"), "crosshair", "Just a fallback");
|
|
|
|
is(cur("t7"), "auto", "Invalid fallback means ignore");
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|