Bug 1270738 - don't need to check the playing state for 'test_audioNotificationSilent_audioFile.html'. r=baku

The reason to check the playing state is because we want to make sure the non-audible event is not due to
media element ended. However, in bug 1240423, we introduced the different inactive state (inactive-pause and
inactive-nonaudible), so we don't need to check the playing state anymore, we can just check whether the event
is 'inactive-nonaudible', but not 'inactive-pause'.

MozReview-Commit-ID: 6slOhb68Qp5

--HG--
extra : rebase_source : 08529c37e32a7dacc6b14407d536240fcca510c4
This commit is contained in:
Alastor Wu 2016-11-21 11:25:10 +08:00
Родитель 9ff0290252
Коммит 3a6f6a036e
1 изменённых файлов: 0 добавлений и 4 удалений

Просмотреть файл

@ -12,7 +12,6 @@ SimpleTest.waitForExplicitFinish();
var generator = runTest();
var expectedPlaybackActive = null;
var expectedPlaying = null;
var audio = new Audio();
audio.src = "audioEndedDuringPlaying.webm";
@ -24,7 +23,6 @@ var observer = {
observe: function(subject, topic, data) {
is(topic, "audio-playback", "audio-playback received");
is(data, expectedPlaybackActive, "Corrrect audible state");
is(!audio.ended, expectedPlaying, "Corrrect playing state");
continueTest();
}
};
@ -42,7 +40,6 @@ function audioPlayingStart() {
ok(true, "Observer set");
expectedPlaybackActive = 'active';
expectedPlaying = true;
info("Audio playing start");
audio.play();
@ -52,7 +49,6 @@ function audioBecomeSilentDuringPlaying() {
info("Audio would become silent during playing");
expectedPlaybackActive = 'inactive-nonaudible';
expectedPlaying = true;
}
function finish() {