gecko/content/base/test/test_bug425201.html

49 lines
968 B
HTML

<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=425201
-->
<head>
<title>Test for Bug 425201</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
<script type="text/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=425201">Mozilla Bug 425201</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
/** Test for Bug 425201 **/
var req = new XMLHttpRequest();
var threw = false;
try {
req.open("GET", "http://www.example.com/", false);
}
catch (e) {
threw = true;
}
ok(threw, "Open should have thrown");
threw = false;
try {
req.send(null);
}
catch (e) {
threw = true;
}
ok(threw, "Send should have thrown");
</script>
</pre>
</body>
</html>