blob: ba4fcf8ab87dba0b094f6cc1f00b04d2e90147db [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test.js"></script>
<script>
description("Verify that process does not crash when starting recognition in a removed iframe.");
if (window.testRunner) {
jsTestIsAsync = true;
}
function test()
{
iframe = document.getElementsByTagName('iframe')[0];
shouldThrow("iframe.contentWindow.startRecognition()");
}
function removeFrame()
{
shouldNotThrow("iframe.parentNode.removeChild(iframe)");
setTimeout(() => finishJSTest(), 0);
}
window.addEventListener('load', test, false);
</script>
<iframe src="resources/removed-iframe.html"></iframe>
</body>
</html>