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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/execCommand/format_block/format-block-at-host-selected.html

Issue 2532373002: (CANCELED) Ensure before/after is within the editable in moveParagraphWithClones (Closed)
Patch Set: Rebaseline Created 4 years 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 <style>
5 div:not(#ce) {
6 display: inline-block;
7 }
8 .ico::before {
9 content: "a";
10 }
11 </style>
12
13 <div>
14 <div class="ico">
15 </div><!--
16 If you remove this comment and keep the 2 div.ico on separate lines, the selec tion works
17 fine, but their spacing is off since they are inline-block divs
18 --><div class="ico">
19 </div>
20 </div>
21 <div id="ce" contenteditable="true">
22 This text should be selected after the test ran.
23 </div>
24
25 <script>
26 test(function () {
yosin_UTC9 2016/11/30 01:48:40 Could you use |assert_selection()| for easier to r
27 let range = document.createRange();
28 range.selectNodeContents(ce);
29 window.getSelection().addRange(range);
30 document.execCommand('FormatBlock', false, 'h1');
31 let selectionAfterFormatBlock = window.getSelection().getRangeAt(0);
32 assert_false(selectionAfterFormatBlock.collapsed, 'The selection should not be collapsed');
33 }, 'The selection must remain after execCommand("FormatBlock")');
34 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698