Closed
Bug 458810
Opened 16 years ago
Closed 4 years ago
Implement search service test suite
Categories
(Firefox :: Search, defect, P4)
Firefox
Search
Tracking
()
RESOLVED
DUPLICATE
of bug 1120642
People
(Reporter: rflint, Unassigned)
References
Details
(Whiteboard: [fxsearch])
Attachments
(2 files, 1 obsolete file)
13.41 KB,
patch
|
Gavin
:
feedback+
|
Details | Diff | Splinter Review |
20.80 KB,
patch
|
Details | Diff | Splinter Review |
No description provided.
Reporter | ||
Updated•16 years ago
|
Priority: -- → P1
Target Milestone: Firefox 3.1b2 → Firefox 3.1b3
Comment 1•13 years ago
|
||
Attachment #577980 -
Flags: review?
Comment 2•13 years ago
|
||
Here it is, adapted to the suggestions in bug 699856.
Attachment #577980 -
Attachment is obsolete: true
Attachment #577983 -
Flags: review?(gavin.bugzilla)
Attachment #577980 -
Flags: review?
Updated•13 years ago
|
Depends on: jsonSearchSvc
Updated•13 years ago
|
Attachment #577983 -
Flags: review?(gavin.bugzilla) → review?(gavin.sharp)
Comment 3•13 years ago
|
||
Comment on attachment 577983 [details] [diff] [review]
One more test. Covering: asynchronous initialization, observer notification, downloading and installing sherlock, downloading and installing opensearch.
>diff --git a/toolkit/components/search/tests/xpcshell/test_645970.js b/toolkit/components/search/tests/xpcshell/test_645970.js
>+ do_timeout(1000, function() {
>+ do_throw("timeout");
>+ })
Is this really necessary? The test harness should be taking care of this... (also applies to the other test)
>diff --git a/toolkit/components/search/tests/xpcshell/test_downloadAndAddEngine.js b/toolkit/components/search/tests/xpcshell/test_downloadAndAddEngine.js
>+/* ***** BEGIN LICENSE BLOCK *****
You should generally use the PD license for new tests, where possible (see https://www.mozilla.org/MPL/headers/ ).
>+Components.utils.import("resource://gre/modules/Services.jsm");
>+var gPrefService = Cc["@mozilla.org/preferences-service;1"]
>+ .getService(Ci.nsIPrefService)
>+ .QueryInterface(Ci.nsIPrefBranch);
Services.prefs
>+function setTimeout(aCallback, aDelay) {
>+ var timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
>+ timer.initWithCallback(new TimerCallback(aCallback), aDelay, timer.TYPE_ONE_SHOT);
>+}
You can pass aCallback to initWithCallback directly, no need for TimerCallback.
>+const files = [
Unused?
>+var IOService = Components.classes["@mozilla.org/network/io-service;1"]
>+ .getService(Components.interfaces.nsIIOService);
Services.io
>+function getResponse(aSet) {
Also seems to be unused?
>+function run_test() {
>+ // The search service needs to be started after the jarURIs pref has been
>+ // set in order to initiate it correctly
>+ let searchService = Cc["@mozilla.org/browser/search-service;1"]
>+ .getService(Ci.nsIBrowserSearchService);
Services.search
>+ var observerService = Cc["@mozilla.org/observer-service;1"]
>+ .getService(Ci.nsIObserverService);
Services.obs
>+ var observer = { observe: function(aSubject, aTopic, aData) {
function observer(aSubject, aTopic, aData) {
}
More tests are great, thanks for this!
Attachment #577983 -
Flags: review?(gavin.sharp) → feedback+
Comment 4•13 years ago
|
||
David, do you think you'll have time to work on another version anytime soon? If not, it's something I'd be interested in finishing up since I'm working on some other search bugs.
Assignee: rflint → nobody
Status: ASSIGNED → NEW
Target Milestone: Firefox 3.1b3 → ---
Comment 5•13 years ago
|
||
(In reply to Matthew N. [:MattN] from comment #4)
> David, do you think you'll have time to work on another version anytime
> soon? If not, it's something I'd be interested in finishing up since I'm
> working on some other search bugs.
Yes, I have a few tests, waiting for bug 699856.
Comment 6•13 years ago
|
||
Comment 7•12 years ago
|
||
We have a bunch of search service tests now. Is this bug still tracking something useful?
Comment 8•12 years ago
|
||
The search service deserves more test, but that's probably not a bug.
Comment 9•9 years ago
|
||
it's unclear if this is adding tests that are currently missing
Priority: P1 → P3
Whiteboard: [fxsearch]
Updated•9 years ago
|
Rank: 35
Updated•9 years ago
|
Priority: P3 → P4
Comment 10•4 years ago
|
||
I think the test sections here are covered, if they're not, then bug 1120642 will definitely cover them. Duping to that as it is clearer.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•