Add missing tests for bug 463830
authorRobert O'Callahan <robert@ocallahan.org>
Sat, 17 Jan 2009 22:26:55 +1300
changeset 23863 361a930d2c4bc73deafce3652e31ad1421217c9c
parent 23862 7e0d34e958e66bc3c8ae582657080886d1a6d6d6
child 23865 5d383a2924988d14dde276a881345150d191573c
push id4760
push userrocallahan@mozilla.com
push dateSat, 17 Jan 2009 09:27:08 +0000
treeherdermozilla-central@361a930d2c4b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs463830
milestone1.9.2a1pre
Add missing tests for bug 463830
content/media/video/test/test_audioDocumentTitle.html
content/media/video/test/test_videoDocumentTitle.html
new file mode 100644
--- /dev/null
+++ b/content/media/video/test/test_audioDocumentTitle.html
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=463830
+-->
+<head>
+  <title>Test for Bug 463830</title>
+  <script type="application/javascript" src="/MochiKit/MochiKit.js"></script>
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=463830">Mozilla Bug 463830</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+  
+</div>
+<pre id="test">
+<script type="application/javascript">
+
+/** Test for Bug 463830 **/
+
+var gTests = [
+  { file: "r11025_s16_c1.wav", title: "r11025_s16_c1.wav" }
+];
+
+var gTestNum = 0;
+
+addLoadEvent(runTest);
+
+function runTest() {
+  if (gTestNum == gTests.length) {
+    SimpleTest.finish();
+    return;
+  }
+  var file = gTests[gTestNum].file;
+  var title = gTests[gTestNum].title;
+  var w = window.open(file, "", "width=500,height=300");
+  w.onload =
+    function() {
+      is(w.document.title, title, "Audio doc title incorrect");
+      w.close();
+      setTimeout(runTest, 0);
+    };
+  gTestNum++;
+}
+
+SimpleTest.waitForExplicitFinish();
+
+</script>
+</pre>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/media/video/test/test_videoDocumentTitle.html
@@ -0,0 +1,54 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=463830
+-->
+<head>
+  <title>Test for Bug 463830</title>
+  <script type="application/javascript" src="/MochiKit/MochiKit.js"></script>
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=463830">Mozilla Bug 463830</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+  
+</div>
+<pre id="test">
+<script type="application/javascript">
+
+/** Test for Bug 463830 **/
+
+var gTests = [
+  { file: "320x240.ogv", title: "320x240.ogv" },
+  { file: "bug461281.ogg", title: "bug461281.ogg" },
+];
+
+var gTestNum = 0;
+
+addLoadEvent(runTest);
+
+function runTest() {
+  if (gTestNum == gTests.length) {
+    SimpleTest.finish();
+    return;
+  }
+  var file = gTests[gTestNum].file;
+  var title = gTests[gTestNum].title;
+  var w = window.open(file, "", "width=500,height=300");
+  w.onload =
+    function() {
+      is(w.document.title, title, "Video doc title incorrect");
+      w.close();
+      setTimeout(runTest, 0);
+    };
+  gTestNum++;
+}
+
+SimpleTest.waitForExplicitFinish();
+
+</script>
+</pre>
+</body>
+</html>