Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/editing/pasteboard/paste-xml.xhtml |
| diff --git a/third_party/WebKit/LayoutTests/editing/pasteboard/paste-xml.xhtml b/third_party/WebKit/LayoutTests/editing/pasteboard/paste-xml.xhtml |
| index e815c47d5406d4e05d1e201d74d0dac7954ffd22..354fba6fde3c73dfc6ca75db19d49729614d7753 100644 |
| --- a/third_party/WebKit/LayoutTests/editing/pasteboard/paste-xml.xhtml |
| +++ b/third_party/WebKit/LayoutTests/editing/pasteboard/paste-xml.xhtml |
| @@ -1,43 +1,27 @@ |
| -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
| - "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| +<!DOCTYPE html> |
|
yosin_UTC9
2017/02/28 01:50:06
I'm not sure whether we should have full DOCTYPE,
Xiaocheng
2017/02/28 03:17:50
I have no idea either... We should check with some
|
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| - |
| -<head> |
| - |
| -<style> |
| -.editing { |
| - border: 2px solid red; |
| - padding: 12px; |
| - font-size: 24px; |
| -} |
| -</style> |
| - |
| -<script src="../editing.js" language="JavaScript" type="text/JavaScript" /> |
| - |
| -<script> |
| - |
| -function editingTest() { |
| - for (i = 0; i != 4; i++) |
| - moveSelectionForwardByCharacterCommand(); |
| - for (i = 0; i != 3; i++) |
| - extendSelectionForwardByCharacterCommand(); |
| - copyCommand(); |
| - moveSelectionForwardByCharacterCommand(); |
| - pasteCommand(); |
| -} |
| - |
| -</script> |
| - |
| -</head> |
| - |
| -<body> |
| -<div contenteditable="" id="root" class="editing"> |
| -<span id="test">foo bar baz</span> |
| -</div> |
| - |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<script src="../assert_selection.js"></script> |
| <script> |
| -runDumpAsTextEditingTest(true); |
| +test(function() { |
| + assert_not_equals(window.internals, undefined, 'This test requires clipboard access'); |
| + |
| + assert_selection( |
| + [ |
| + '<div contenteditable="true">', |
| + 'foo ^bar| baz', |
| + '</div>' |
| + ].join(''), |
| + selection => { |
| + selection.document.execCommand('copy'); |
| + selection.modify('move', 'forward', 'character'); |
| + selection.document.execCommand('paste'); |
| + }, |
| + [ |
| + '<div contenteditable="true">', |
| + 'foo barbar| baz', |
|
yosin_UTC9
2017/02/28 01:50:06
Could you copy and paste with element?
It seems or
Xiaocheng
2017/02/28 03:17:50
Testing with xhtml seems more tricky than ordinary
yosin_UTC9
2017/02/28 07:12:56
Good point. There are two options:
1. Add an optio
|
| + '</div>' |
| + ].join('')); |
| +}, 'Paste xml'); |
| </script> |
| - |
| -</body> |
| -</html> |