Bug 1253977 part 2 - Reftests.
authorMats Palmgren <mats@mozilla.com>
Fri, 11 Mar 2016 14:50:58 +0100
changeset 288279 0c6911b972d16d4a026d8aa799f74088f3436645
parent 288278 009922b47d80af4282374bf8ce5de9a4b0f069b0
child 288280 66a3bf3abe2eb4653cc6357736c3a43014b11364
push id30079
push userryanvm@gmail.com
push dateSat, 12 Mar 2016 20:24:19 +0000
treeherdermozilla-central@d1d47ba19ce9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1253977
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1253977 part 2 - Reftests. * * * Bug 1253977 - Tweak the reftest to make it pass on Windows 8. r=me
layout/reftests/forms/select/focusring-1-ref.html
layout/reftests/forms/select/focusring-1.html
layout/reftests/forms/select/focusring-2-ref.html
layout/reftests/forms/select/focusring-2.html
layout/reftests/forms/select/focusring-3-ref.html
layout/reftests/forms/select/focusring-3.html
layout/reftests/forms/select/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/select/focusring-1-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait"><head>
+    <meta charset="utf-8">
+    <title>Testcase #1 for bug 1253977</title>
+    <style type="text/css">
+
+* { -moz-appearance:none; }
+:focus {
+  border:2px solid black;
+}
+:-moz-focusring {
+  outline: 2px dashed black;
+}
+
+    </style>
+</head>
+<body>
+
+<select><option>1<option>2</select>
+<input>
+
+<script>
+
+function runTests() {
+  var s = document.querySelector("select");
+  var b = document.querySelector("input");
+  setTimeout(function(){ b.focus(); }, 0);
+  setTimeout(function(){ document.body.offsetHeight; document.documentElement.removeAttribute("class"); }, 0);
+}
+
+window.addEventListener("MozReftestInvalidate", runTests, false);
+
+</script>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/select/focusring-1.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait"><head>
+    <meta charset="utf-8">
+    <title>Testcase #1 for bug 1253977</title>
+    <style type="text/css">
+
+* { -moz-appearance:none; }
+:focus {
+  border:2px solid black;
+}
+:-moz-focusring {
+  outline: 2px dashed black;
+}
+
+    </style>
+</head>
+<body>
+
+<select><option>1<option>2</select>
+<input>
+
+<script>
+
+function runTests() {
+  var s = document.querySelector("select");
+  var b = document.querySelector("input");
+  setTimeout(function(){ s.focus();                  }, 1);
+  setTimeout(function(){ s.style.display = 'none';   }, 2);
+  setTimeout(function(){ b.focus();                  }, 3);
+  setTimeout(function(){ s.style.display = 'inline'; }, 4);
+  setTimeout(function(){ document.body.offsetHeight; document.documentElement.removeAttribute("class"); }, 0);
+}
+
+window.addEventListener("MozReftestInvalidate", runTests, false);
+
+</script>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/select/focusring-2-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML>
+<html><head>
+    <meta charset="utf-8">
+    <title>Testcase #2 for bug 1253977</title>
+    <style type="text/css">
+
+* { -moz-appearance:none; }
+:focus {
+  border:2px solid black;
+}
+:-moz-focusring {
+  outline: 2px dashed black;
+}
+
+    </style>
+</head>
+<body>
+
+<select><option>1<option>2</select>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/select/focusring-2.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait"><head>
+    <meta charset="utf-8">
+    <title>Testcase #2 for bug 1253977</title>
+    <style type="text/css">
+
+* { -moz-appearance:none; }
+:focus {
+  border:2px solid black;
+}
+:-moz-focusring {
+  outline: 2px dashed black;
+}
+
+    </style>
+</head>
+<body>
+
+<select><option>1<option>2</select>
+
+<script>
+
+function runTests(){
+  var s = document.querySelector("select");
+  setTimeout(function(){ s.focus();                  }, 1);
+  setTimeout(function(){ s.style.display = 'none';   }, 2);
+  setTimeout(function(){ s.blur();                   }, 3);
+  setTimeout(function(){ s.style.display = 'inline'; }, 4);
+  setTimeout(function(){ document.body.offsetHeight; document.documentElement.removeAttribute("class"); }, 0);
+}
+
+window.addEventListener("MozReftestInvalidate", runTests, false);
+
+</script>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/select/focusring-3-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait"><head>
+    <meta charset="utf-8">
+    <title>Testcase #3 for bug 1253977</title>
+    <style type="text/css">
+
+* { -moz-appearance:none; }
+:focus {
+  border:2px solid black;
+}
+:-moz-focusring {
+  outline: 2px dashed black;
+}
+
+    </style>
+</head>
+<body>
+
+<select><option>1<option>2</select>
+
+<script>
+
+function runTests(){
+  var s = document.querySelector("select");
+  s.focus();
+  document.body.offsetHeight;
+  setTimeout(function(){ document.documentElement.removeAttribute("class"); }, 100);
+}
+
+window.focus();
+window.addEventListener("MozReftestInvalidate", runTests, false);
+
+</script>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/forms/select/focusring-3.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait"><head>
+    <meta charset="utf-8">
+    <title>Testcase #3 for bug 1253977</title>
+    <style type="text/css">
+
+* { -moz-appearance:none; }
+:focus {
+  border:2px solid black;
+}
+:-moz-focusring {
+  outline: 2px dashed black;
+}
+
+    </style>
+</head>
+<body>
+
+<select onfocus="continueTest1()"><option>1<option>2</select>
+
+<script>
+
+function continueTest1(){
+  var s = document.querySelector("select");
+  setTimeout(function(){ s.style.display = 'none';   }, 2);
+  setTimeout(function(){ s.style.display = 'inline'; document.body.offsetHeight; }, 4);
+  setTimeout(function(){ document.documentElement.removeAttribute("class"); }, 100);
+}
+function runTests(){
+  var s = document.querySelector("select");
+  s.focus();
+  setTimeout(function(){ s.style.display = 'none';   }, 2);
+  setTimeout(function(){ s.style.display = 'inline'; }, 4);
+  setTimeout(function(){ document.body.offsetHeight; document.documentElement.removeAttribute("class"); }, 0);
+}
+
+window.focus();
+window.addEventListener("MozReftestInvalidate", runTests, false);
+
+</script>
+
+</body>
+</html>
--- a/layout/reftests/forms/select/reftest.list
+++ b/layout/reftests/forms/select/reftest.list
@@ -1,8 +1,11 @@
 skip-if(B2G||Mulet) == out-of-bounds-selectedindex.html out-of-bounds-selectedindex-ref.html # test for bug 471741 # Initial mulet triage: parity with B2G/B2G Desktop
 skip-if(B2G||Mulet) == multiple.html multiple-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
 == boguskids.html boguskids-ref.html
 == dynamic-boguskids.html boguskids-ref.html
 == option-children.html option-children-ref.html
 fuzzy(1,4) == padding-button-placement.html padding-button-placement-ref.html
 HTTP(../..) == vertical-centering.html vertical-centering-ref.html
 == 997709-2.html 997709-2-ref.html
+needs-focus == focusring-1.html focusring-1-ref.html
+needs-focus == focusring-2.html focusring-2-ref.html
+needs-focus == focusring-3.html focusring-3-ref.html