Closed Bug 777983 Opened 12 years ago Closed 12 years ago

Add Marionette test for gps support

Categories

(Core :: DOM: Geolocation, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19
Tracking Status
firefox18 --- fixed
firefox19 --- fixed

People

(Reporter: kanru, Assigned: atsai)

References

Details

Attachments

(1 file, 1 obsolete file)

We can send fake position using emulator, so this should be testable using Marionette.
Depends on: 797513
Kan-Ru, I think you will be able to do this following

http://mxr.mozilla.org/mozilla-central/source/dom/battery/test/marionette/test_battery.js

runEmulatorCmd("geo fix lat lon");
Assignee: nobody → atsai
Attachment #669429 - Flags: review?(doug.turner)
Attachment #669429 - Attachment is obsolete: true
Attachment #669429 - Flags: review?(doug.turner)
Attachment #669443 - Flags: review?(doug.turner)
I am trying to understand what this is really testing.  So, you can send a command to the emulator like:

geo fix 1 2

And the gonk gps provider will see a fix at 1 , 2?
(In reply to Doug Turner (:dougt) from comment #4)
> I am trying to understand what this is really testing.  So, you can send a
> command to the emulator like:
> 
> geo fix 1 2
> 
> And the gonk gps provider will see a fix at 1 , 2?

Yes. And make sure both getCurrentPosition and watchPosition works
Attachment #669443 - Flags: review?(doug.turner) → review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Don't resolve bugs until they land on mozilla-central.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
https://hg.mozilla.org/mozilla-central/rev/50ca3a4230c8
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Component: General → Geolocation
Product: Boot2Gecko → Core
Target Milestone: --- → mozilla19
Version: unspecified → Trunk
Comment on attachment 669443 [details] [diff] [review]
Add marionette test for b2g gps provider

[Approval Request Comment]
Bug caused by (feature/regressing bug #): none
User impact if declined: none
Testing completed (on m-c, etc.): yes
Risk to taking this patch (and alternatives if risky): low. This only adds a testcase for testing B2G default GPS geolocation provider.
String or UUID changes made by this patch: none
Attachment #669443 - Flags: approval-mozilla-aurora?
Kan ru question is whether this should be in marionette or in mochitest ? 

https://github.com/geoelectric/webapi-smoke-sprint

If you feel it should be in marionette, could you explain why ? Because I spent time figuring this out for mochitest, would seem that it would be a good idea for us to understand why we wouldn't just keep this in mochitest, or for me to understand what should be in marionette vs mochitest.
Will wait for a response to the questions posed in comment 10 before assessing the approval request.
@dclarke This test requires marionette because it tests the specific GonkGPSGeolocationProvider component and we want to use the emulator to send fake location info. Does mochitest support that?
Yes. 
conn = mozTCPSocket.open("10.0.2.2", 5554)
then i think you do a conn.send("geo fix " + lon + " " + lat)... something like that.. but definitely doable in mochitest land.
I'm fine with either one, as long as there is a test. Marionette test was our only choice. Are you suggesting that we move to mochitest?
Attachment #669443 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
kan-ru, I was supposed to respond to this, but forgot. I thought I had a suggestion which was to just keep things in mochitest, but team seems to want to move things to marionette.
checkin-needed for aurora. a=akeybl
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: