Bug 744745 - Prevent overlay being made transparent from site CSS. r=jaws

This commit is contained in:
Georg Fritzsche 2013-01-23 20:59:13 +01:00
parent 69be3b2cf0
commit fb55032094
4 changed files with 57 additions and 0 deletions

View File

@ -254,6 +254,7 @@ _BROWSER_FILES = \
plugin_add_dynamically.html \
plugin_clickToPlayAllow.html \
plugin_clickToPlayDeny.html \
plugin_bug744745.html \
plugin_bug749455.html \
plugin_bug797677.html \
plugin_bug818009.html \
@ -283,6 +284,7 @@ _BROWSER_FILES = \
browser_tabDrop.js \
browser_lastAccessedTab.js \
browser_bug734076.js \
browser_bug744745.js \
browser_bug812562.js \
browser_bug818009.js \
browser_bug818118.js \

View File

@ -0,0 +1,42 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var gTestBrowser = null;
var gNumPluginBindingsAttached = 0;
Components.utils.import("resource://gre/modules/Services.jsm");
function test() {
waitForExplicitFinish();
registerCleanupFunction(function() {
Services.prefs.clearUserPref("plugins.click_to_play");
gTestBrowser.removeEventListener("PluginBindingAttached", pluginBindingAttached, true, true);
gBrowser.removeCurrentTab();
window.focus();
});
Services.prefs.setBoolPref("plugins.click_to_play", true);
gBrowser.selectedTab = gBrowser.addTab();
gTestBrowser = gBrowser.selectedBrowser;
gTestBrowser.addEventListener("PluginBindingAttached", pluginBindingAttached, true, true);
var gHttpTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
gTestBrowser.contentWindow.location = gHttpTestRoot + "plugin_bug744745.html";
}
function pluginBindingAttached() {
gNumPluginBindingsAttached++;
if (gNumPluginBindingsAttached == 1) {
var doc = gTestBrowser.contentDocument;
var testplugin = doc.getElementById("test");
ok(testplugin, "should have test plugin");
var style = getComputedStyle(testplugin);
ok('opacity' in style, "style should have opacity set");
is(style.opacity, 1, "opacity should be 1");
finish();
} else {
ok(false, "if we've gotten here, something is quite wrong");
}
}

View File

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head><meta charset="utf-8"/></head>
<body>
<style>
.x {
opacity: 0 !important;
}
</style>
<object id="test" class="x" type="application/x-test" width=200 height=200></object>
</body>
</html>

View File

@ -27,5 +27,6 @@ object:-moz-handler-vulnerable-updatable,
object:-moz-handler-vulnerable-no-update {
display: inline-block;
overflow: hidden;
opacity: 1 !important;
-moz-binding: url('chrome://mozapps/content/plugins/pluginProblem.xml#pluginProblem') !important;
}