Bug 1327212 - undo a line removal done in bug 935521 that causes regressions. r=Gijs

MozReview-Commit-ID: HaUEOSpEsXs

--HG--
extra : rebase_source : d95b913bf4305a801c0ec6247a15d78b2902c48d
This commit is contained in:
Mike de Boer 2017-01-07 01:05:33 +01:00
Родитель 1e8a66e52b
Коммит 607071aae6
3 изменённых файлов: 10 добавлений и 4 удалений

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

@ -127,9 +127,9 @@ function checkNewWindow() {
if (!HasFindClipboard) {
is(newWindow.gFindBar._findField.value, texts[1],
"New window find bar has correct find value!");
ok(!newWindow.gFindBar.getElement("find-next").disabled,
"New window findbar has disabled buttons!");
}
ok(newWindow.gFindBar.getElement("find-next").disabled,
"New window findbar has disabled buttons!");
newWindow.close();
finish();
}

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

@ -155,7 +155,11 @@
yield testToggleEntireWord();
}
function testFindButtonsState(enabled = true) {
function testFindButtonsState(enabled = null) {
// If `enabled` is not explicitly passed in, we set it to its most logical
// value.
if (enabled === null)
enabled = !!gFindBar._findField.value;
is(gFindBar.getElement("find-next").disabled, !enabled,
`Expected the 'next' button to be ${enabled ? 'enabled' : 'disabled'}`);
is(gFindBar.getElement("find-previous").disabled, !enabled,

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

@ -1085,7 +1085,8 @@
<parameter name="aFindPrevious"/>
<body><![CDATA[
this._updateStatusUI(aResult, aFindPrevious);
this._enableFindButtons(aResult !== this.nsITypeAheadFind.FIND_NOTFOUND);
this._enableFindButtons(aResult !== this.nsITypeAheadFind.FIND_NOTFOUND &&
!!this._findField.value);
]]></body>
</method>
@ -1334,6 +1335,7 @@
this._findField.value = aSelectionString;
if (aIsInitialSelection) {
this._enableFindButtons(!!this._findField.value);
this._findField.select();
this._findField.focus();