<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body onload="test()">
<div id="description"></div>
<div id="console"></div>
<script>
description("Check if calling detached navigator's APIs is safe.");
window.jsTestIsAsync = true;
function test() {
old_nav = window.frames[0].navigator;
var p = document.getElementById('subframe');
p.parentNode.removeChild(p);
check_navigator();
testPassed('DONE');
finishJSTest();
}
function check_navigator() {
for (p in old_nav) {
if (typeof old_nav[p] === 'function') {
try {
var v = old_nav[p]();
} catch(err) {
}
}
}
}
</script>
<!-- iframe with some contents -->
<iframe srcdoc="<html></html>" id="subframe"></iframe>
</body>
</html>