Bug 976769 - Stop layering the plugin overlay topmost. r=bsmedberg

This commit is contained in:
Georg Fritzsche 2014-02-27 17:53:56 +01:00
Родитель 711af5f264
Коммит 1b6330e46c
4 изменённых файлов: 0 добавлений и 72 удалений

Просмотреть файл

@ -14,7 +14,6 @@ support-files =
plugin_both2.html
plugin_bug744745.html
plugin_bug749455.html
plugin_bug752516.html
plugin_bug787619.html
plugin_bug797677.html
plugin_bug820497.html
@ -37,7 +36,6 @@ support-files =
[browser_bug743421.js]
[browser_bug744745.js]
[browser_bug752516.js]
[browser_bug787619.js]
[browser_bug797677.js]
[browser_bug812562.js]

Просмотреть файл

@ -1,45 +0,0 @@
/* 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");
gBrowser.removeCurrentTab();
window.focus();
});
Services.prefs.setBoolPref("plugins.click_to_play", true);
setTestPluginEnabledState(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() {
// Due to layout being async, "PluginBindAttached" may trigger later.
// This forces a layout flush, thus triggering it, and schedules the
// test so it is definitely executed afterwards.
gTestBrowser.contentDocument.getElementById('test').clientTop;
executeSoon(actualTest);
}
function actualTest() {
let doc = gTestBrowser.contentDocument;
let plugin = doc.getElementById("test");
ok(!plugin.activated, "Plugin should not be activated");
ok(PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed, "Doorhanger should not be open");
EventUtils.synthesizeMouseAtCenter(plugin, {}, gTestBrowser.contentWindow);
let condition = function() !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed;
waitForCondition(condition, finish, "Waited too long for plugin doorhanger to activate");
}

Просмотреть файл

@ -1,24 +0,0 @@
<!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,7 +53,6 @@ html|applet:not([height]), html|applet[height=""] {
word-spacing: initial;
letter-spacing: initial;
line-height: initial;
z-index: 2147483647;
position: relative;
}