[fig] Fix and re-enable testSearchSuggestions

RESOLVED FIXED in Firefox 26

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Margaret, Unassigned)

Tracking

Trunk
Firefox 26
ARM
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed-fig], abouthome-hackathon)

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
Updating this test will require some re-working for the new search suggestions UI we built (the current test depends on the AwesomeBarTabs implementation).
Created attachment 785054 [details] [diff] [review]
(1/2) Only set SuggestClient if not defined yet
Attachment #785054 - Flags: review?(margaret.leibovic)
Created attachment 785055 [details] [diff] [review]
(2/2) Update testSearchSuggestions test for new about:home
Attachment #785055 - Flags: review?(margaret.leibovic)
(Reporter)

Comment 3

5 years ago
Comment on attachment 785054 [details] [diff] [review]
(1/2) Only set SuggestClient if not defined yet

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

::: mobile/android/base/home/BrowserSearch.java
@@ +397,5 @@
>                      // be null is when we're restoring after a crash. We should
>                      // never restore private tabs when that happens, so it
>                      // should be safe to assume that null means non-private.
>                      Tab tab = Tabs.getInstance().getSelectedTab();
> +                    final boolean isNotPrivate = (tab == null || !tab.isPrivate());

I feel like this could be clearer as isPrivate = (tab != null && tab.isPrivate()), then just check !isPrivate down below. But I don't feel strongly, your choice.
Attachment #785054 - Flags: review?(margaret.leibovic) → review+
(Reporter)

Comment 4

5 years ago
Comment on attachment 785055 [details] [diff] [review]
(2/2) Update testSearchSuggestions test for new about:home

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

Looks good, thanks!
Attachment #785055 - Flags: review?(margaret.leibovic) → review+
(In reply to :Margaret Leibovic from comment #3)
> Comment on attachment 785054 [details] [diff] [review]
> (1/2) Only set SuggestClient if not defined yet
> 
> Review of attachment 785054 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: mobile/android/base/home/BrowserSearch.java
> @@ +397,5 @@
> >                      // be null is when we're restoring after a crash. We should
> >                      // never restore private tabs when that happens, so it
> >                      // should be safe to assume that null means non-private.
> >                      Tab tab = Tabs.getInstance().getSelectedTab();
> > +                    final boolean isNotPrivate = (tab == null || !tab.isPrivate());
> 
> I feel like this could be clearer as isPrivate = (tab != null &&
> tab.isPrivate()), then just check !isPrivate down below. But I don't feel
> strongly, your choice.

Done.
Pushed:
http://hg.mozilla.org/projects/fig/rev/1a6e28e051e0
http://hg.mozilla.org/projects/fig/rev/d9ff3e3468ee
Whiteboard: abouthome-hackathon → [fixed-fig], abouthome-hackathon

Comment 7

5 years ago
https://hg.mozilla.org/mozilla-central/rev/1a6e28e051e0
https://hg.mozilla.org/mozilla-central/rev/d9ff3e3468ee
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26

Updated

5 years ago
Depends on: 907768
You need to log in before you can comment on or make changes to this bug.