blob: 35423f0f226b6cb298ccc59da78d4229c7dad1c4 [file] [log] [blame]
<!DOCTYPE html>
<html style="display: inline-table">
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
window.onload = function() {
var selection = getSelection();
selection.selectAllChildren(document);
selection.collapseToEnd();
var element = document.activeElement;
document.open();
document.write("Test calling containsNode on a selection of a closed document doesn't cause a crash.");
document.close();
if (selection.containsNode(element, true))
alert('FAIL: containsNode returned true even though the element was not in the document');
else
alert('PASS: containsNode returned false');
testRunner.notifyDone();
}
</script>
</html>