mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 569342: Find bar should not be enabled in about:addons. r=gavin, a=blocks-final
This commit is contained in:
parent
c0d9b1b0d4
commit
3a6e36dcb0
@ -146,6 +146,7 @@ _BROWSER_FILES = \
|
||||
browser_bug562649.js \
|
||||
browser_bug563588.js \
|
||||
browser_bug565575.js \
|
||||
browser_zbug569342.js \
|
||||
browser_bug575561.js \
|
||||
browser_bug577121.js \
|
||||
browser_bug579872.js \
|
||||
|
48
browser/base/content/test/browser_zbug569342.js
Normal file
48
browser/base/content/test/browser_zbug569342.js
Normal file
@ -0,0 +1,48 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
var gTab = null;
|
||||
|
||||
function cleanUp() {
|
||||
gBrowser.removeTab(gTab);
|
||||
finish();
|
||||
}
|
||||
|
||||
// function borrowed from browser_bug386835.js
|
||||
function load(tab, url, cb) {
|
||||
tab.linkedBrowser.addEventListener("load", function (event) {
|
||||
event.currentTarget.removeEventListener("load", arguments.callee, true);
|
||||
cb();
|
||||
}, true);
|
||||
tab.linkedBrowser.loadURI(url);
|
||||
}
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
gTab = gBrowser.selectedTab = gBrowser.addTab();
|
||||
ok(gFindBar.hidden, "Find bar should not be visible");
|
||||
|
||||
run_test_1();
|
||||
}
|
||||
|
||||
function run_test_1() {
|
||||
load(gTab, "about:config", function() {
|
||||
ok(gFindBar.hidden, "Find bar should not be visible");
|
||||
EventUtils.synthesizeKey("/", {}, gTab.linkedBrowser.contentWindow);
|
||||
ok(gFindBar.hidden, "Find bar should not be visible");
|
||||
|
||||
run_test_2();
|
||||
});
|
||||
}
|
||||
|
||||
function run_test_2() {
|
||||
load(gTab, "about:addons", function() {
|
||||
ok(gFindBar.hidden, "Find bar should not be visible");
|
||||
EventUtils.synthesizeKey("/", {}, gTab.linkedBrowser.contentWindow);
|
||||
ok(gFindBar.hidden, "Find bar should not be visible");
|
||||
|
||||
cleanUp();
|
||||
});
|
||||
}
|
@ -49,6 +49,7 @@
|
||||
role="application"
|
||||
width="750"
|
||||
height="500"
|
||||
disablefastfind="true"
|
||||
onunload="onConfigUnload();"
|
||||
onload="onConfigLoad();">
|
||||
|
||||
|
@ -1360,10 +1360,15 @@
|
||||
if (win && !this._mimeTypeIsTextBased(win.document.contentType))
|
||||
return false;
|
||||
|
||||
// disable FAYT in about:config and about:blank to prevent FAYT
|
||||
// opening unexpectedly - to fix bugs 264562, 267150, 269712
|
||||
var url = this.browser.currentURI.spec;
|
||||
if (url == "about:blank" || url == "about:config")
|
||||
// disable FAYT in about:blank to prevent FAYT opening unexpectedly.
|
||||
var url = this.browser.currentURI;
|
||||
if (url.spec == "about:blank")
|
||||
return false;
|
||||
|
||||
// disable FAYT in documents that ask for it to be disabled.
|
||||
if ((url.schemeIs("about") || url.schemeIs("chrome")) &&
|
||||
(win.document.documentElement &&
|
||||
win.document.documentElement.getAttribute("disablefastfind") == "true"))
|
||||
return false;
|
||||
|
||||
if (win) {
|
||||
|
@ -51,7 +51,7 @@
|
||||
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
id="addons-page" title="&addons.windowTitle;" disablechrome="true"
|
||||
role="application" windowtype="Addons:Manager"
|
||||
role="application" windowtype="Addons:Manager" disablefastfind="true"
|
||||
ondragenter="gDragDrop.onDragOver(event)"
|
||||
ondragover="gDragDrop.onDragOver(event)"
|
||||
ondrop="gDragDrop.onDrop(event)">
|
||||
|
Loading…
Reference in New Issue
Block a user