Bug 1348073 - Part 4. Unnecessary VK_RIGHT to move caret on non-visual frame that is whitespace only node. r?masayuki draft
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 21 Aug 2017 15:33:03 +0900
changeset 651197 122b4beb22acec6d2b50be33dac4c6600765c512
parent 651196 7d119a4839b2a8ac021e6570b5183d02dd53a096
child 727618 3e4a24469f7e17b654586785d0caa828e7206e2c
push id75628
push userbmo:m_kato@ga2.so-net.ne.jp
push dateWed, 23 Aug 2017 10:11:09 +0000
reviewersmasayuki
bugs1348073
milestone57.0a1
Bug 1348073 - Part 4. Unnecessary VK_RIGHT to move caret on non-visual frame that is whitespace only node. r?masayuki Since we enable lazy frame construction for editable region, whitespace only node might not have frame even if editable. This test has whitespace only node into contenteditable, we need adjust caret operation for this test. MozReview-Commit-ID: GQfKiYdYOdi
editor/libeditor/tests/test_bug430392.html
--- a/editor/libeditor/tests/test_bug430392.html
+++ b/editor/libeditor/tests/test_bug430392.html
@@ -29,28 +29,26 @@ function test() {
   // Each test is [desc, callback].  callback() is called and we check that the
   // textContent didn't change.  For expected failures, the format is [desc,
   // callback, expectedValue], and the test will be marked as an expected fail
   // if the textContent changes to expectedValue, and an unexpected fail if
   // it's neither the original value nor expectedValue.
   var tests = [["adding returns", () => {
     getSelection().collapse(edit.firstChild, 0);
     synthesizeKey("VK_RIGHT", {});
-    synthesizeKey("VK_RIGHT", {});
     synthesizeKey("VK_RETURN", {});
     synthesizeKey("VK_RETURN", {});
     synthesizeKey("VK_BACK_SPACE", {});
     synthesizeKey("VK_BACK_SPACE", {});
   // For some reason this test fails if the separator is not "br"
   }, () => document.queryCommandValue("defaultParagraphSeparator") == "br"
            ?  undefined : " A; B ; C "],
   ["adding shift-returns", () => {
     getSelection().collapse(edit.firstChild, 0);
     synthesizeKey("VK_RIGHT", {});
-    synthesizeKey("VK_RIGHT", {});
     synthesizeKey("VK_RETURN", {shiftKey: true});
     synthesizeKey("VK_RETURN", {shiftKey: true});
     synthesizeKey("VK_BACK_SPACE", {});
     synthesizeKey("VK_BACK_SPACE", {});
   }, "A ; B ; C "]];
   [
     "insertorderedlist",
     "insertunorderedlist",