Chromium Code Reviews| Index: LayoutTests/editing/pasteboard/paste-newline-in-all-selected-textarea.html |
| diff --git a/LayoutTests/editing/pasteboard/paste-newline-in-all-selected-textarea.html b/LayoutTests/editing/pasteboard/paste-newline-in-all-selected-textarea.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7d6a4951f07338681f80245288ebb99a124a520d |
| --- /dev/null |
| +++ b/LayoutTests/editing/pasteboard/paste-newline-in-all-selected-textarea.html |
| @@ -0,0 +1,23 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<body> |
| +<textarea id='test' cols=5 rows=4> |
|
yosin_UTC9
2014/01/09 01:18:26
nit: Please use double quote for HTML markup. Note
ziran.sun
2014/01/09 10:45:39
Done.
|
| +This test verifies that pasting a newline in a textarea with all text selected |
| +produces a newline. |
| + |
| +</textarea> |
| +<script src='../../resources/js-test.js'></script> |
| +<script> |
| +var textarea = document.getElementById('test'); |
| +textarea.focus(); |
| + |
| +// copy a new line |
| +textarea.setSelectionRange(99, 100); |
| +document.execCommand('copy'); |
| + |
| +document.execCommand('SelectAll'); |
|
yosin_UTC9
2014/01/09 01:18:26
nit: We may want to have consistency of command na
ziran.sun
2014/01/09 10:45:39
Done.
ziran.sun
2014/01/09 10:45:39
Thanks for this. I need to pay more attentions on
|
| +document.execCommand('paste'); |
| +shouldBeEqualToString('textarea.value', '\n'); |
| +</script> |
| +</body> |
| +</html> |