зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1330962 part 6 - Start this test using MozReftestInvalidate rather than onload.
The test fails when using onload if it's the first test to run in its reftest chunk.
This commit is contained in:
Родитель
84fc7f3624
Коммит
b2ac374a02
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<style>
|
||||
input ~ label {color: red}
|
||||
|
@ -8,9 +8,7 @@
|
|||
input:checked:default + label {color: green}
|
||||
</style>
|
||||
</head>
|
||||
<body onload='document.getElementById("two").setAttribute("checked", "true");
|
||||
document.getElementById("one").setAttribute("checked", "checked");
|
||||
document.getElementById("two").removeAttribute("checked");'>
|
||||
<body>
|
||||
<form>
|
||||
<input type="checkbox" name="group1" id="one" value="1"/>
|
||||
<label for="one">Should be no red</label><br>
|
||||
|
@ -19,5 +17,14 @@
|
|||
<input type="checkbox" name="group1" id="three" value="3"/>
|
||||
<label for="three">Should be no red</label>
|
||||
</form>
|
||||
<script>
|
||||
function doTest() {
|
||||
document.getElementById("two").setAttribute("checked", "true");
|
||||
document.getElementById("one").setAttribute("checked", "checked");
|
||||
document.getElementById("two").removeAttribute("checked");
|
||||
setTimeout(function () { document.documentElement.removeAttribute("class"); }, 0);
|
||||
}
|
||||
window.addEventListener("MozReftestInvalidate", doTest);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Загрузка…
Ссылка в новой задаче