Skip to content

Commit

Permalink
UI test for audio tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-liu committed Oct 16, 2012
1 parent 8bb113d commit e9e3373
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions test_apps/uitest/index.html
Expand Up @@ -34,6 +34,7 @@
<li><a href="#test=pickphoto">Pick Photo</a></li>
<li><a href="#test=pay">navigator.mozPay tests</a></li>
<li><a href="#test=inputmode">text inputmode tests</a></li>
<li><a href="#test=audiotag">audio tag tests</a></li>
</ul>
</div>
<div id="test-panel" class="panel">
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added test_apps/uitest/style/ringtones/classic.ogg
Binary file not shown.
40 changes: 40 additions & 0 deletions test_apps/uitest/tests/audiotag.html
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Audio Tag test</title>
<style>
button {
font-size: 40px;
}
</style>
<script>
var play = function _play(src) {
var ringtonePlayer = new Audio();
ringtonePlayer.loop = true;
var selectedSound = '../style/ringtones/' + src;
ringtonePlayer.src = selectedSound;
ringtonePlayer.play();
window.setTimeout(function _pauseRingtone() {
ringtonePlayer.pause();
}, 20000);
}

</script>
</head>
<body>
<h1>Audio Tag Test</h1>
<h2>classic.ogg</h2>
<button onclick="play('classic.ogg')">Play</button></p>
<h2>AC_prgrssv__Retro_Alarm_Clock_v02_SOFT.ogg</h2>
<button onclick="play('AC_prgrssv__Retro_Alarm_Clock_v02_SOFT.ogg')">Play</button></p>
<h2>AC_progressive_dapple10.ogg</h2>
<button onclick="play('AC_progressive_dapple10.ogg')">Play</button></p>
<h2>AC_progressive_shimmer07.ogg</h2>
<button onclick="play('AC_progressive_shimmer07.ogg')">Play</button></p>
<h2>ALARM_progressive_dapple.mp3</h2>
<button onclick="play('ALARM_progressive_dapple.mp3')">Play</button></p>
<h2>ALARM_progressive2_dapple.mp3</h2>
<button onclick="play('ALARM_progressive2_dapple.mp3')">Play</button></p>
</body>
</html>

0 comments on commit e9e3373

Please sign in to comment.