Bug 1253977 part 2 - Reftests.

* * *
Bug 1253977 - Tweak the reftest to make it pass on Windows 8.  r=me
This commit is contained in:
Mats Palmgren 2016-03-11 14:50:58 +01:00
Родитель 22f0e87b7d
Коммит 46689fcaca
7 изменённых файлов: 216 добавлений и 0 удалений

Просмотреть файл

@ -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>

Просмотреть файл

@ -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>

Просмотреть файл

@ -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>

Просмотреть файл

@ -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>

Просмотреть файл

@ -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>

Просмотреть файл

@ -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>

Просмотреть файл

@ -6,3 +6,6 @@ skip-if(B2G||Mulet) == multiple.html multiple-ref.html # Initial mulet triage: p
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