Closed Bug 1059195 Opened 5 years ago Closed 5 years ago

test_searchSuggest.js assumes the suggestion enabled preference defaults to "true"

Categories

(Toolkit :: Autocomplete, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla34
Tracking Status
firefox33 --- fixed
firefox34 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch The fix (obsolete) — Splinter Review
test_searchSuggest.js currently assumes the suggestion enabled preference is defaulted to "true". For Thunderbird, we don't want that to be the case at the moment, so we set the pref to false; however, the test then fails.

There's no way of setting the default prefs for xpcshell-tests yet, so I'm attaching a patch that assumes the pref could be either value, and hence is explicit about what value the preference is being set to.

For reference, this was introduced by bug 1048198.
Attachment #8479795 - Flags: review?(jaws)
Comment on attachment 8479795 [details] [diff] [review]
The fix

Review of attachment 8479795 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/components/search/tests/xpcshell/test_searchSuggest.js
@@ -317,5 @@
>    do_check_eq(result.remote[0], "letter B");
>  });
>  
> -add_task(function* clear_suggestions_pref() {
> -  Services.prefs.clearUserPref("browser.search.suggest.enabled");

The end of the test should include a cleanup task that calls clearUserPref
Attachment #8479795 - Flags: review?(jaws) → feedback+
Attached patch The fix v2Splinter Review
Now clears the pref at the end of the test.
Attachment #8480445 - Flags: review?(jaws)
Attachment #8479795 - Attachment is obsolete: true
Attachment #8480445 - Flags: review?(jaws) → review+
https://hg.mozilla.org/mozilla-central/rev/602966888eb0
Status: NEW → RESOLVED
Closed: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.