Bug 1604200 - Second attempt at making reftest selection-001.html more reliable. r=dholbert
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 09 Mar 2020 19:37:13 +0000
changeset 517663 5068f7bd8bbed9774c351a29d0d432b5c1df3c77
parent 517662 69d466eda909a2f96ed4cf8a42ec19348cd87242
child 517664 ca720bdc1f1fc3c41a278d10c3c14b9016bd76e1
push id37199
push useropoprus@mozilla.com
push dateTue, 10 Mar 2020 03:43:44 +0000
treeherdermozilla-central@6f21f98dcfcd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1604200
milestone75.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
layout/reftests/high-contrast/selection-001-ref.html
layout/reftests/high-contrast/selection-001.html
--- a/layout/reftests/high-contrast/selection-001-ref.html
+++ b/layout/reftests/high-contrast/selection-001-ref.html
@@ -1,13 +1,11 @@
 <!doctype html>
 <title>Test reference</title>
 <p>
   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>
--- a/layout/reftests/high-contrast/selection-001.html
+++ b/layout/reftests/high-contrast/selection-001.html
@@ -5,15 +5,13 @@
   background: purple;
   color: blue;
 }
 </style>
 <p>
   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>