Skip to content

Commit

Permalink
Bug 1355842 - Re-enable layout/base/tests/test_reftests_with_caret.ht…
Browse files Browse the repository at this point in the history
…ml on Android r=geckoview-reviewers,emilio,m_kato

All of them are still disabled for some test failures.  There are 3 patterns
failures:

1. Tests with `<input type="password">` assumes that last input character is
masked immediately.
2. Tests with synthesizing mouse button events in editable element
3. Test with DnD

The first case can be fixed with disabling echoing last input character by the
pref.

The second case can be fixed with disabling "zoom to editable element" by the
pref.

The last case cannot be fixed, therefore I disable it on Android.

Differential Revision: https://phabricator.services.mozilla.com/D133719
  • Loading branch information
masayuki-nakano committed Dec 17, 2021
1 parent 78e5eb0 commit f96606f
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 24 deletions.
2 changes: 1 addition & 1 deletion layout/base/tests/bug1258308-1-ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</head>
<body>

<textarea onfocus="test1()" spellcheck="false" style="-moz-appearance:none">abc
<textarea onfocus="test1()" spellcheck="false" style="-moz-appearance:none;scrollbar-width:none">abc
def
ghi</textarea>

Expand Down
2 changes: 1 addition & 1 deletion layout/base/tests/bug1258308-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</head>
<body>

<textarea onfocus="test1()" spellcheck="false" style="-moz-appearance:none">abc
<textarea onfocus="test1()" spellcheck="false" style="-moz-appearance:none;scrollbar-width:none">abc
def
ghi</textarea>

Expand Down
1 change: 0 additions & 1 deletion layout/base/tests/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ support-files = preserve3d_sorting_hit_testing_iframe.html
support-files = preserve3d_sorting_hit_testing2_iframe.html
[test_reftests_with_caret.html]
skip-if =
toolkit == 'android' # Bug 1355842
tsan # Bug 1612707
support-files =
bug106855-1.html
Expand Down
46 changes: 26 additions & 20 deletions layout/base/tests/test_reftests_with_caret.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@
[ 'input-password-remask.html', 'input-password-remask-ref.html' ],

// The following hash means language.
function() {SpecialPowers.pushPrefEnv({'set': [['editor.password.mask_delay', 0]]}, nextTest);} ,
[ 'input-password-RTL-input.html#arabic', 'input-password-RTL-input-ref.html'],
[ 'input-password-RTL-input.html#hebrew', 'input-password-RTL-input-ref.html'],
function() {SpecialPowers.pushPrefEnv({'clear': [['editor.password.mask_delay']]}, nextTest);} ,

// The following hash means "text ('_' is a space)" - unmarsk start - unmask end - selection start - selection end[ - text-transform].
[ 'input-password-unmask.html#abc_def-0-7-7-7', 'input-password-unmask-ref.html#abc_def-0-7-7-7'],
Expand All @@ -195,6 +197,19 @@
[ 'input-password-unmask-around-emoji.html#1-4-4-4', 'input-password-unmask-around-emoji-ref.html#1-4-4-4'],
function() {SpecialPowers.pushPrefEnv({'clear': [['layout.forms.input-type-show-password-button.enabled']]}, nextTest);} ,

// The following tests something in editable elements so that we need to disable zoom to focused editor.
function() {SpecialPowers.pushPrefEnv({'set': [['apz.zoom-to-focused-input.enabled', false]]}, nextTest);} ,
[ 'bug956530-1.html' , 'bug956530-1-ref.html' ] , // Clicks an <input> element
[ 'bug1097242-1.html', 'bug1097242-1-ref.html'] , // Clicks non-editable and non-selectable element in an editing host
[ 'bug1423331-1.html' , 'bug1423331-1-ref.html' ] , // Clicks in an editing host
[ 'bug1423331-2.html' , 'bug1423331-2-ref.html' ] , // Clicks in an editing host
[ 'bug1506547-4.html' , 'bug1506547-4-ref.html' ] , // Clicks in an editing host
[ 'bug1506547-5.html' , 'bug1506547-5-ref.html' ] , // Clicks in an editing host
[ 'bug1506547-6.html' , 'bug1506547-5-ref.html' ] , // Clicks in an editing host (reference)
[ 'bug1518339-1.html' , 'bug1518339-1-ref.html' ] , // Clicks in an editing host
[ 'bug1518339-2.html' , 'bug1518339-2-ref.html' ] , // Clicks in an editing host
function() {SpecialPowers.pushPrefEnv({'clear': [['apz.zoom-to-focused-input.enabled']]}, nextTest);} ,

