Bug 1082486 - Part 6 - Add tests to test_reftests_with_caret.html. r=roc
authorTing-Yu Lin <tlin@mozilla.com>
Sun, 19 Oct 2014 02:59:00 +0200
changeset 211197 0ecbecdbc21ff955fb095ec8e993347249d6078c
parent 211196 c76f0ce30414aaac75bde463dd51f9e564e45300
child 211198 2c52ec780e679523ae0f87cfb1d463ac551c889c
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersroc
bugs1082486
milestone36.0a1
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.
layout/base/tests/bug1082486-1-ref.html
layout/base/tests/bug1082486-1.html
layout/base/tests/bug1082486-2-ref.html
layout/base/tests/bug1082486-2.html
layout/base/tests/mochitest.ini
layout/base/tests/test_reftests_with_caret.html
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'   ] ,