mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 20:30:41 +00:00
Bug 1727844 - part 1: Stop enabling blink-compat white-space normalizer at running mochitests r=m_kato
It was enabled for working on implementing blink-compat white-space normalizer, but currently nobody works on it actively. Therefore, we should disable it at running mochitests for detecting any regressions in the default settings. Differential Revision: https://phabricator.services.mozilla.com/D123868
This commit is contained in:
parent
7be95b70ef
commit
c117a4d476
@ -1,7 +1,5 @@
|
||||
[DEFAULT]
|
||||
skip-if = os == 'android'
|
||||
prefs =
|
||||
editor.white_space_normalization.blink_compatible=true
|
||||
support-files = green.png
|
||||
|
||||
[test_bug489202.xhtml]
|
||||
|
@ -1,6 +1,5 @@
|
||||
[DEFAULT]
|
||||
prefs =
|
||||
editor.white_space_normalization.blink_compatible=true
|
||||
apz.zoom-to-focused-input.enabled=false
|
||||
support-files =
|
||||
data/cfhtml-chromium.txt
|
||||
|
@ -93,8 +93,13 @@ function runTests() {
|
||||
editor7.focus();
|
||||
synthesizeKey("KEY_ArrowRight");
|
||||
synthesizeKey("KEY_Backspace");
|
||||
is(editor7.innerHTML, "<br>",
|
||||
"an editor which had \"f\" in a <span> element should have only <br> element after Backspace keypress");
|
||||
is(
|
||||
editor7.innerHTML,
|
||||
SpecialPowers.getBoolPref("editor.white_space_normalization.blink_compatible")
|
||||
? "<br>"
|
||||
: "<span><br></span>",
|
||||
"an editor which had \"f\" in a <span> element should have only <br> element after Backspace keypress"
|
||||
);
|
||||
ok(Math.abs(editor7.getBoundingClientRect().height - editor1.getBoundingClientRect().height) <= 1,
|
||||
"an editor whose content was removed by Backspace key should have a place to put a caret");
|
||||
|
||||
@ -102,9 +107,14 @@ function runTests() {
|
||||
synthesizeKey("KEY_ArrowLeft");
|
||||
synthesizeKey("KEY_Delete");
|
||||
todo_is(editor8.innerHTML, "<br>",
|
||||
"an editor which had \"g\" in a <span> element should have only <br> element after Delete keypress");
|
||||
todo_isnot(editor8.innerHTML, "<br><span></span>",
|
||||
"an editor which had \"g\" in a <span> element should have only <br> element after Delete keypress");
|
||||
"an editor which had \"g\" in a <span> element should have only <br> element after Delete keypress");
|
||||
todo_isnot(
|
||||
editor8.innerHTML,
|
||||
SpecialPowers.getBoolPref("editor.white_space_normalization.blink_compatible")
|
||||
? "<br><span></span>"
|
||||
: "<span><br></span>",
|
||||
"an editor which had \"g\" in a <span> element should have only <br> element after Delete keypress"
|
||||
);
|
||||
ok(Math.abs(editor8.getBoundingClientRect().height - editor1.getBoundingClientRect().height) <= 1,
|
||||
"an editor whose content was removed by Backspace key should have a place to put a caret");
|
||||
|
||||
|
@ -53,7 +53,13 @@ function runTest() {
|
||||
sendKey("right");
|
||||
sendChar(" ");
|
||||
is(e.parentNode.childNodes[2].nodeValue, before, msg + " with id=" + e.id);
|
||||
is(e.innerHTML, "X ", msg + " with id=" + e.id);
|
||||
is(
|
||||
e.innerHTML,
|
||||
SpecialPowers.getBoolPref("editor.white_space_normalization.blink_compatible") || e.tagName == "SPAN"
|
||||
? "X "
|
||||
: "X <br>",
|
||||
msg + " with id=" + e.id
|
||||
);
|
||||
}
|
||||
|
||||
test_begin_bs(select("t1"));
|
||||
|
@ -226,8 +226,17 @@ function runTests() {
|
||||
check(aDescription + "Tab",
|
||||
true, true, !aIsTabbable && !aIsReadonly);
|
||||
is(aElement.innerHTML,
|
||||
aIsTabbable || aIsReadonly ? "a" :
|
||||
aIsPlaintext ? "a\t" : "a ",
|
||||
(() => {
|
||||
if (aIsTabbable || aIsReadonly) {
|
||||
return "a";
|
||||
}
|
||||
if (aIsPlaintext) {
|
||||
return "a\t";
|
||||
}
|
||||
return SpecialPowers.getBoolPref("editor.white_space_normalization.blink_compatible")
|
||||
? "a "
|
||||
: "a <br>";
|
||||
})(),
|
||||
aDescription + "Tab");
|
||||
is(SpecialPowers.unwrap(fm.focusedElement), aElement,
|
||||
aDescription + "focus moved unexpectedly (Tab)");
|
||||
@ -597,7 +606,17 @@ function runTests() {
|
||||
sendString(" ");
|
||||
check(aDescription + "' '", true, true, !aIsReadonly);
|
||||
is(aElement.innerHTML,
|
||||
aIsReadonly ? "" : aIsPlaintext ? "Mozilla " : "Mozilla ",
|
||||
(() => {
|
||||
if (aIsReadonly) {
|
||||
return "";
|
||||
}
|
||||
if (aIsPlaintext) {
|
||||
return "Mozilla ";
|
||||
}
|
||||
return SpecialPowers.getBoolPref("editor.white_space_normalization.blink_compatible")
|
||||
? "Mozilla "
|
||||
: "Mozilla <br>";
|
||||
})(),
|
||||
aDescription + "typed \"Mozilla \"");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user