Bug 1581891 [wpt PR 19122] - Fix onload setup in wpt/svg/animations/syncbase-remove-add-while-running.html, a=testonly
authorFredrik Söderquist <fs@opera.com>
Mon, 23 Sep 2019 12:24:57 +0000
changeset 494846 5bf8c6f75df9631f0afc73c19f663f56b003eaf0
parent 494845 669e8d772b8ac7f716f1ea564f7fd0021848329e
child 494847 f7830503e547f188f58687e472c1ca24d70c6b45
push id36615
push usercsabou@mozilla.com
push dateWed, 25 Sep 2019 09:50:53 +0000
treeherdermozilla-central@c31591e0b66f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1581891, 19122, 1807119, 698419
milestone71.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 1581891 [wpt PR 19122] - Fix onload setup in wpt/svg/animations/syncbase-remove-add-while-running.html, a=testonly Automatic update from web-platform-tests Fix onload setup in wpt/svg/animations/syncbase-remove-add-while-running.html Set window.onload in the test step not from the async_test() return value (which is a Test object). Change-Id: I0fd9b5a939a6b1ad8f87862f1008ffc2b79c16e5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807119 Reviewed-by: Stephen Chenney <schenney@chromium.org> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#698419} -- wpt-commits: 786fc058fd83cbf002be3a35100ab2a3b1f98d58 wpt-pr: 19122
testing/web-platform/tests/svg/animations/syncbase-remove-add-while-running.html
--- a/testing/web-platform/tests/svg/animations/syncbase-remove-add-while-running.html
+++ b/testing/web-platform/tests/svg/animations/syncbase-remove-add-while-running.html
@@ -1,26 +1,25 @@
-<!doctype html>
-
-<meta charset="utf-8">
+<!DOCTYPE html>
 <title>Remove/Add syncbase while animation is running</title>
 <link rel="help" href="https://www.w3.org/TR/SMIL3/smil-timing.html#q26">
 <link rel="author" title="Edvard Thörnros" href="mailto:edvardt@opera.com">
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 
 <svg>
   <animate id="anim" attributeName="visibility" to="visible" begin="10s" dur="2s"/>
   <rect x="0" y="0" width="0" height="100" fill="#0F0">
     <set attributeName="width" fill="freeze" to="100" begin="anim.begin"/>
   </rect>
 </svg>
 
 <script>
-    document.querySelector("body").onload = async_test(function(t) {
+  async_test(function(t) {
+    window.onload = t.step_func(function() {
       let svg = document.querySelector("svg");
       let rect = document.querySelector("rect");
 
       window.requestAnimationFrame(t.step_func(function() {
         window.requestAnimationFrame(t.step_func(function() {
           var anim1 = document.getElementById("anim");
           anim1.parentNode.removeChild(anim1);
 
@@ -36,9 +35,10 @@
             window.requestAnimationFrame(t.step_func_done(function() {
               svg.pauseAnimations();
               assert_equals(rect.width.animVal.value, 100, "Sync base triggered");
             }));
           }));
         }));
       }));
     });
+  });
 </script>