mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 729244 - ESC doesn't revert the location bar value anymore. r=gavin
This commit is contained in:
parent
0cc7de4816
commit
c06aed28f8
@ -225,6 +225,7 @@ _BROWSER_FILES = \
|
||||
browser_tabs_owner.js \
|
||||
browser_urlbarCopying.js \
|
||||
browser_urlbarEnter.js \
|
||||
browser_urlbarRevert.js \
|
||||
browser_urlbarTrimURLs.js \
|
||||
browser_urlHighlight.js \
|
||||
browser_visibleFindSelection.js \
|
||||
|
29
browser/base/content/test/browser_urlbarRevert.js
Normal file
29
browser/base/content/test/browser_urlbarRevert.js
Normal file
@ -0,0 +1,29 @@
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
let tab = gBrowser.addTab("http://example.com");
|
||||
gBrowser.selectedTab = tab;
|
||||
|
||||
onLoad(function () {
|
||||
let originalValue = gURLBar.value;
|
||||
|
||||
gBrowser.userTypedValue = "foobar";
|
||||
gBrowser.selectedTab = gBrowser.tabs[0];
|
||||
gBrowser.selectedTab = tab;
|
||||
is(gURLBar.value, "foobar", "location bar displays typed value");
|
||||
|
||||
gURLBar.focus();
|
||||
EventUtils.synthesizeKey("VK_ESCAPE", {});
|
||||
is(gURLBar.value, originalValue, "ESC reverted the location bar value");
|
||||
|
||||
gBrowser.removeTab(tab);
|
||||
finish();
|
||||
});
|
||||
}
|
||||
|
||||
function onLoad(callback) {
|
||||
gBrowser.selectedBrowser.addEventListener("pageshow", function loadListener() {
|
||||
gBrowser.selectedBrowser.removeEventListener("pageshow", loadListener, false);
|
||||
executeSoon(callback);
|
||||
});
|
||||
}
|
@ -278,7 +278,8 @@
|
||||
<method name="onTextReverted">
|
||||
<body><![CDATA[
|
||||
if (this._textRevertedHandler)
|
||||
this._textRevertedHandler();
|
||||
return this._textRevertedHandler();
|
||||
return false;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user