From ab4d40727e4dc780dff6e5e8726771f25db2b353 Mon Sep 17 00:00:00 2001 From: Matthew Noorenberghe Date: Fri, 29 Mar 2013 14:52:59 -0700 Subject: [PATCH] Bug 759964 - Part 2 - Set allowMedia = false in social and identity code to address TODO comments. r=gavin --- toolkit/components/social/FrameWorker.jsm | 2 +- toolkit/identity/Sandbox.jsm | 2 +- toolkit/identity/tests/chrome/test_sandbox.xul | 13 +++++-------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/toolkit/components/social/FrameWorker.jsm b/toolkit/components/social/FrameWorker.jsm index e3a422309b84..77bbb7a1140c 100644 --- a/toolkit/components/social/FrameWorker.jsm +++ b/toolkit/components/social/FrameWorker.jsm @@ -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; } diff --git a/toolkit/identity/Sandbox.jsm b/toolkit/identity/Sandbox.jsm index 4fe2d89c8ed2..e62f272339a5 100644 --- a/toolkit/identity/Sandbox.jsm +++ b/toolkit/identity/Sandbox.jsm @@ -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 diff --git a/toolkit/identity/tests/chrome/test_sandbox.xul b/toolkit/identity/tests/chrome/test_sandbox.xul index 6dd661a9c13e..ebdd6b752b86 100644 --- a/toolkit/identity/tests/chrome/test_sandbox.xul +++ b/toolkit/identity/tests/chrome/test_sandbox.xul @@ -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) // --