Closed
Bug 1040994
Opened 10 years ago
Closed 10 years ago
Add LIMIT support for search history content provider
Categories
(Firefox for Android Graveyard :: Search Activity, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 34
People
(Reporter: eedens, Assigned: eedens)
References
Details
Attachments
(1 file, 2 obsolete files)
7.24 KB,
patch
|
eedens
:
review+
|
Details | Diff | Splinter Review |
The search activity uses a CursorLoader to query the search history content provider. To support LIMIT, we'll need to add a URI parameter.
Assignee | ||
Comment 1•10 years ago
|
||
Added LIMIT support through a Uri parameter. The patch includes an update to the content provider, plus an updated test case.
Try: https://tbpl.mozilla.org/?tree=Try&rev=0b0a5a446683
Attachment #8459358 -
Flags: review?(rnewman)
Comment 2•10 years ago
|
||
Comment on attachment 8459358 [details] [diff] [review]
bug-1040994-fix.patch
Review of attachment 8459358 [details] [diff] [review]:
-----------------------------------------------------------------
What happens when the limit parameter is an empty string, or non-numeric, or so on?
Let's make sure we have tests for the failure cases, not just the success ones!
r+ with tests for those.
::: mobile/android/base/tests/testSearchHistoryProvider.java
@@ +127,5 @@
> + }
> +
> + final int limit = 5;
> + final Uri uri = SearchHistory.CONTENT_URI.buildUpon()
> + .appendQueryParameter(BrowserContract.PARAM_LIMIT, String.valueOf(limit)).build();
Prefer stacking for chains:
final Uri uri = SearchHistory.CONTENT_URI
.buildUpon()
.appendQueryParameter(BrowserContract.PARAM_LIMIT, String.valueOf(limit))
.build();
Attachment #8459358 -
Flags: review?(rnewman) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Updated unit tests: empty input, negative input, and non-numeric input.
Updated Try: https://tbpl.mozilla.org/?tree=Try&rev=35081e5ccb9e
Assignee | ||
Updated•10 years ago
|
Attachment #8459864 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Attachment #8459864 -
Attachment is obsolete: false
Assignee | ||
Updated•10 years ago
|
Attachment #8459358 -
Attachment is obsolete: true
Assignee | ||
Comment 4•10 years ago
|
||
Comment on attachment 8459864 [details] [diff] [review]
bug-1040994-fix.v2.patch
Review of attachment 8459864 [details] [diff] [review]:
-----------------------------------------------------------------
Carrying r+ from rnewman's previous review.
Attachment #8459864 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 5•10 years ago
|
||
Comment 6•10 years ago
|
||
Eric, can you also file a follow-up to use this limit in the search history query we're making in the search activity?
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 34
Comment 9•10 years ago
|
||
Let's try this again. A nice easy one, margaret.
Attachment #8483801 -
Flags: review?(margaret.leibovic)
Comment 10•10 years ago
|
||
Comment on attachment 8483801 [details] [diff] [review]
Part 6: Display device type icon. r=margaret
The code, I can manage. Bugzilla? Not so much.
Attachment #8483801 -
Attachment is obsolete: true
Attachment #8483801 -
Flags: review?(margaret.leibovic)
Updated•7 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•