Closed Bug 1049650 Opened 11 years ago Closed 11 years ago

Searching for something in search activity it will open a new about:blank page in stead of search results

Categories

(Firefox for Android Graveyard :: Search Activity, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox34 verified, fennec+)

VERIFIED FIXED
Firefox 34
Tracking Status
firefox34 --- verified
fennec + ---

People

(Reporter: cos_flaviu, Assigned: eedens)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Environment: Device: Asus Transformer Tab (Android 4.2.1); Build: Nightly 34.0a1 (2014-08-06); Steps to reproduce: 1. Launch Nightly Search; 2. Search for something; Expected result: A new tab is opened in Firefox containing the search results. Actual result: A new about:blank page is opened in Firefox.
This sounds like it was caused by bug 1043522. I assume our "is this still a search result page?" check is saying "nope" and launching an intent.
Assignee: nobody → eric.edens
Blocks: 1043522
Keywords: regression
I was able to repro this on an HTC Glacier 2.3.7; patch coming shortly. :)
Attached patch bug-1049650-fix.patch (obsolete) — Splinter Review
Fix confirmed on HTC Glacier 2.3.7 PR: https://github.com/ericedens/FirefoxSearch/pull/50
Attachment #8468562 - Flags: review?(margaret.leibovic)
Comment on attachment 8468562 [details] [diff] [review] bug-1049650-fix.patch Review of attachment 8468562 [details] [diff] [review]: ----------------------------------------------------------------- This is a good approach, but I want us to change things around a bit to make this logic more intuitive. ::: mobile/android/search/java/org/mozilla/search/PostSearchFragment.java @@ +70,5 @@ > * @param url to test. > * @return true if <code>url</code> is a page of search results. > */ > protected boolean isSearchResultsPage(String url) { > + return TextUtils.equals(ABOUT_BLANK, url) || url.contains(Constants.YAHOO_WEB_SEARCH_RESULTS_FILTER); I think we should flip around the logic here to make this method return true if we want to launch an intent with this URL, since adding this about:blank check doesn't align with the semantics of this method name. So we could rename it to something like `isExternalURL` or `shouldOpenInBrowser`, and then change around the logic where it's used. We can also make this method private.
Attachment #8468562 - Flags: review?(margaret.leibovic) → feedback+
tracking-fennec: --- → ?
> This is a good approach, but I want us to change things around a bit to make > this logic more intuitive. Good call :) Tested again with two gingerbread phones and a 4.4 phone.
Attachment #8468592 - Flags: review?(margaret.leibovic)
Attachment #8468562 - Attachment is obsolete: true
Also, removed the noop call to super.onPageStarted(view, url, favicon);
Comment on attachment 8468592 [details] [diff] [review] bug-1049650-fix.v2.patch Review of attachment 8468592 [details] [diff] [review]: ----------------------------------------------------------------- Nice. I'll land this for you on fx-team. ::: mobile/android/search/java/org/mozilla/search/PostSearchFragment.java @@ +96,5 @@ > > @Override > public void onPageStarted(WebView view, String url, Bitmap favicon) { > + if (shouldSendToBrowser(url)) { > + view.stopLoading(); Good call to stop the WebView. Does this mean that without this patch we're still loading the page in the WebView while we load it in Fennec?
Attachment #8468592 - Flags: review?(margaret.leibovic) → review+
> Good call to stop the WebView. Does this mean that without this patch we're > still loading the page in the WebView while we load it in Fennec? It was just a rearrangement -- `view.stopLoading()` used to be below the call to telemetry; I just moved it above so that we'd stop the loading as quickly as possible.
(In reply to Eric Edens [:eedens] from comment #8) > > Good call to stop the WebView. Does this mean that without this patch we're > > still loading the page in the WebView while we load it in Fennec? > > It was just a rearrangement -- `view.stopLoading()` used to be below the > call to telemetry; I just moved it above so that we'd stop the loading as > quickly as possible. Oh, sorry, didn't notice that :) https://hg.mozilla.org/integration/fx-team/rev/1082f601f769
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
tracking-fennec: ? → +
Verified as fixed in build 34.0a1 (2014-08-07); Device: Samsung Galaxy Nexus (Android 4.2.1).
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: