Bug 1367194 - Explicitly pause video at the end of the test to prevent the media backend from pausing the video as the page closes and thus r=jaws

randomly firing a 'pause' event when the test isn't expecting it. r=jaws

MozReview-Commit-ID: 65NrpKbIxi7

--HG--
extra : rebase_source : 7e1ec55d5c23b8c0cfa49ca5298d77fef77a2e4b
This commit is contained in:
Ray Lin 2017-05-24 13:19:55 +08:00
parent d12f2af318
commit c4a9832435

View File

@ -420,9 +420,14 @@ function runTest(event) {
case 33:
is(event.type, "play", "checking event type");
ok(true, "video resume after mouseup");
SimpleTest.finish();
synthesizeMouse(video, playButtonCenterX, playButtonCenterY, { });
break;
// Bug 1367194: Always ensure video is paused before calling SimpleTest.finish().
case 34:
is(event.type, "pause", "checking event type");
SimpleTest.finish();
break;
default:
throw "unexpected test #" + testnum + " w/ event " + event.type;