4 <script src="../resources/js-test-pre.js"></script>
7 <video src="content/audio-tracks.mp4" controls autoplay loop></video>
8 <script src="media-file.js"></script>
9 <script src="video-test.js"></script>
11 description("Testing that muting a video element should result in page's audio playing state to become false");
15 function testUnmutingVideo()
17 run("video.muted = false");
18 shouldBecomeEqual("window.internals.pageMediaState().includes('IsPlayingAudio')", "true", finishJSTest);
21 function testMutingVideo()
23 run("video.muted = true");
24 shouldBecomeEqual("window.internals.pageMediaState().includes('IsPlayingAudio')", "false", testUnmutingVideo);
27 shouldBecomeEqual("window.internals.pageMediaState().includes('IsPlayingAudio')", "true", testMutingVideo);
29 <script src="../resources/js-test-post.js"></script>