1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/media/test/test_audioDocumentTitle.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,56 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=463830 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 463830</title> 1.11 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.13 +</head> 1.14 +<body> 1.15 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=463830">Mozilla Bug 463830</a> 1.16 +<p id="display"></p> 1.17 +<iframe id="i"></iframe> 1.18 +<div id="content" style="display: none"> 1.19 + 1.20 +</div> 1.21 +<pre id="test"> 1.22 +<script type="application/javascript"> 1.23 + 1.24 +/** Test for Bug 463830 **/ 1.25 + 1.26 +var gTests = [ 1.27 + { file: "r11025_s16_c1.wav", title: "r11025_s16_c1.wav" } 1.28 +]; 1.29 + 1.30 +var gTestNum = 0; 1.31 + 1.32 +addLoadEvent(runTest); 1.33 + 1.34 +var title; 1.35 +var i = document.getElementById("i"); 1.36 + 1.37 +function runTest() { 1.38 + if (gTestNum == gTests.length) { 1.39 + SimpleTest.finish(); 1.40 + return; 1.41 + } 1.42 + if (gTestNum == 0) { 1.43 + i.addEventListener("load", function() { 1.44 + is(i.contentDocument.title, title, "Doc title incorrect"); 1.45 + setTimeout(runTest, 0); 1.46 + }, false); 1.47 + } 1.48 + 1.49 + title = gTests[gTestNum].title; 1.50 + i.src = gTests[gTestNum].file; 1.51 + gTestNum++; 1.52 +} 1.53 + 1.54 +SimpleTest.waitForExplicitFinish(); 1.55 + 1.56 +</script> 1.57 +</pre> 1.58 +</body> 1.59 +</html>