Last Comment Bug 777983 - Add Marionette test for gps support
: Add Marionette test for gps support
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Geolocation (show other bugs)
: Trunk
: All Gonk (Firefox OS)
: -- normal (vote)
: mozilla19
Assigned To: Al Tsai [:atsai]
:
:
Mentors:
Depends on: 797513
Blocks: 711300
  Show dependency treegraph
 
Reported: 2012-07-26 16:22 PDT by Kan-Ru Chen [:kanru] (UTC+8)
Modified: 2012-10-18 19:05 PDT (History)
5 users (show)
ryanvm: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed
fixed


Attachments
Add marionette test for b2g gps provider (3.65 KB, patch)
2012-10-09 00:50 PDT, Al Tsai [:atsai]
no flags Details | Diff | Splinter Review
Add marionette test for b2g gps provider (4.39 KB, patch)
2012-10-09 01:47 PDT, Al Tsai [:atsai]
doug.turner: review+
akeybl: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description Kan-Ru Chen [:kanru] (UTC+8) 2012-07-26 16:22:00 PDT
We can send fake position using emulator, so this should be testable using Marionette.
Comment 1 dclarke@mozilla.com [:onecyrenus] 2012-10-04 14:32:47 PDT
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");
Comment 2 Al Tsai [:atsai] 2012-10-09 00:50:11 PDT
Created attachment 669429 [details] [diff] [review]
Add marionette test for b2g gps provider
Comment 3 Al Tsai [:atsai] 2012-10-09 01:47:34 PDT
Created attachment 669443 [details] [diff] [review]
Add marionette test for b2g gps provider
Comment 4 Doug Turner (:dougt) 2012-10-09 19:13:00 PDT
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?
Comment 5 Al Tsai [:atsai] 2012-10-10 20:08:08 PDT
(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
Comment 6 Ryan VanderMeulen [:RyanVM] 2012-10-11 18:05:02 PDT
Don't resolve bugs until they land on mozilla-central.
Comment 7 Ryan VanderMeulen [:RyanVM] 2012-10-11 18:34:03 PDT
<3

https://hg.mozilla.org/integration/mozilla-inbound/rev/50ca3a4230c8
Comment 8 Ed Morley [:emorley] 2012-10-12 04:14:00 PDT
https://hg.mozilla.org/mozilla-central/rev/50ca3a4230c8
Comment 9 Kan-Ru Chen [:kanru] (UTC+8) 2012-10-15 01:15:36 PDT
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
Comment 10 dclarke@mozilla.com [:onecyrenus] 2012-10-15 12:57:21 PDT
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.
Comment 11 Lukas Blakk [:lsblakk] use ?needinfo 2012-10-15 15:16:12 PDT
Will wait for a response to the questions posed in comment 10 before assessing the approval request.
Comment 12 Kan-Ru Chen [:kanru] (UTC+8) 2012-10-15 16:12:44 PDT
@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?
Comment 13 dclarke@mozilla.com [:onecyrenus] 2012-10-16 00:21:11 PDT
Yes. 
conn = mozTCPSocket.open("10.0.2.2", 5554)
Comment 14 dclarke@mozilla.com [:onecyrenus] 2012-10-16 00:22:07 PDT
then i think you do a conn.send("geo fix " + lon + " " + lat)... something like that.. but definitely doable in mochitest land.
Comment 15 Kan-Ru Chen [:kanru] (UTC+8) 2012-10-16 00:49:35 PDT
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?
Comment 16 dclarke@mozilla.com [:onecyrenus] 2012-10-17 18:02:56 PDT
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.
Comment 17 Kan-Ru Chen [:kanru] (UTC+8) 2012-10-17 23:50:37 PDT
checkin-needed for aurora. a=akeybl
Comment 18 Ryan VanderMeulen [:RyanVM] 2012-10-18 19:05:34 PDT
https://hg.mozilla.org/releases/mozilla-aurora/rev/105f9010516d

Note You need to log in before you can comment on or make changes to this bug.