mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 06:45:42 +00:00
Bug 752516 - Give pluginProblemBinding the top-most z-index. r=bsmedberg,jaws
This commit is contained in:
parent
0f28919e7a
commit
1819498df8
@ -153,6 +153,7 @@ _BROWSER_FILES = \
|
||||
browser_bug735471.js \
|
||||
browser_bug743421.js \
|
||||
browser_bug749738.js \
|
||||
browser_bug752516.js \
|
||||
browser_bug763468_perwindowpb.js \
|
||||
browser_bug767836_perwindowpb.js \
|
||||
browser_bug771331.js \
|
||||
@ -274,6 +275,7 @@ _BROWSER_FILES = \
|
||||
plugin_clickToPlayDeny.html \
|
||||
plugin_bug744745.html \
|
||||
plugin_bug749455.html \
|
||||
plugin_bug752516.html \
|
||||
plugin_bug787619.html \
|
||||
plugin_bug797677.html \
|
||||
plugin_bug818009.html \
|
||||
|
46
browser/base/content/test/browser_bug752516.js
Normal file
46
browser/base/content/test/browser_bug752516.js
Normal file
@ -0,0 +1,46 @@
|
||||
/* 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/. */
|
||||
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
var gTestBrowser = null;
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
registerCleanupFunction(function() {
|
||||
Services.prefs.clearUserPref("plugins.click_to_play");
|
||||
let plugin = getTestPlugin();
|
||||
plugin.enabledState = Ci.nsIPluginTag.STATE_ENABLED;
|
||||
gBrowser.removeCurrentTab();
|
||||
window.focus();
|
||||
});
|
||||
|
||||
Services.prefs.setBoolPref("plugins.click_to_play", true);
|
||||
let plugin = getTestPlugin();
|
||||
plugin.enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
|
||||
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gTestBrowser = gBrowser.selectedBrowser;
|
||||
let gHttpTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
|
||||
gTestBrowser.contentWindow.location = gHttpTestRoot + "plugin_bug752516.html";
|
||||
|
||||
gTestBrowser.addEventListener("load", tabLoad, true);
|
||||
}
|
||||
|
||||
function tabLoad() {
|
||||
// The plugin events are async dispatched and can come after the load event
|
||||
// This just allows the events to fire before we proceed
|
||||
executeSoon(actualTest);
|
||||
}
|
||||
|
||||
function actualTest() {
|
||||
let doc = gTestBrowser.contentDocument;
|
||||
let plugin = doc.getElementById("test");
|
||||
let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
|
||||
ok(!objLoadingContent.activated, "Plugin should not be activated");
|
||||
|
||||
EventUtils.synthesizeMouseAtCenter(plugin, {}, gTestBrowser.contentWindow);
|
||||
let condition = function() objLoadingContent.activated;
|
||||
waitForCondition(condition, finish, "Waited too long for plugin to activate");
|
||||
}
|
24
browser/base/content/test/plugin_bug752516.html
Normal file
24
browser/base/content/test/plugin_bug752516.html
Normal file
@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<style type="text/css">
|
||||
div {
|
||||
padding: 2%;
|
||||
position: absolute;
|
||||
top: 0; bottom: 0;
|
||||
left: 0; right: 0;
|
||||
text-align: center;
|
||||
border: 4px solid red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<object id="test" type="application/x-test" width="159" height="91"></object>
|
||||
</div>
|
||||
<div id="overlay">
|
||||
<h1>overlay</h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -53,6 +53,8 @@ html|applet:not([height]), html|applet[height=""] {
|
||||
word-spacing: initial;
|
||||
letter-spacing: initial;
|
||||
line-height: initial;
|
||||
z-index: 2147483647;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mainBox[chromedir="rtl"] {
|
||||
|
Loading…
Reference in New Issue
Block a user