mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
test for bug 938022
--HG-- extra : rebase_source : 69a7203cb040ef6b33666c2444b8df043dbf7f32
This commit is contained in:
parent
0604b7f97a
commit
2e56670ab5
@ -63,6 +63,7 @@ support-files =
|
||||
[test_bug875221.html]
|
||||
[test_bug875402.html]
|
||||
[test_bug894150.html]
|
||||
[test_bug938022.html]
|
||||
[test_bug956489.html]
|
||||
[test_bug964376.html]
|
||||
[test_channelMergerNode.html]
|
||||
|
28
content/media/webaudio/test/test_bug938022.html
Normal file
28
content/media/webaudio/test/test_bug938022.html
Normal file
@ -0,0 +1,28 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test audio element currentTime is correct when used as media source</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(function() {
|
||||
var context = new AudioContext();
|
||||
var audio = new Audio("small-shot.ogg");
|
||||
audio.load();
|
||||
audio.addEventListener("loadeddata", function (e) {
|
||||
is(this.currentTime, 0, "currentTime must be 0");
|
||||
SimpleTest.finish();
|
||||
});
|
||||
audio.play();
|
||||
|
||||
var source = context.createMediaElementSource(audio);
|
||||
source.connect(context.destination);
|
||||
});
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user