1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/media/test/test_videoDocumentTitle.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,57 @@ 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: "320x240.ogv", title: "320x240.ogv" }, 1.28 + { file: "bug461281.ogg", title: "bug461281.ogg" }, 1.29 +]; 1.30 + 1.31 +var gTestNum = 0; 1.32 + 1.33 +addLoadEvent(runTest); 1.34 + 1.35 +var title; 1.36 +var i = document.getElementById("i"); 1.37 + 1.38 +function runTest() { 1.39 + if (gTestNum == gTests.length) { 1.40 + SimpleTest.finish(); 1.41 + return; 1.42 + } 1.43 + if (gTestNum == 0) { 1.44 + i.addEventListener("load", function() { 1.45 + is(i.contentDocument.title, title, "Doc title incorrect"); 1.46 + setTimeout(runTest, 0); 1.47 + }, false); 1.48 + } 1.49 + 1.50 + title = gTests[gTestNum].title; 1.51 + i.src = gTests[gTestNum].file; 1.52 + gTestNum++; 1.53 +} 1.54 + 1.55 +SimpleTest.waitForExplicitFinish(); 1.56 + 1.57 +</script> 1.58 +</pre> 1.59 +</body> 1.60 +</html>