Move TestGeolocationProvider.js into mochitest

RESOLVED WONTFIX

Status

()

Core
Geolocation
--
major
RESOLVED WONTFIX
9 years ago
9 years ago

People

(Reporter: dougt, Assigned: dougt)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 obsolete attachment)

(Assignee)

Description

9 years ago
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?
(Assignee)

Comment 1

9 years ago
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
(Assignee)

Comment 3

9 years ago
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.
(Assignee)

Comment 5

9 years ago
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).
(Assignee)

Comment 7

9 years ago
Created attachment 374090 [details] [diff] [review]
patch v.1
Attachment #374090 - Flags: review?
(Assignee)

Updated

9 years ago
Attachment #374090 - Flags: review? → review?(ctalbert)
(Assignee)

Updated

9 years ago
Attachment #374090 - Attachment is obsolete: true
Attachment #374090 - Flags: review?(ctalbert)
(Assignee)

Comment 8

9 years ago
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.
(Assignee)

Comment 9

9 years ago
the best approach is to convert these tests to browser-chrome
(Assignee)

Comment 10

9 years ago
browser-chrome task:  bug 489817
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WONTFIX
(Assignee)

Updated

9 years ago
No longer blocks: 491675
You need to log in before you can comment on or make changes to this bug.