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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/execCommand/format-block-multiple-paragraphs.html

Issue 2704443002: Selection API: extend() should operate DOM Ranges. (Closed)
Patch Set: rebase Created 3 years, 10 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
1 <!doctype html> 1 <!doctype html>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../assert_selection.js"></script> 4 <script src="../assert_selection.js"></script>
5 <script> 5 <script>
6 test(() => assert_selection( 6 test(() => assert_selection(
7 [ 7 [
8 '<div contenteditable>', 8 '<div contenteditable>',
9 '^<div>hello</div><div>world</div><div>Blink</div>|', 9 '^<div>hello</div><div>world</div><div>Blink</div>|',
10 '</div>', 10 '</div>',
11 ].join(''), 11 ].join(''),
12 'formatBlock P', 12 'formatBlock P',
13 [ 13 [
14 '<div contenteditable>', 14 '<div contenteditable>',
15 '<p>^hello<br>world<br>Blink|</p>', 15 '<p>^hello<br>world<br>Blink|</p>',
16 '</div>', 16 '</div>',
17 ].join('')), '0 select all children with P'); 17 ].join('')), '0 select all children with P');
18 18
19 test(() => assert_selection( 19 test(() => assert_selection(
20 [ 20 [
21 '<div contenteditable>', 21 '<div contenteditable>',
22 '^<p>hello</p><p>world</p>|', 22 '^<p>hello</p><p>world</p>|',
23 '</div>', 23 '</div>',
24 ].join(''), 24 ].join(''),
25 'formatBlock blockquote', 25 'formatBlock blockquote',
26 [ 26 [
27 '<div contenteditable>', 27 '<div contenteditable>',
28 '<blockquote>hello<br>world|</blockquote>', 28 '^<blockquote>hello<br>world</blockquote>|',
29 '</div>', 29 '</div>',
30 ].join('')), '1 select all children BLOCKQUOTE'); 30 ].join('')), '1 select all children BLOCKQUOTE');
31 31
32 test(() => assert_selection( 32 test(() => assert_selection(
33 [ 33 [
34 '<div contenteditable>', 34 '<div contenteditable>',
35 '^<div>hello<pre>world</pre></div>|', 35 '^<div>hello<pre>world</pre></div>|',
36 '</div>', 36 '</div>',
37 ].join(''), 37 ].join(''),
38 'formatBlock blockquote', 38 'formatBlock blockquote',
39 [ 39 [
40 '<div contenteditable>', 40 '<div contenteditable>',
41 '<blockquote>^hello<br>world|</blockquote>', 41 '<blockquote>^hello<br>world|</blockquote>',
42 '</div>', 42 '</div>',
43 ].join('')), '2 select all children P'); 43 ].join('')), '2 select all children P');
44 44
45 test(() => assert_selection( 45 test(() => assert_selection(
46 [ 46 [
47 '<div contenteditable>', 47 '<div contenteditable>',
48 '^<h1>hello</h1><div><h2>world</h2><h3>Blink</h3></div>|', 48 '^<h1>hello</h1><div><h2>world</h2><h3>Blink</h3></div>|',
49 '</div>', 49 '</div>',
50 ].join(''), 50 ].join(''),
51 'formatBlock blockquote', 51 'formatBlock blockquote',
52 [ 52 [
53 '<div contenteditable>', 53 '<div contenteditable>',
54 '<blockquote>hello<br>world<br>Blink|</blockquote>', 54 '^<blockquote>hello<br>world<br>Blink</blockquote>|',
55 '</div>', 55 '</div>',
56 ].join('')), '3 select all children PRE'); 56 ].join('')), '3 select all children PRE');
57 57
58 test(() => assert_selection( 58 test(() => assert_selection(
59 [ 59 [
60 '<div contenteditable>', 60 '<div contenteditable>',
61 '<div>hello<p>^world</p>Blin|k</div>', 61 '<div>hello<p>^world</p>Blin|k</div>',
62 '</div>', 62 '</div>',
63 ].join(''), 63 ].join(''),
64 'formatBlock H1', 64 'formatBlock H1',
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 ].join(''), 128 ].join(''),
129 'formatBlock BLOCKQUOTE', 129 'formatBlock BLOCKQUOTE',
130 [ 130 [
131 '<div contenteditable>', 131 '<div contenteditable>',
132 '<blockquote>', 132 '<blockquote>',
133 '<ul><li>^hello</li></ul><ul><li>world|</li></ul>', 133 '<ul><li>^hello</li></ul><ul><li>world|</li></ul>',
134 '</blockquote>', 134 '</blockquote>',
135 '</div>', 135 '</div>',
136 ].join('')), '9 select all children with BLOCKQUOTE'); 136 ].join('')), '9 select all children with BLOCKQUOTE');
137 </script> 137 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698