Bug 1604200 - Second attempt at making reftest selection-001.html more reliable. r=dholbert

It seems webrender has some invalidation issues on the test reference and won't
paint the selected text on time. Instead, run the selection ASAP so that it
hopefully paints soon enough.

Differential Revision: https://phabricator.services.mozilla.com/D66108

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2020-03-09 19:37:13 +00:00
parent eeebdc5587
commit 146ba43385
2 changed files with 8 additions and 12 deletions

View File

@ -4,10 +4,8 @@
Some selected text
</p>
<script>
onload = function() {
getSelection().removeAllRanges();
let r = document.createRange();
r.selectNode(document.documentElement);
getSelection().addRange(r);
}
getSelection().removeAllRanges();
let r = document.createRange();
r.selectNode(document.documentElement);
getSelection().addRange(r);
</script>

View File

@ -10,10 +10,8 @@
Some selected text
</p>
<script>
onload = function() {
getSelection().removeAllRanges();
let r = document.createRange();
r.selectNode(document.documentElement);
getSelection().addRange(r);
}
getSelection().removeAllRanges();
let r = document.createRange();
r.selectNode(document.documentElement);
getSelection().addRange(r);
</script>