Closed
Bug 354401
Opened 18 years ago
Closed 18 years ago
Update Places unit-tests to work with xpcshell test-harness
Categories
(Firefox :: Bookmarks & History, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dietrich, Assigned: dietrich)
References
Details
Attachments
(2 files, 2 obsolete files)
20.68 KB,
patch
|
davel
:
review+
benjamin
:
review+
|
Details | Diff | Splinter Review |
573 bytes,
patch
|
Details | Diff | Splinter Review |
The existing places unit-tests need to be updated to work with the new xpcshell test-harness framework.
Assignee | ||
Comment 1•18 years ago
|
||
This patch converts the existing tests to use the xpcshell-simple harness. The set of tests exercises most of the bookmarks service. It should be expanded to completely cover of nsINavBookmarksService, but this is a good enough start.
Asking davel for review to make sure I'm using the harness correctly.
Attachment #240361 -
Flags: review?(davel)
Assignee | ||
Comment 2•18 years ago
|
||
removed some unnecessary print()s i'd added.
Attachment #240361 -
Attachment is obsolete: true
Attachment #240363 -
Flags: review?(davel)
Attachment #240361 -
Flags: review?(davel)
Comment 3•18 years ago
|
||
Comment on attachment 240363 [details] [diff] [review]
tests w/o extraneous debug output
I think you need to add
ifdef ENABLE_TESTS
TOOL_DIRS += example
endif
to browser/components/places/Makefile.in to get "make check" in mozilla to run this test.
I'm rebuilding with places enabled so I can run this myself, but the code looks reasonable after a brief skim.
Comment 4•18 years ago
|
||
> ifdef ENABLE_TESTS
> TOOL_DIRS += example
> endif
duh. TOOL_DIRS += tests
Comment 5•18 years ago
|
||
Comment on attachment 240363 [details] [diff] [review]
tests w/o extraneous debug output
looks ok, except for the fact that none of this is run by a top-level make check. Asking benjamin for advice
Attachment #240363 -
Flags: review?(davel)
Attachment #240363 -
Flags: review?(benjamin)
Attachment #240363 -
Flags: review+
Comment 6•18 years ago
|
||
Comment on attachment 240363 [details] [diff] [review]
tests w/o extraneous debug output
in IRC, bsmedberg helped me figure out what was going on. You'll need to change browser/components/places/Makefile.in as per a patch I'm about to attach to this bug
Attachment #240363 -
Flags: review?(benjamin)
Comment 7•18 years ago
|
||
with this additional change, I think the patch is good to go.
Comment 8•18 years ago
|
||
Comment on attachment 240363 [details] [diff] [review]
tests w/o extraneous debug output
Do we have a bug on not putting these tests in dist/bin? We need to solve that sooner rather than later (and probably add standard rules for unit testing in general to rules.mk)
Attachment #240363 -
Flags: review+
Comment 9•18 years ago
|
||
(In reply to comment #8)
> (From update of attachment 240363 [details] [diff] [review] [edit])
> Do we have a bug on not putting these tests in dist/bin? We need to solve that
> sooner rather than later (and probably add standard rules for unit testing in
> general to rules.mk)
>
bug 351968
Assignee | ||
Comment 10•18 years ago
|
||
(In reply to comment #7)
> Created an attachment (id=240471) [edit]
> additional required change to parent Makefile.in
>
> with this additional change, I think the patch is good to go.
>
Hi Dave, i don't see any differences between the two patches:
https://bugzilla.mozilla.org/attachment.cgi?oldid=240363&action=interdiff&newid=240471&headers=1
What are the changes that need to be made? Can you attach the changes, and explain them (or add them to http://developer.mozilla.org/en/docs/Writing_xpcshell-based_unit_tests) so that we know what's required when adding new tests elsewhere?
Comment 11•18 years ago
|
||
there would be differences if I attached the right file the first time :-/
Attachment #240471 -
Attachment is obsolete: true
Assignee | ||
Comment 12•18 years ago
|
||
checked in on trunk
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 13•15 years ago
|
||
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".
In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body contains places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.
Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.
Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in
before you can comment on or make changes to this bug.
Description
•