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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/inserting/insert_br_at_tabspan.html

Issue 2284343002: Convert editing/inserting/insert-br-at-tabspan-00[1-3].html to use w3c test harness (Closed)
Patch Set: 2016-08-29T17:02:59 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 <div id="log"></div>
6 <script>
7 test(() => assert_selection(
8 [
9 '<div contenteditable>',
10 'a|<span class="Apple-tab-span" style="white-space:pre">\t\t\t</span >z',
11 '</div>',
12 ].join(''),
13 selection => {
14 selection.document.execCommand('insertLineBreak');
15 selection.document.execCommand('insertText', false, 'x');
16 },
17 [
18 '<div contenteditable>',
19 'a<br>x|<span class="Apple-tab-span" style="white-space:pre">\t\t\t< /span>z',
20 '</div>',
21 ].join('')),
22 'Insert newline and a character before tabspan');
23
24 test(() => assert_selection(
25 [
26 '<div contenteditable>',
27 'a<span class="Apple-tab-span" style="white-space:pre">\t|\t\t</span >z',
28 '</div>',
29 ].join(''),
30 selection => {
31 selection.document.execCommand('insertLineBreak');
32 selection.document.execCommand('insertText', false, 'x');
33 },
34 [
35 '<div contenteditable>',
36 'a<span class="Apple-tab-span" style="white-space:pre">\t</span><br> ',
37 'x|<span class="Apple-tab-span" style="white-space:pre">\t\t</span>z ',
38 '</div>',
39 ].join('')),
40 'Insert newline and a character in tabspan');
41
42 test(() => assert_selection(
43 [
44 '<div contenteditable>',
45 'a<span class="Apple-tab-span" style="white-space:pre">\t\t\t|</span >z',
46 '</div>',
47 ].join(''),
48 selection => {
49 selection.document.execCommand('insertLineBreak');
50 selection.document.execCommand('insertText', false, 'x');
51 },
52 [
53 '<div contenteditable>',
54 'a<span class="Apple-tab-span" style="white-space:pre">\t\t\t</span> <br>x|z',
55 '</div>',
56 ].join('')),
57 'Insert newline and a character after tabspan');
58 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698