4 https://bugzilla.mozilla.org/show_bug.cgi?id=448600
7 <title>Test for Bug
448600</title>
8 <script type=
"application/javascript" src=
"/MochiKit/MochiKit.js"></script>
9 <script type=
"application/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=448600">Mozilla Bug
448600</a>
15 <div id=
"content" style=
"display: none">
19 <script type=
"application/javascript">
21 netscape.security.PrivilegeManager.enablePrivilege(
"UniversalXPConnect");
22 var prefService = Components.classes[
"@mozilla.org/preferences-service;1"]
23 .getService(Components.interfaces.nsIPrefService);
24 var branch = prefService.getBranch(
"media.");
25 var gOldOggPref = branch.getBoolPref(
"ogg.enabled");
26 var gOldWavePref = branch.getBoolPref(
"wave.enabled");
28 branch.setBoolPref(
"ogg.enabled", false);
29 branch.setBoolPref(
"wave.enabled", false);
34 <source type=
"video/ogg" src=
"320x240.ogg"/>
35 <source type=
"audio/wave" src=
"r11025_u8_c1.wav"/>
38 <video id=
"video2" src=
"320x240.ogg"></video>
39 <video id=
"video3" src=
"r11025_u8_c1.wav"></video>
43 SimpleTest
.waitForExplicitFinish();
46 is(document
.getElementById('video1').currentSrc
, "");
47 is(document
.getElementById('video2').currentSrc
, "");
48 is(document
.getElementById('video3').currentSrc
, "");
50 netscape
.security
.PrivilegeManager
.enablePrivilege("UniversalXPConnect");
52 branch
.setBoolPref("ogg.enabled", gOldOggPref
);
53 branch
.setBoolPref("wave.enabled", gOldWavePref
);
58 // Using a timeout here sucks, but we currently have no way
59 // to be notified that the element couldn't load. At least if this timeout
60 // happens "too early", the test will pass instead of failing.
61 setTimeout(doTest
, 1000);