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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/style/smoosh_styles.html

Issue 2294193002: Convert editing/style/smoosh-styles-00[13].html to use w3c test harness (Closed)
Patch Set: 2016-08-31T10:41:57 Created 4 years, 3 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
OLDNEW
(Empty)
1 <!doctype html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../assert_selection.js"></script>
5 <script>
6 test(() => assert_selection(
7 [
8 '<div contenteditable>',
9 '<div><span style="color: red;">abfg</span></div>',
10 '<div>^cde|</div>',
11 '</div>',
12 ].join(''),
13 selection => {
14 assert_not_equals(window.testRunner, undefined,
15 'This test requires testRunner');
16 selection.document.execCommand('cut');
17 selection.document.execCommand('delete');
18 selection.modify('move', 'backward', 'line');
19 selection.modify('move', 'forward', 'character');
20 selection.modify('move', 'forward', 'character');
yoichio 2016/08/31 08:20:25 Could you use collapse()?
yosin_UTC9 2016/08/31 09:58:40 Done.
21 selection.document.execCommand('paste');
22 },
23 [
24 '<div contenteditable>',
25 '<div><span style="color: red;">ab</span>cde|<span style="color: red;">fg</span></div>',
26 '</div>',
27 ].join('')),
28 'Paste into middle of colored SPAN');
29
30 test(() => assert_selection(
31 [
32 '<div contenteditable>',
33 '<div style="margin-left: 40px; text-indent: -40px;">^foo|</div> ',
34 '</div>',
35 ].join(''),
36 selection => {
37 assert_not_equals(window.testRunner, undefined,
38 'This test requires testRunner');
39 selection.document.execCommand('cut');
40 selection.document.execCommand('paste');
41 },
42 [
43 '<div contenteditable>',
44 '<div style="margin-left: 40px; text-indent: -40px;">foo|</div>' ,
45 '</div>',
46 ].join('')),
47 'Keep text-indent at pasting');
48 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698