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

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-31T18:55:30 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 id="sample" 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 const sample = selection.document.getElementById('sample');
19 selection.collapse(sample.firstChild, 2);
20 selection.document.execCommand('paste');
yoichio 2016/09/01 07:56:46 Can we have clipboard function in assert_selection
21 },
22 [
23 '<div contenteditable>',
24 '<div>',
25 '<span id="sample" style="color: red;">ab</span>',
26 'cde|',
27 '<span style="color: red;">fg</span>',
28 '</div>',
29 '</div>',
30 ].join('')),
31 'Paste into middle of colored SPAN');
32
33 test(() => assert_selection(
34 [
35 '<div contenteditable>',
36 '<div style="margin-left: 40px; text-indent: -40px;">^foo|</div> ',
37 '</div>',
38 ].join(''),
39 selection => {
40 assert_not_equals(window.testRunner, undefined,
41 'This test requires testRunner');
42 selection.document.execCommand('cut');
43 selection.document.execCommand('paste');
44 },
45 [
46 '<div contenteditable>',
47 '<div style="margin-left: 40px; text-indent: -40px;">foo|</div>' ,
48 '</div>',
49 ].join('')),
50 'Keep text-indent at pasting');
51 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698