Closed Bug 736171 Opened 12 years ago Closed 7 years ago

Robocop: Write tests for frecency code

Categories

(Firefox for Android Graveyard :: Testing, defect, P5)

ARM
Android
defect

Tracking

(blocking-fennec1.0 -)

RESOLVED WONTFIX
Tracking Status
blocking-fennec1.0 --- -

People

(Reporter: Margaret, Assigned: gbrown)

References

Details

Follow-up to bug 704977. We can probably look at desktop tests to see how they did this. This will also become more important when we add bookmarks to the aweseomebar queries, and if we store frecency in the DB.
I think a good start would to just write a couple of tests that

1. Add a known history/bookmarks set
2. Use filter function to query
3. Assert if the results are what's expected (especially the order of the elements)

Should very simple to write those by inhering ContentProviderTest and using mResolver (the MockContentResolver used by ContentProviderTest) as the resolver in the BrowserDB API.
Assignee: nobody → margaret.leibovic
Can I just import BrowserDB into my test file to use the filterAllSites API, or do I need to do something else to get at that?
(In reply to Margaret Leibovic [:margaret] from comment #2)
> Can I just import BrowserDB into my test file to use the filterAllSites API,
> or do I need to do something else to get at that?

Oh, nevermind, I see what you did in with a class loader bug 730105.
Summary: Write tests for frecency code → Robocop: Write tests for frecency code
blocking-fennec1.0: --- → -
Blocks: 744859
I never got around to this, unassigning in case someone else wants to take this on.
Assignee: margaret.leibovic → nobody
Assignee: nobody → gbrown
Status: NEW → RESOLVED
Closed: 7 years ago
Component: General → Testing
Priority: -- → P5
Resolution: --- → WONTFIX
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.