blob: 7e0de30d42831b7ab5aec3aa758a641a9c50fc8c [file] [log] [blame]
<!DOCTYPE HTML>
<body>
<head>
<script src="../resources/js-test.js"></script>
<script src="vibration-utils.js"></script>
</head>
<script>
description("Accessing navigator.vibrate on a closed window.");
window.jsTestIsAsync = true;
var w;
function processMessage(event) {
if (event.data == "opened") {
w.close();
} else if (event.data == "closed") {
shouldBeFalse("w.navigator.vibrate([])");
finishJSTest();
}
}
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
}
w = window.open('../resources/window-postmessage-open-close.html');
window.addEventListener("message", processMessage, false);
</script>
</body>