2008-12-16 03:26:42 -08:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<!--
|
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=462787
|
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<title>Test for Bug 462787</title>
|
|
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=462787">Mozilla Bug 462787</a>
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<pre id="test">
|
|
|
|
<script type="application/javascript">
|
|
|
|
|
|
|
|
/** Test for Bug 462787 **/
|
|
|
|
|
|
|
|
function do_test() {
|
2013-11-20 08:46:18 -08:00
|
|
|
const INVALID_POINTER = SpecialPowers.Cr.NS_ERROR_INVALID_POINTER;
|
2013-02-15 06:34:46 -08:00
|
|
|
|
|
|
|
var utils = SpecialPowers.Cc["@mozilla.org/inspector/dom-utils;1"]
|
2013-02-25 10:43:03 -08:00
|
|
|
.getService(SpecialPowers.Ci.inIDOMUtils);
|
2008-12-16 03:26:42 -08:00
|
|
|
try {
|
|
|
|
utils.getCSSStyleRules(null);
|
|
|
|
ok(false, "expected an exception");
|
|
|
|
}
|
2013-09-08 20:30:10 -07:00
|
|
|
catch(e) {
|
|
|
|
e = SpecialPowers.wrap(e);
|
|
|
|
is(e.result, INVALID_POINTER, "got the expected exception");
|
|
|
|
}
|
2008-12-16 03:26:42 -08:00
|
|
|
|
|
|
|
try {
|
|
|
|
utils.getRuleLine(null);
|
|
|
|
ok(false, "expected an exception");
|
|
|
|
}
|
2013-09-08 20:30:10 -07:00
|
|
|
catch(e) {
|
|
|
|
e = SpecialPowers.wrap(e);
|
|
|
|
is(e.result, INVALID_POINTER, "got the expected exception");
|
|
|
|
}
|
2008-12-16 03:26:42 -08:00
|
|
|
|
|
|
|
try {
|
|
|
|
utils.isIgnorableWhitespace(null);
|
|
|
|
ok(false, "expected an exception");
|
|
|
|
}
|
2013-09-08 20:30:10 -07:00
|
|
|
catch(e) {
|
|
|
|
e = SpecialPowers.wrap(e);
|
|
|
|
is(e.result, INVALID_POINTER, "got the expected exception");
|
|
|
|
}
|
2008-12-16 03:26:42 -08:00
|
|
|
|
|
|
|
try {
|
|
|
|
utils.getParentForNode(null, true);
|
|
|
|
ok(false, "expected an exception");
|
|
|
|
}
|
2013-09-08 20:30:10 -07:00
|
|
|
catch(e) {
|
|
|
|
e = SpecialPowers.wrap(e);
|
|
|
|
is(e.result, INVALID_POINTER, "got the expected exception");
|
|
|
|
}
|
2008-12-16 03:26:42 -08:00
|
|
|
|
|
|
|
try {
|
|
|
|
utils.getBindingURLs(null);
|
|
|
|
ok(false, "expected an exception");
|
|
|
|
}
|
2013-09-08 20:30:10 -07:00
|
|
|
catch(e) {
|
|
|
|
e = SpecialPowers.wrap(e);
|
|
|
|
is(e.result, INVALID_POINTER, "got the expected exception");
|
|
|
|
}
|
2008-12-16 03:26:42 -08:00
|
|
|
|
|
|
|
try {
|
|
|
|
utils.getContentState(null);
|
|
|
|
ok(false, "expected an exception");
|
|
|
|
}
|
2013-09-08 20:30:10 -07:00
|
|
|
catch(e) {
|
|
|
|
e = SpecialPowers.wrap(e);
|
|
|
|
is(e.result, INVALID_POINTER, "got the expected exception");
|
|
|
|
}
|
2008-12-16 03:26:42 -08:00
|
|
|
|
|
|
|
try {
|
|
|
|
utils.setContentState(null, false);
|
|
|
|
ok(false, "expected an exception");
|
|
|
|
}
|
2013-09-08 20:30:10 -07:00
|
|
|
catch(e) {
|
|
|
|
e = SpecialPowers.wrap(e);
|
|
|
|
is(e.result, INVALID_POINTER, "got the expected exception");
|
|
|
|
}
|
2008-12-16 03:26:42 -08:00
|
|
|
|
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
addLoadEvent(do_test);
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|