blob: 67c5ddb74eb1104a31bda7ee6dd5d8a31c11ff5c [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.setPopupBlockingEnabled(false);
}
w = window.open('../resources/window-postmessage-open-close.html');
window.addEventListener("message", processMessage, false);
</script>
</body>