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

Unified 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, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/editing/execCommand/format_block/format-block-at-host-selected.html
diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/format_block/format-block-at-host-selected.html b/third_party/WebKit/LayoutTests/editing/execCommand/format_block/format-block-at-host-selected.html
new file mode 100644
index 0000000000000000000000000000000000000000..34125def715ed894165e69ffd5f8416d3c79da1e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/execCommand/format_block/format-block-at-host-selected.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<style>
+div:not(#ce) {
+ display: inline-block;
+}
+.ico::before {
+ content: "a";
+}
+</style>
+
+<div>
+ <div class="ico">
+ </div><!--
+ If you remove this comment and keep the 2 div.ico on separate lines, the selection works
+ fine, but their spacing is off since they are inline-block divs
+ --><div class="ico">
+ </div>
+</div>
+<div id="ce" contenteditable="true">
+ This text should be selected after the test ran.
+</div>
+
+<script>
+test(function () {
yosin_UTC9 2016/11/30 01:48:40 Could you use |assert_selection()| for easier to r
+ let range = document.createRange();
+ range.selectNodeContents(ce);
+ window.getSelection().addRange(range);
+ document.execCommand('FormatBlock', false, 'h1');
+ let selectionAfterFormatBlock = window.getSelection().getRangeAt(0);
+ assert_false(selectionAfterFormatBlock.collapsed, 'The selection should not be collapsed');
+}, 'The selection must remain after execCommand("FormatBlock")');
+</script>

Powered by Google App Engine
This is Rietveld 408576698