Bug 1082486 - Part 6 - Add tests to test_reftests_with_caret.html. r=roc
Touch caret should not be show in the two test cases since caret does
not show in the scroll frame.
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/bug1082486-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ /* Eliminate the blue glow when focusing the element. */
+ input {
+ background: none;
+ border: none;
+ outline: none;
+ }
+ </style>
+ </head>
+ <body>
+ <a target="_blank" href="https://bugzil.la/1082486">Mozilla Bug 1082486</a>
+ <input id='i' value="abcdefghd" style="text-indent: -10px">
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/bug1082486-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ /* Eliminate the blue glow when focusing the element. */
+ input {
+ background: none;
+ border: none;
+ outline: none;
+ }
+ </style>
+ </head>
+ <body onload="document.getElementById('i').focus();">
+ <a target="_blank" href="https://bugzil.la/1082486">Mozilla Bug 1082486</a>
+
+ <!-- The caret will not be seen when the input is focused. -->
+ <input id='i' value="abcdefghd" style="text-indent: -10px">
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/bug1082486-2-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <a target="_blank" href="https://bugzil.la/1082486">Mozilla Bug 1082486</a>
+
+ <!-- The whole input will not be seen. -->
+ <input id='i' value="abcdefghd" style="position: absolute; top: -100px; left: 0px;">
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/bug1082486-2.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body onload="document.getElementById('i').focus();">
+ <a target="_blank" href="https://bugzil.la/1082486">Mozilla Bug 1082486</a>
+
+ <!-- The whole input will not be seen. -->
+ <input id='i' value="abcdefghd" style="position: absolute; top: -100px; left: 0px;">
+ </body>
+</html>
--- a/layout/base/tests/mochitest.ini
+++ b/layout/base/tests/mochitest.ini
@@ -159,16 +159,20 @@ support-files =
bug966992-2.html
bug966992-2-ref.html
bug966992-3.html
bug966992-3-ref.html
bug1007065-1.html
bug1007065-1-ref.html
bug1007067-1.html
bug1007067-1-ref.html
+ bug1082486-1.html
+ bug1082486-1-ref.html
+ bug1082486-2.html
+ bug1082486-2-ref.html
[test_bug514127.html]
[test_bug518777.html]
[test_bug548545.xhtml]
[test_bug558663.html]
[test_bug559499.html]
[test_bug569520.html]
[test_bug582181-1.html]
[test_bug582181-2.html]
--- a/layout/base/tests/test_reftests_with_caret.html
+++ b/layout/base/tests/test_reftests_with_caret.html
@@ -103,16 +103,18 @@ function endTest() {
}
var tests = [
[ 'bug106855-1.html' , 'bug106855-1-ref.html' ] ,
[ 'bug106855-2.html' , 'bug106855-1-ref.html' ] ,
[ 'bug389321-2.html' , 'bug389321-2-ref.html' ] ,
[ 'bug389321-3.html' , 'bug389321-3-ref.html' ] ,
[ 'bug613807-1.html' , 'bug613807-1-ref.html' ] ,
+ [ 'bug1082486-1.html', 'bug1082486-1-ref.html'] ,
+ [ 'bug1082486-2.html', 'bug1082486-2-ref.html'] ,
// The following test cases are all involving with one sending
// synthesizeKey(), the other without. They ought to be failed
// when touch caret preference on. Test them with preference off.
function() {SpecialPowers.setBoolPref("touchcaret.enabled", false);} ,
[ 'bug240933-1.html' , 'bug240933-1-ref.html' ] ,
[ 'bug240933-2.html' , 'bug240933-1-ref.html' ] ,
[ 'bug389321-1.html' , 'bug389321-1-ref.html' ] ,
[ 'bug482484.html' , 'bug482484-ref.html' ] ,