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
--- 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",