| Index: LayoutTests/fast/dom/navigator-with-content-detached-no-crash.html
|
| diff --git a/LayoutTests/fast/dom/navigator-with-content-detached-no-crash.html b/LayoutTests/fast/dom/navigator-with-content-detached-no-crash.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e9342bc7feeaa00ada8f97c0a81715cfcfc0c29d
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/dom/navigator-with-content-detached-no-crash.html
|
| @@ -0,0 +1,38 @@
|
| +<!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 src="data:text/html,<html></html>" id="subframe"></iframe>
|
| +</body>
|
| +</html>
|
|
|