Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / undo / 5658727.html
blob5cd210ed9675491ab9a788d52624516221c0faaf
1 <p>This tests for a bug where changing focus away from a textarea that has been emptied out by the Undo operation would clear the Undo stack. You should see a textarea with "foo" inside it below.</p>
2 <textarea id="textarea"></textarea>
4 <script>
5 if (window.testRunner)
6 window.testRunner.dumpAsText();
8 textarea = document.getElementById("textarea");
9 textarea.focus();
10 document.execCommand("InsertText", false, "foo");
11 document.execCommand("Undo");
12 textarea.blur();
13 document.execCommand("Redo");
14 if (textarea.value == "foo")
15 document.write("Success: Redo worked after the textarea lost focus.");
16 else
17 document.write("Failure: Redo didn't work after the textarea lost focus.");
18 </script>