| <script src="../resources/js-test-pre.js"></script> |
| <video src="content/audio-tracks.mp4" controls autoplay loop></video> |
| <script src="media-file.js"></script> |
| <script src="video-test.js"></script> |
| description("Testing that muting a video element should result in page's audio playing state to become false"); |
| function testUnmutingVideo() |
| run("video.muted = false"); |
| shouldBecomeEqual("window.internals.isPagePlayingAudio()", "true", finishJSTest); |
| function testMutingVideo() |
| run("video.muted = true"); |
| shouldBecomeEqual("window.internals.isPagePlayingAudio()", "false", testUnmutingVideo); |
| shouldBecomeEqual("window.internals.isPagePlayingAudio()", "true", testMutingVideo); |
| <script src="../resources/js-test-post.js"></script> |