зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1088660 - Improve the search bar UI to support one-off searches - fix tests that failed on fx-team, r=felipe over email.
This commit is contained in:
Родитель
0e8e158d7a
Коммит
0ae31a3cb5
|
@ -101,6 +101,7 @@ add_task(function*() {
|
|||
ok(!isPanelUIOpen(), "Panel should no longer be open");
|
||||
|
||||
Services.prefs.setBoolPref("browser.search.suggest.enabled", suggestEnabled);
|
||||
CustomizableUI.reset();
|
||||
});
|
||||
|
||||
add_task(function*() {
|
||||
|
|
|
@ -318,7 +318,13 @@ this.SearchSuggestionController.prototype = {
|
|||
* @return {Object}
|
||||
*/
|
||||
_dedupeAndReturnResults: function(suggestResults) {
|
||||
NS_ASSERT(this._searchString !== null, "this._searchString shouldn't be null when returning results");
|
||||
if (this._searchString === null) {
|
||||
// _searchString can be null if stop() was called and remote suggestions
|
||||
// were disabled (stopping if we are fetching remote suggestions will
|
||||
// cause a promise rejection before we reach _dedupeAndReturnResults).
|
||||
return null;
|
||||
}
|
||||
|
||||
let results = {
|
||||
term: this._searchString,
|
||||
remote: [],
|
||||
|
|
Загрузка…
Ссылка в новой задаче