From d093f88ec35c8fda389be5ff52d3c18a42f98194 Mon Sep 17 00:00:00 2001 From: Simon Pieters Date: Mon, 4 Jun 2018 18:32:54 +0200 Subject: [PATCH] Use test.step_func() in mediasource-append-buffer.html Part of #11269. --- media-source/mediasource-append-buffer.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/media-source/mediasource-append-buffer.html b/media-source/mediasource-append-buffer.html index 7245f64ab86254..ff4cd4e663a347 100644 --- a/media-source/mediasource-append-buffer.html +++ b/media-source/mediasource-append-buffer.html @@ -425,11 +425,11 @@ loadedmetadataCalled = true; e.target.removeEventListener(e.type, metadata); }); - sourceBuffer.addEventListener("updateend", function updateend(e) { + sourceBuffer.addEventListener("updateend", test.step_func(function updateend(e) { assert_true(loadedmetadataCalled); assert_equals(mediaElement.readyState, mediaElement.HAVE_METADATA); e.target.removeEventListener(e.type, updateend); - }); + })); test.expectEvent(sourceBuffer, "updateend", "remainingInitSegment append ended."); test.expectEvent(mediaElement, "loadedmetadata", "loadedmetadata event received."); sourceBuffer.appendBuffer(initSegment); @@ -444,11 +444,11 @@ loadeddataCalled = true; e.target.removeEventListener(e.type, loadeddata); }); - sourceBuffer.addEventListener("updateend", function updateend(e) { + sourceBuffer.addEventListener("updateend", test.step_func(function updateend(e) { assert_true(loadeddataCalled); assert_greater_than_equal(mediaElement.readyState, mediaElement.HAVE_CURRENT_DATA); e.target.removeEventListener(e.type, updateend); - }); + })); test.expectEvent(sourceBuffer, "updateend", "mediaSegment append ended."); test.expectEvent(mediaElement, "loadeddata", "loadeddata fired."); sourceBuffer.appendBuffer(mediaSegment);