Bug 1633038 - wait for MozReftestInvalidate draft bug1633038
authorlongsonr <longsonr@gmail.com>
Mon, 15 Feb 2021 18:55:58 +0000
changeset 3541952 aa89fa7e5bfc96392b9b65756b00d83c6b5e9426
parent 3540144 de2452d764b9b813d15b0913de65b5cfa6b94956
child 3689091 cbae47fc2044b98b4811afb3c82eec2b37190b19
push id655283
push userlongsonr@gmail.com
push dateMon, 15 Feb 2021 18:57:35 +0000
treeherdertry@aa89fa7e5bfc [default view] [failures only]
bugs1633038
milestone87.0a1
Bug 1633038 - wait for MozReftestInvalidate
layout/reftests/svg/text/selectSubString-2-ref.svg
layout/reftests/svg/text/selectSubString-2.svg
layout/reftests/svg/text/selectSubString-3-ref.svg
layout/reftests/svg/text/selectSubString-3.svg
layout/reftests/svg/text/selectSubString-ref.svg
layout/reftests/svg/text/selectSubString.svg
--- a/layout/reftests/svg/text/selectSubString-2-ref.svg
+++ b/layout/reftests/svg/text/selectSubString-2-ref.svg
@@ -2,18 +2,20 @@
      Any copyright is dedicated to the Public Domain.
      http://creativecommons.org/publicdomain/zero/1.0/
 -->
 <svg xmlns="http://www.w3.org/2000/svg" width="700" height="200" class="reftest-wait">
   <g transform="translate(100,100)" style="font: 16px sans-serif">
     <text>hello</text>
   </g>
   <script>
-    onload = function() {
+    function f() {
       var text = document.getElementsByTagName("text")[0];
       var range = document.createRange();
       range.setStart(text.firstChild, 0);
       range.setEnd(text.firstChild, 5);
       window.getSelection().addRange(range);
       document.documentElement.removeAttribute("class");
     }
+
+    window.addEventListener("MozReftestInvalidate", f, false);
   </script>
 </svg>
--- a/layout/reftests/svg/text/selectSubString-2.svg
+++ b/layout/reftests/svg/text/selectSubString-2.svg
@@ -2,15 +2,17 @@
      Any copyright is dedicated to the Public Domain.
      http://creativecommons.org/publicdomain/zero/1.0/
 -->
 <svg xmlns="http://www.w3.org/2000/svg" width="700" height="200" class="reftest-wait">
   <g transform="translate(100,100)" style="font: 16px sans-serif">
     <text>hello</text>
   </g>
   <script>
-    onload = function() {
+    function f() {
       var text = document.getElementsByTagName("text")[0];
       text.selectSubString(0, 5);
       document.documentElement.removeAttribute("class");
     }
+
+    window.addEventListener("MozReftestInvalidate", f, false);
   </script>
 </svg>
--- a/layout/reftests/svg/text/selectSubString-3-ref.svg
+++ b/layout/reftests/svg/text/selectSubString-3-ref.svg
@@ -2,18 +2,20 @@
      Any copyright is dedicated to the Public Domain.
      http://creativecommons.org/publicdomain/zero/1.0/
 -->
 <svg xmlns="http://www.w3.org/2000/svg" width="700" height="200" class="reftest-wait">
   <g transform="translate(100,100)" style="font: 16px sans-serif">
     <text>abc אבג 123 דהו def</text>
   </g>
   <script>
-    onload = function() {
+    function f() {
       var text = document.getElementsByTagName("text")[0];
       var range = document.createRange();
       range.setStart(text.firstChild, 0);
       range.setEnd(text.firstChild, 9);
       window.getSelection().addRange(range);
       document.documentElement.removeAttribute("class");
     }
+
+    window.addEventListener("MozReftestInvalidate", f, false);
   </script>
 </svg>
--- a/layout/reftests/svg/text/selectSubString-3.svg
+++ b/layout/reftests/svg/text/selectSubString-3.svg
@@ -4,15 +4,17 @@
 -->
 <svg xmlns="http://www.w3.org/2000/svg" width="700" height="200" class="reftest-wait">
   <g transform="translate(100,100)" style="font: 16px sans-serif">
     <text>
         abc אבג 123 דהו def
     </text>
   </g>
   <script>
-    onload = function() {
+    function f() {
       var text = document.getElementsByTagName("text")[0];
       text.selectSubString(0, 9);
       document.documentElement.removeAttribute("class");
     }
+
+    window.addEventListener("MozReftestInvalidate", f, false);
   </script>
 </svg>
--- a/layout/reftests/svg/text/selectSubString-ref.svg
+++ b/layout/reftests/svg/text/selectSubString-ref.svg
@@ -2,18 +2,20 @@
      Any copyright is dedicated to the Public Domain.
      http://creativecommons.org/publicdomain/zero/1.0/
 -->
 <svg xmlns="http://www.w3.org/2000/svg" width="700" height="200" class="reftest-wait">
   <g transform="translate(100,100)" style="font: 16px sans-serif">
     <text>hello</text>
   </g>
   <script>
-    onload = function() {
+    function f() {
       var text = document.getElementsByTagName("text")[0];
       var range = document.createRange();
       range.setStart(text.firstChild, 1);
       range.setEnd(text.firstChild, 4);
       window.getSelection().addRange(range);
       document.documentElement.removeAttribute("class");
     }
+
+    window.addEventListener("MozReftestInvalidate", f, false);
   </script>
 </svg>
--- a/layout/reftests/svg/text/selectSubString.svg
+++ b/layout/reftests/svg/text/selectSubString.svg
@@ -2,15 +2,17 @@
      Any copyright is dedicated to the Public Domain.
      http://creativecommons.org/publicdomain/zero/1.0/
 -->
 <svg xmlns="http://www.w3.org/2000/svg" width="700" height="200" class="reftest-wait">
   <g transform="translate(100,100)" style="font: 16px sans-serif">
     <text>hello</text>
   </g>
   <script>
-    onload = function() {
+    function f() {
       var text = document.getElementsByTagName("text")[0];
       text.selectSubString(1, 3);
       document.documentElement.removeAttribute("class");
     }
+
+    window.addEventListener("MozReftestInvalidate", f, false);
   </script>
 </svg>