Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: third_party/WebKit/LayoutTests/editing/pasteboard/paste-xml.xhtml

Issue 2720123002: Convert editing/pasteboard/paste-xml.xhtml with w3c testharness (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/pasteboard/paste-xml-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 1 <!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
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml"> 2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../assert_selection.js"></script>
6 <script>
7 test(function() {
8 assert_not_equals(window.internals, undefined, 'This test requires clipboard a ccess');
4 9
5 <head> 10 assert_selection(
6 11 [
7 <style> 12 '<div contenteditable="true">',
8 .editing { 13 'foo ^bar| baz',
9 border: 2px solid red; 14 '</div>'
10 padding: 12px; 15 ].join(''),
11 font-size: 24px; 16 selection => {
12 } 17 selection.document.execCommand('copy');
13 </style> 18 selection.modify('move', 'forward', 'character');
14 19 selection.document.execCommand('paste');
15 <script src="../editing.js" language="JavaScript" type="text/JavaScript" /> 20 },
16 21 [
17 <script> 22 '<div contenteditable="true">',
18 23 '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
19 function editingTest() { 24 '</div>'
20 for (i = 0; i != 4; i++) 25 ].join(''));
21 moveSelectionForwardByCharacterCommand(); 26 }, 'Paste xml');
22 for (i = 0; i != 3; i++)
23 extendSelectionForwardByCharacterCommand();
24 copyCommand();
25 moveSelectionForwardByCharacterCommand();
26 pasteCommand();
27 }
28
29 </script> 27 </script>
30
31 </head>
32
33 <body>
34 <div contenteditable="" id="root" class="editing">
35 <span id="test">foo bar baz</span>
36 </div>
37
38 <script>
39 runDumpAsTextEditingTest(true);
40 </script>
41
42 </body>
43 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/pasteboard/paste-xml-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698