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:
Florian Quèze 2014-11-27 12:24:53 +01:00
Родитель 0e8e158d7a
Коммит 0ae31a3cb5
2 изменённых файлов: 8 добавлений и 1 удалений

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

@ -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: [],