Whoever imports DownloadUtils will be taking a hit because we eagerly load the string bundle and strings at import. We can delay this until they're actually used.
Created attachment 299913 [details] [diff] [review] v1 Yay mochi unit tests. Create getters that lazily loads strings from a lazily-loaded stringbundle.
Assignee: nobody → edilee
Status: NEW → ASSIGNED
Attachment #299913 - Flags: review?(sdwilsh)
Comment on attachment 299913 [details] [diff] [review] v1 This needs some tests (as discussed on irc). They should be xpcshell tests living in toolkit/mozapps/downloads/tests/unit/
Attachment #299913 - Flags: review?(sdwilsh) → review-
Created attachment 299978 [details] [diff] [review] v2 Now with more testcase! :) Works before and after the laziness.
Comment on attachment 299978 [details] [diff] [review] v2 r=sdwilsh
Comment on attachment 299978 [details] [diff] [review] v2 Mmm more testcases
Attachment #299978 - Flags: approval1.9? → approval1.9+
Checking in toolkit/mozapps/downloads/src/DownloadUtils.jsm; /cvsroot/mozilla/toolkit/mozapps/downloads/src/DownloadUtils.jsm,v <-- DownloadUtils.jsm new revision: 1.5; previous revision: 1.4 done Checking in toolkit/mozapps/downloads/tests/Makefile.in; /cvsroot/mozilla/toolkit/mozapps/downloads/tests/Makefile.in,v <-- Makefile.in new revision: 1.2; previous revision: 1.1 done RCS file: /cvsroot/mozilla/toolkit/mozapps/downloads/tests/unit/test_DownloadUtils.js,v done Checking in toolkit/mozapps/downloads/tests/unit/test_DownloadUtils.js; /cvsroot/mozilla/toolkit/mozapps/downloads/tests/unit/test_DownloadUtils.js,v <-- test_DownloadUtils.js initial revision: 1.1 done
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Flags: in-testsuite? → in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3 beta4
You need to log in before you can comment on or make changes to this bug.