Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/editing/pasteboard/cut-paste-formatting-tag.html |
| diff --git a/third_party/WebKit/LayoutTests/editing/pasteboard/cut-paste-formatting-tag.html b/third_party/WebKit/LayoutTests/editing/pasteboard/cut-paste-formatting-tag.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..364834aca5dca22d4dedb9c9ef9993808d029a10 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/editing/pasteboard/cut-paste-formatting-tag.html |
| @@ -0,0 +1,18 @@ |
| +<!doctype HTML> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<script src="../assert_selection.js"></script> |
| +<script> |
| + |
| +test(() => assert_selection( |
| + '<div contenteditable id="editor" style="width: 300px; height: 250px; border: 1px solid black"><div><b>^<br></b></div><b>foo|</b></div>', |
| + selection => { |
| + var editor = selection.document.getElementById('editor'); |
|
yosin_UTC9
2016/08/12 01:37:34
nit: Could you get rid of |var editor = ...| since
joone
2016/08/12 22:12:21
Done.
|
| + |
| + selection.document.execCommand('cut'); |
| + selection.document.execCommand('paste'); |
| + }, |
| + '<div contenteditable id="editor" style="width: 300px; height: 250px; border: 1px solid black"><br><div><b>foo|</b></div></div>'), |
|
joone
2016/08/10 21:31:31
The layout test result is a bit different from run
|
| + 'Cut all tags and paste them'); |
| + |
| +</script> |