Bug 759964 - Part 2 - Set allowMedia = false in social and identity code to address TODO comments. r=gavin

This commit is contained in:
Matthew Noorenberghe 2013-03-29 14:52:59 -07:00
parent 8df8466d7d
commit ab4d40727e
3 changed files with 7 additions and 10 deletions

View File

@ -345,8 +345,8 @@ function makeHiddenFrame() {
docShell.allowAuth = false;
docShell.allowPlugins = false;
docShell.allowImages = false;
docShell.allowMedia = false;
docShell.allowWindowControl = false;
// TODO: disable media (bug 759964)
return iframe;
}

View File

@ -99,8 +99,8 @@ this.Sandbox.prototype = {
docShell.allowAuth = false;
docShell.allowPlugins = false;
docShell.allowImages = false;
docShell.allowMedia = false;
docShell.allowWindowControl = false;
// TODO: disable media (bug 759964)
// Disable stylesheet loading since the document is not visible.
let markupDocViewer = docShell.contentViewer

View File

@ -33,7 +33,6 @@ SimpleTest.waitForExplicitFinish();
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
const OSX_10_5 = navigator.oscpu == "Intel Mac OS X 10.5";
const secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager);
@ -131,20 +130,18 @@ function check_loaded_content(aSandbox, aNothingShouldLoad, aCallback) {
if (aNothingShouldLoad) {
is(res, "NOTHING", "Check that nothing was loaded on the server");
} else if (!OSX_10_5) {
let allowedTypes = [ "application/javascript", "text/html", "video/webm",
"audio/ogg", "application/x-test" ];
} else {
let allowedTypes = [ "application/javascript", "text/html", "application/x-test" ];
let loadedTypes = res == "NOTHING" ? [] : res.split(",");
for (let loadedType of loadedTypes) {
isnot(allowedTypes.indexOf(loadedType), -1, "Check that " + loadedType + " was expected to load");
isnot(allowedTypes.indexOf(loadedType), -1, "Check that " + loadedType + " was expected to load"); // TODO
}
// TODO: Media should be disabled after bug 759964.
isnot(loadedTypes.indexOf("application/javascript"), -1, "Check JS was loaded");
isnot(loadedTypes.indexOf("text/html"), -1, "Check iframe was loaded");
//todo_is(loadedTypes.indexOf("video/webm"), -1, "Check webm was not loaded");
//todo_is(loadedTypes.indexOf("audio/ogg"), -1, "Check ogg was not loaded");
is(loadedTypes.indexOf("video/webm"), -1, "Check webm was not loaded");
is(loadedTypes.indexOf("audio/ogg"), -1, "Check ogg was not loaded");
// Check that no plugin tags have a type other than TYPE_NULL (failed load)
// --