gecko-dev/dom/bindings/test/file_bug707564-2.html
Peter Van der Beken f781f02ccd Bug 1245650 - remove JavaScript-navigator-property category support. r=bz.
Generate normal properties with getters for things marked as NavigatorProperty,
instead of defining these from a resolve hook.
2016-02-05 20:20:08 +01:00

46 lines
1.2 KiB
HTML

<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=707564
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 707564</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
/** Test for Bug 707564 **/
var ok = parent.ok;
var isnot = parent.isnot;
addLoadEvent(function() {
var props = Object.getOwnPropertyNames(Object.getPrototypeOf(frames[0].navigator));
isnot(props.indexOf("mozContacts"), -1,
"Should enumerate a mozContacts property on navigator");
// Now enumerate a different navigator object
var found = false;
for (var name in frames[1].navigator) {
if (name == "mozContacts") {
found = true;
}
}
ok(found, "Should enumerate a mozContacts property on navigator via for...in");
parent.SimpleTest.finish();
});
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=707564">Mozilla Bug 707564</a>
<p id="display"></p>
<div id="content" style="display: none">
<iframe></iframe>
<iframe></iframe>
</div>
<pre id="test">
</pre>
</body>
</html>