[ 'input-stoppropagation.html', 'input-stoppropagation-ref.html'] ,
[ 'textarea-maxlength-valid-before-change.html', 'textarea-valid-ref.html'] ,
[ 'textarea-maxlength-valid-change.html', 'textarea-valid-ref.html'] ,
Expand All @@ -214,14 +229,17 @@
[ 'bug682712-1.html' , 'bug682712-1-ref.html' ] ,
function() {SpecialPowers.pushPrefEnv({'clear': [['bidi.browser.ui']]}, nextTest);} ,
[ 'bug746993-1.html' , 'bug746993-1-ref.html' ] ,
[ 'bug956530-1.html' , 'bug956530-1-ref.html' ] ,
function() {SpecialPowers.pushPrefEnv({'set': [['layout.css.overflow-clip-box.enabled', true]]}, nextTest);} ,
[ 'bug966992-1.html' , 'bug966992-1-ref.html' ] ,
[ 'bug966992-2.html' , 'bug966992-2-ref.html' ] ,
[ 'bug966992-3.html' , 'bug966992-3-ref.html' ] ,
function() {SpecialPowers.pushPrefEnv({'clear': [['layout.css.overflow-clip-box.enabled']]}, nextTest);} ,
[ 'bug989012-1.html' , 'bug989012-1-ref.html' ] ,
[ 'bug989012-2.html' , 'bug989012-2-ref.html' ] ,
[ 'bug989012-3.html' , 'bug989012-3-ref.html' ] ,
[ 'bug1007065-1.html' , 'bug1007065-1-ref.html' ] ,
[ 'bug1007067-1.html' , 'bug1007067-1-ref.html' ] ,
[ 'bug1061468.html' , 'bug1061468-ref.html' ] ,
[ 'bug1097242-1.html', 'bug1097242-1-ref.html'] ,
[ 'bug1109968-1.html', 'bug1109968-1-ref.html'] ,
[ 'bug1109968-2.html', 'bug1109968-2-ref.html'] ,
// [ 'bug1123067-1.html' , 'bug1123067-ref.html' ] , TODO: bug 1129205
Expand All @@ -230,6 +248,7 @@
[ 'bug1132768-1.html' , 'bug1132768-1-ref.html'] ,
[ 'bug1237236-1.html' , 'bug1237236-1-ref.html' ] ,
[ 'bug1237236-2.html' , 'bug1237236-2-ref.html' ] ,
[ 'bug1258308-1.html' , 'bug1258308-1-ref.html' ] ,
[ 'bug1258308-2.html' , 'bug1258308-2-ref.html' ] ,
[ 'bug1259949-1.html' , 'bug1259949-1-ref.html'] ,
[ 'bug1259949-2.html' , 'bug1259949-2-ref.html'] ,
Expand All @@ -247,23 +266,15 @@
[ 'bug1354478-6.html' , 'bug1354478-6-ref.html'] ,
[ 'bug1359411.html' , 'bug1359411-ref.html' ] ,
[ 'bug1415416.html' , 'bug1415416-ref.html' ] ,
[ 'bug1423331-1.html' , 'bug1423331-1-ref.html' ] ,
[ 'bug1423331-2.html' , 'bug1423331-2-ref.html' ] ,
// FIXME(bug 1434949): These two fail in some platforms.
// [ 'bug1423331-3.html' , 'bug1423331-1-ref.html' ] ,
// [ 'bug1423331-4.html' , 'bug1423331-2-ref.html' ] ,
[ 'bug1484094-1.html' , 'bug1484094-1-ref.html' ] ,
[ 'bug1484094-2.html' , 'bug1484094-2-ref.html' ] ,
[ 'bug1496118.html' , 'bug1496118-ref.html' ] ,
[ 'bug1506547-1.html' , 'bug1506547-2.html' ] ,
[ 'bug1506547-2.html' , 'bug1506547-3.html' ] ,
[ 'bug1506547-4.html' , 'bug1506547-4-ref.html' ] ,
[ 'bug1506547-5.html' , 'bug1506547-5-ref.html' ] ,
[ 'bug1506547-6.html' , 'bug1506547-5-ref.html' ] ,
[ 'bug1510942-1.html' , 'bug1510942-1-ref.html' ] ,
[ 'bug1510942-2.html' , 'bug1510942-2-ref.html' ] ,
[ 'bug1518339-1.html' , 'bug1518339-1-ref.html' ] ,
[ 'bug1518339-2.html' , 'bug1518339-2-ref.html' ] ,
[ 'bug1524266-1.html' , 'bug1524266-1-ref.html' ] ,
// Checks that the caret isn't occluded by children background content.
[ 'bug1591282-1.html' , 'bug1591282-1-ref.html' ] ,
Expand Down Expand Up @@ -292,20 +303,15 @@
];

