tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_mp3_with_multiple_ID3v2.html (903B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4 <title>Play mp3 file with multiple ID3v2 tags</title>
      5 <script src="/tests/SimpleTest/SimpleTest.js"></script>
      6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
      7 <script type="application/javascript">
      8 
      9 add_task(async function testPlayMP3WithMultipleID3Tags() {
     10  info(`adjust cache size`);
     11  await SpecialPowers.pushPrefEnv(
     12    // The second ID3v2 header is huge (4622361 bytes) so the first audio samle
     13    // in this file is in the position 4945370, so we have to extend the size of
     14    // the cache.
     15    {"set": [["media.cache_size", 5000000]]}
     16  );
     17 
     18  info(`create audio and wait its loading`);
     19  let audio = document.createElement('audio');
     20  audio.src = "multi_id3v2.mp3";
     21  document.body.appendChild(audio);
     22  await new Promise(r => audio.onloadeddata = r);
     23  ok(true, `finishing loading data.`)
     24 });
     25 
     26 </script>
     27 </head>
     28 <body>
     29 </body>
     30 </html>