From db23e93b54d039d259c4611b667284e92759e672 Mon Sep 17 00:00:00 2001 From: "qunfang.lin" Date: Wed, 6 May 2020 03:12:15 +0800 Subject: [PATCH] [common][gumallow][DPTTIZEN-3193, request update to mediastream-idl tc] Change-Id: I7f0687f5e7aecaf26cfb3eafcc9f9f65ca03370c Signed-off-by: qunfang.lin --- .../mediastream/mediastream-idl-manual.html | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/common/tct-gumallow-w3c-tests/gumallow/w3c/stream-api/mediastream/mediastream-idl-manual.html b/common/tct-gumallow-w3c-tests/gumallow/w3c/stream-api/mediastream/mediastream-idl-manual.html index 2ddd09a92..c76fbe2b6 100755 --- a/common/tct-gumallow-w3c-tests/gumallow/w3c/stream-api/mediastream/mediastream-idl-manual.html +++ b/common/tct-gumallow-w3c-tests/gumallow/w3c/stream-api/mediastream/mediastream-idl-manual.html @@ -36,15 +36,17 @@ t.step(function() { assert_equals(stream4.getTrackById(audioTrack1.id), audioTrack1, "a non-ended track gets added via the MediaStream constructor"); var audioTrack2 = audioTrack1.clone(); - audioTrack2.addEventListener("ended", t.step_func(function () { - var stream3 = new MediaStream([audioTrack2, videoTrack]); - assert_equals(stream3.getTrackById(audioTrack2.id), null, "an ended track doesn't get added via the MediaStream constructor"); - assert_equals(stream3.getTrackById(videoTrack.id), videoTrack, "a non-ended track gets added via the MediaStream constructor even if the previous track was ended"); - var stream5 = new MediaStream([audioTrack2]); - assert_false(stream5.active, "a MediaStream created using the MediaStream() constructor whose arguments are lists of MediaStreamTrack objects that are all ended, the MediaStream object MUST be created with its active attribute set to false"); - t.done(); - }), false); audioTrack2.stop(); + assert_equals(audioTrack2.readyState, "ended", "a stopped track is marked ended synchronously"); + + var stream3 = new MediaStream([audioTrack2, videoTrack]); + assert_equals(stream3.getTrackById(audioTrack2.id), audioTrack2, "an ended track gets added via the MediaStream constructor"); + assert_equals(stream3.getTrackById(videoTrack.id), videoTrack, "a non-ended track gets added via the MediaStream constructor even if the previous track was ended"); + var stream5 = new MediaStream([audioTrack2]); + + assert_equals(stream5.getTrackById(audioTrack2.id), audioTrack2, "an ended track gets added via the MediaStream constructor"); + assert_false(stream5.active, "a MediaStream created using the MediaStream() constructor whose arguments are lists of MediaStreamTrack objects that are all ended, the MediaStream object MUST be created with its active attribute set to false"); + t.done(); }), function(error) {}); }); -- 2.34.1