if (!navigator.appVersion.includes("Android")) {
tests.push([ 'bug512295-1.html' , 'bug512295-1-ref.html' ]);
tests.push([ 'bug512295-2.html' , 'bug512295-2-ref.html' ]);
tests.push([ 'bug923376.html' , 'bug923376-ref.html' ]);
tests.push(function() {SpecialPowers.pushPrefEnv({'set': [['layout.css.overflow-clip-box.enabled', true]]}, nextTest);});
tests.push([ 'bug966992-1.html' , 'bug966992-1-ref.html' ]);
tests.push([ 'bug966992-2.html' , 'bug966992-2-ref.html' ]);
tests.push([ 'bug966992-3.html' , 'bug966992-3-ref.html' ]);
tests.push(function() {SpecialPowers.pushPrefEnv({'clear': [['layout.css.overflow-clip-box.enabled']]}, nextTest);});
tests.push([ 'bug1258308-1.html' , 'bug1258308-1-ref.html' ]); // maybe VK_END doesn't work on Android?
tests.push([ 'bug512295-1.html' , 'bug512295-1-ref.html' ]); // Tests spellchecker
tests.push([ 'bug512295-2.html' , 'bug512295-2-ref.html' ]); // Tests spellchecker
tests.push([ 'bug923376.html' , 'bug923376-ref.html' ]); // Tests spellchecker
tests.push([ 'bug1496118.html' , 'bug1496118-ref.html' ]); // Tests DnD
} else {
is(SpecialPowers.getIntPref("layout.spellcheckDefault"), 0, "Spellcheck should be turned off for this platform or this if..else check removed");
}

if (navigator.platform.includes("Linux")) {
if (navigator.platform.includes("Linux") && !navigator.appVersion.includes("Android")) {
tests = tests.concat([
// Turn off accessiblecaret to prevent it from interfering with the
// multi-range selection.
Expand Down
2 changes: 1 addition & 1 deletion testing/mochitest/tests/SimpleTest/WindowSnapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function assertSnapshots(s1, s2, expectEqual, fuzz, s1name, s2name) {
} else {
report += "REFTEST IMAGE: " + s1DataURI + "\n";
}
dump(report);
(info || dump)(report);
}
return passed;
}
Expand Down

0 comments on commit f96606f

Please sign in to comment.