2007-09-20 20:39:37 -07:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<!--
|
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=317448
|
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<title>Test for Bug 317448</title>
|
2009-05-06 13:46:04 -07:00
|
|
|
<script type="text/javascript" src="/MochiKit/packed.js"></script>
|
2007-09-20 20:39:37 -07:00
|
|
|
<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=317448">Mozilla Bug 317448</a>
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<pre id="test">
|
|
|
|
<script class="testbody" type="text/javascript">
|
|
|
|
|
|
|
|
/** Test for Bug 317448 **/
|
|
|
|
var x = new XMLHttpRequest();
|
|
|
|
x.open("GET", document.location.href);
|
|
|
|
x.send("");
|
|
|
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
2008-02-26 19:45:29 -08:00
|
|
|
is(x instanceof Components.interfaces.nsIInterfaceRequestor,
|
2007-09-20 20:39:37 -07:00
|
|
|
true, "Must be interface requestor");
|
|
|
|
|
|
|
|
var count = {};
|
2008-02-26 19:45:29 -08:00
|
|
|
var interfaces = x.
|
2007-09-20 20:39:37 -07:00
|
|
|
QueryInterface(Components.interfaces.nsIClassInfo).
|
|
|
|
getInterfaces(count).
|
|
|
|
map(function(id) {
|
|
|
|
return Components.interfacesByID[id].toString();
|
|
|
|
});
|
|
|
|
isnot(interfaces.indexOf("nsIInterfaceRequestor"), "-1",
|
|
|
|
"Must have interface requestor classinfo");
|
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|