mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 750051 - Disable window.find in Fennec because it breaks and/or crashes [r=jst]
This commit is contained in:
parent
90367bb4e7
commit
996c153f96
@ -7063,6 +7063,9 @@ nsGlobalWindow::Find(const nsAString& aStr, bool aCaseSensitive,
|
||||
bool aSearchInFrames, bool aShowDialog,
|
||||
bool *aDidFind)
|
||||
{
|
||||
if (Preferences::GetBool("dom.disable_window_find", false))
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
FORWARD_TO_OUTER(Find, (aStr, aCaseSensitive, aBackwards, aWrapAround,
|
||||
aWholeWord, aSearchInFrames, aShowDialog, aDidFind),
|
||||
NS_ERROR_NOT_INITIALIZED);
|
||||
|
@ -160,6 +160,7 @@ _TEST_FILES = \
|
||||
test_bug743615.html \
|
||||
utils_bug743615.js \
|
||||
worker_bug743615.js \
|
||||
test_bug750051.html \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
|
38
dom/tests/mochitest/bugs/test_bug750051.html
Normal file
38
dom/tests/mochitest/bugs/test_bug750051.html
Normal file
@ -0,0 +1,38 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=750051
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 750051</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=750051">Mozilla Bug 750051</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
/** Test for Bug 750051 **/
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
SpecialPowers.pushPrefEnv({"set": [["dom.disable_window_find", true]]}, function() {
|
||||
var caughtException = false;
|
||||
try {
|
||||
window.find();
|
||||
} catch (e) {
|
||||
caughtException = true;
|
||||
}
|
||||
ok(caughtException, "window.find should throw an exception");
|
||||
SimpleTest.finish();
|
||||
});
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
@ -252,6 +252,7 @@ pref("privacy.popups.showBrowserMessage", true);
|
||||
pref("dom.disable_window_open_dialog_feature", true);
|
||||
pref("dom.disable_window_showModalDialog", true);
|
||||
pref("dom.disable_window_print", true);
|
||||
pref("dom.disable_window_find", true);
|
||||
|
||||
pref("keyword.enabled", true);
|
||||
pref("keyword.URL", "https://www.google.com/m?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=");
|
||||
|
Loading…
Reference in New Issue
Block a user