Closed Bug 488542 Opened 16 years ago Closed 16 years ago

Move TestGeolocationProvider.js into mochitest

Categories

(Core :: DOM: Geolocation, defect)

defect
Not set
major

Tracking

()

RESOLVED WONTFIX

People

(Reporter: dougt, Assigned: dougt)

References

()

Details

Attachments

(1 obsolete file)

Right now, we have TestGeolocationProvider.js as part of the DOM and it is built when enable-tests is defined. We also have a default network geolocation provider installed. Both can not co-exists. In the mochitests, we make sure we are using the right one (via cid). In addition to what we are doing, i would like to NOT build the TestGeolocationProvider.js and instead just have it be part of the mochitest setup. For our releases on Mac OS, right now we are dependent on our build machines not building with tests. If they ever do, geolocation may start using this test file. Clint, what needs to be done to do this?
clint? ^
You should be able to override the component the same way we override the default nsITransfer implementation here: http://mxr.mozilla.org/mozilla-central/source/toolkit/content/tests/browser/browser_bug471962.js#133
having to manually register stuff is one way, the other is to just allow js components to be dropped in during the mochitest setup of the profile, right?
That sounds like a lot more work :) I agree that it would probably be useful, though I'm not sure there are that many cases where we currently need to do it.
gavin, either way, having the component be installed in dist/bin/components when tests is enabled is broken and needs to be fixed.
Yes. I'm suggesting you remove the component, and move it to some common test file (e.g. geolocation_common.js).
Attached patch patch v.1 (obsolete) — Splinter Review
Attachment #374090 - Flags: review?
Attachment #374090 - Flags: review? → review?(ctalbert)
Attachment #374090 - Attachment is obsolete: true
Attachment #374090 - Flags: review?(ctalbert)
that last patch moved the component into shared code that is called by the mochitest for each test. It got pretty ugly because each function block needed a permissions call. I was also seeing some registration funkiness with repeated runs. I am not convinced that this is a good way to test.
the best approach is to convert these tests to browser-chrome
browser-chrome task: bug 489817
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
No longer blocks: 491675
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: