blob: 1488626dd69a849f77301b9726c8f971e63273c3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<div id="editor" contenteditable></div>
</body>
<script>
description("This test verifies that redoing text insertion in a non-editable element is a no-op.");
editor.focus();
document.execCommand("InsertText", true, "Hello");
const textNode = editor.firstChild;
shouldBeEqualToString("textNode.data", "Hello");
document.execCommand("Undo");
editor.setAttribute("contenteditable", "false");
document.execCommand("Redo");
shouldBeEqualToString("textNode.data", "");
</script>
</html>