Bug 1340441 part 2: Add a failsafe to remove "reftest-wait" in crashtest 1338772-1.html, after some time has elapsed. (test-only, no review)

MozReview-Commit-ID: 94yCXN8AbQ6
This commit is contained in:
Daniel Holbert 2017-02-27 16:53:23 -08:00
Родитель 9fb1ff597d
Коммит 7e75a0fa30
1 изменённых файлов: 13 добавлений и 1 удалений

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

@ -21,8 +21,20 @@ function loadHandler() {
inner.height = "5px";
inner.offsetTop;
}
// This function is a hack to avoid sporadic test-failures with...
// "...timed out waiting for reftest-wait to be removed".
// Occasionally, it seems this test loses a race condition of some sort, and
// its resize handler isn't invoked. When that happens (and specifically, when
// the test runs for longer than 500ms), we clear reftest-wait and call the
// run a "pass" (which is kind of valid, because we didn't crash!) and move on.
function setupFailsafe() {
setTimeout(() => {
document.documentElement.removeAttribute("class");
}, 500);
}
</script>
<body>
<body onload="setupFailsafe()">
<iframe id="outer"
src="data:text/html,<html><body>"
onload="loadHandler()">