Closed Bug 431159 Opened 16 years ago Closed 16 years ago

test_history_expiration.js fails on builds without places enabled

Categories

(Toolkit :: Downloads API, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file)

Thunderbird and Sunbird currently build without places enabled. However, the xpcshell test test_history_expiration.js fails:

>>>>>>>
*** Throwing trying to get CurProcD
*** Throwing trying to get MozBinD
*** test pending
*** Throwing trying to get TmpD
../../../../_tests/xpcshell-simple/test_dm/unit/test_history_expiration.js:82: strict warning: reference to undefined property Cc['@mozilla.org/browser/nav-history-service;1']
TypeError: Cc['@mozilla.org/browser/nav-history-service;1'] is undefined
*** FAIL ***

For Thunderbird, we don't currently need history, additionally to enable places, we'd need to move to toolkit autocomplete. This would require a reasonable amount of work, and we'd need to get our unit tests working asap.

Given that in bug 251337 attachment 317051 [details] [diff] [review] the lack of places was worked around within the download manager; I think it is reasonable that the test does the same as well - If places is built and the nav history service doesn't exist for some reason, then the places tests will pick up the failures.

I'll come up with a patch tomorrow for this.
Although unit tests don't need reviews, please can you (Shawn) confirm you're happy with this change.

This will make Thunderbird & Sunbird pass, but let Firefox (or MOZ_PLACES) enabled builds still check download expiration. I doubled checked this by changing a do_check_eq to do_check_neq and confirming it correctly failed in the Firefox builds.
Attachment #318356 - Flags: review?(sdwilsh)
Comment on attachment 318356 [details] [diff] [review]
Check for nav history service just like the code.

r=sdwilsh

You don't need approval for this either since it's NBOTB!  woo!
Attachment #318356 - Flags: review?(sdwilsh) → review+
Patch checked in -> fixed.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Flags: in-testsuite+
OS: Mac OS X → All
Hardware: PC → All
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: