Bug 1530585 - Re-enable test_background_video_resume_after_end_show_last_frame.html r=jya
authorsotaro <sotaro.ikeda.g@gmail.com>
Mon, 04 Mar 2019 20:59:30 +0000
changeset 520173 341088b5783b543852906cc7c7b87e0a78b64732
parent 520172 bfb349870bbfec611db4ca53391bdf61df15992b
child 520174 bc972ff775adcb8faa2436968a6305fc5ae5dfd7
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1530585
milestone67.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 1530585 - Re-enable test_background_video_resume_after_end_show_last_frame.html r=jya The test expects that video is visible. The test needs to wait until the video element becomes visible. And appending a video element to document with loading the test video triggered 'mozentervideosuspend' event. It caused the test failure. Differential Revision: https://phabricator.services.mozilla.com/D21174
dom/media/test/mochitest.ini
dom/media/test/test_background_video_resume_after_end_show_last_frame.html
--- a/dom/media/test/mochitest.ini
+++ b/dom/media/test/mochitest.ini
@@ -1279,17 +1279,17 @@ skip-if = toolkit == 'android' # android
 tags = suspend
 [test_background_video_no_suspend_short_vid.html]
 skip-if = toolkit == 'android' # android(bug 1304480)
 tags = suspend
 [test_background_video_no_suspend_not_in_tree.html]
 skip-if = toolkit == 'android' # bug 1346705
 tags = suspend
 [test_background_video_resume_after_end_show_last_frame.html]
-skip-if = toolkit == 'android' || ( webrender && os == "linux") # bug 1346705, bug 1516043
+skip-if = toolkit == 'android' # bug 1346705
 tags = suspend
 [test_background_video_suspend.html]
 skip-if = toolkit == 'android' # android(bug 1304480)
 tags = suspend
 [test_background_video_suspend_ends.html]
 skip-if = toolkit == 'android' # bug 1295884, android(bug 1304480, bug 1232305)
 tags = suspend
 [test_background_video_tainted_by_capturestream.html]
--- a/dom/media/test/test_background_video_resume_after_end_show_last_frame.html
+++ b/dom/media/test/test_background_video_resume_after_end_show_last_frame.html
@@ -96,26 +96,30 @@ startTest({
     [ "media.suspend-bkgnd-video.enabled", true ],
     [ "media.suspend-bkgnd-video.delay-ms", 100 ],
     [ "media.dormant-on-pause-timeout-ms", -1],
     [ "media.decoder.skip-to-next-key-frame.enabled", false]
   ],
   tests: gDecodeSuspendTests,
 
   runTest: (test, token) => {
-    let v = appendVideoToDoc(test.name, token);
+    let v = appendVideoToDocWithoutLoad(token);
     let vReference = appendVideoToDocWithoutLoad(token+"-ref");
     manager.started(token);
 
     /*
      * This test checks that, after a video element had finished its playback,
      * resuming video decoder should seek to the last frame.
      * This issue was found in bug 1358057.
      */
-    Promise.all([waitUntilPlaying(v), loadAndWaitUntilLoadedmetadata(vReference, test.name, "auto")])
+    waitUntilVisible(v)
+      .then(() => {
+        return Promise.all([loadAndWaitUntilLoadedmetadata(v, test.name), loadAndWaitUntilLoadedmetadata(vReference, test.name, "auto")]);
+      })
+      .then(() => waitUntilPlaying(v))
       .then(() => testVideoSuspendsWhenHidden(v))
       .then(() => {
         return Promise.all([waitUntilEnded(v), waitUntilSeekToLastFrame(vReference)]);
       })
       .then(() => testVideoOnlySeekCompletedWhenShown(v))
       .then(() => {
         testSameContent(v, vReference);
         removeNodeAndSource(v);