blob: fcf04f51e0ed92490abec16e14143f398d08c1f8 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Testing Page::isPlayingAudio() with web audio");
jsTestIsAsync = true;
if (window.internals)
shouldBeFalse("window.internals.isPagePlayingAudio()");
var context = new webkitAudioContext();
var frequency = 300;
var oscillator = context.createOscillator();
if (window.internals)
shouldBeFalse("window.internals.isPagePlayingAudio()");
oscillator.frequency.value = frequency;
oscillator.type = 0;
oscillator.connect(context.destination);
oscillator.start(0);
shouldBecomeEqual("window.internals.isPagePlayingAudio()", "true", finishJSTest);
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>