Skip to content

Commit

Permalink
servo: Check reftest-wait in the document element to match the othe…
Browse files Browse the repository at this point in the history
…r executors. (#219)

We suspect this to be the case for many intermittents in Servo.

r=gsnedders
  • Loading branch information
emilio authored and gsnedders committed Nov 19, 2016
1 parent f0f7e15 commit 5ece511
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions test/testdata/reftest/reftest_wait_0.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<html class="reftest-wait">
<title>rel=match that should fail</title>
<link rel=match href=red.html>
<style>
:root {background-color:red}
</style>
<body class="reftest-wait">
<script>
setTimeout(function() {
document.documentElement.style.backgroundColor = "green";
body.className = "";
}, 2000);
document.documentElement.className = "";
}, 2000);
</script>
</html>
2 changes: 1 addition & 1 deletion wptrunner/executors/reftest-wait_servodriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
callback = arguments[arguments.length - 1];

function check_done() {
if (!document.body.classList.contains('reftest-wait')) {
if (!document.documentElement.classList.contains('reftest-wait')) {
callback();
} else {
setTimeout(check_done, 50);
Expand Down

0 comments on commit 5ece511

Please sign in to comment.