mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 932832 - click-to-play not discoverable for Google Hangouts video plugin because it is positioned at -40000,-40000. Check for positioning and treat this as a hidden plugin, r=jaws
This commit is contained in:
parent
b68e9f44c2
commit
af1bc7b134
@ -130,6 +130,10 @@ var gPluginHandler = {
|
||||
[right, bottom],
|
||||
[centerX, centerY]];
|
||||
|
||||
if (right <= 0 || top <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (let [x, y] of points) {
|
||||
let el = plugin.ownerDocument.elementFromPoint(x, y);
|
||||
if (el !== plugin) {
|
||||
|
@ -73,6 +73,7 @@ support-files =
|
||||
plugin_data_url.html
|
||||
plugin_hidden_to_visible.html
|
||||
plugin_overlayed.html
|
||||
plugin_positioned.html
|
||||
plugin_small.html
|
||||
plugin_syncRemoved.html
|
||||
plugin_test.html
|
||||
|
@ -898,5 +898,28 @@ function test28b()
|
||||
let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
|
||||
ok(!overlay.classList.contains("visible"), "Test 28b, Plugin overlay should be hidden");
|
||||
|
||||
prepareTest(test29, gTestRoot + "plugin_positioned.html");
|
||||
}
|
||||
|
||||
function test29() {
|
||||
let notification = PopupNotifications.getNotification("click-to-play-plugins");
|
||||
ok(notification, "Test 29: There should be a plugin notification");
|
||||
|
||||
let notificationBox = gBrowser.getNotificationBox(gTestBrowser);
|
||||
waitForCondition(() => notificationBox.getNotificationWithValue("plugin-hidden") !== null,
|
||||
test29b,
|
||||
"Test 29, expected the plugin infobar to be triggered when plugin was overlayed");
|
||||
}
|
||||
|
||||
function test29b() {
|
||||
let doc = gTestBrowser.contentDocument;
|
||||
let plugin = doc.getElementById("test");
|
||||
ok(plugin, "Test 29b, Found plugin in page");
|
||||
plugin.QueryInterface(Ci.nsIObjectLoadingContent);
|
||||
is(plugin.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY, "Test 29b, plugin fallback type should be PLUGIN_CLICK_TO_PLAY");
|
||||
ok(!plugin.activated, "Test 29b, Plugin should not be activated");
|
||||
let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
|
||||
ok(!overlay.classList.contains("visible"), "Test 29b, Plugin overlay should be hidden");
|
||||
|
||||
finishTest();
|
||||
}
|
||||
|
12
browser/base/content/test/general/plugin_positioned.html
Normal file
12
browser/base/content/test/general/plugin_positioned.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<style type="text/css">
|
||||
#test {
|
||||
position: absolute;
|
||||
left: -1000px;
|
||||
top: -1000px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<embed id="test" type="application/x-test">
|
Loading…
Reference in New Issue
Block a user