Closed Bug 1028003 Opened 10 years ago Closed 10 years ago

[B2G][mochitest]'wifi' option is not working on running b2g device mochitest

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla34

People

(Reporter: youngwoo.jo, Assigned: youngwoo.jo)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0 (Beta/Release)
Build ID: 20140618030215

Steps to reproduce:

Run mochitest with '--wifi {your-wifi-setting}' on a device.


Actual results:

Error, "TypeError: Argument 1 of MozWifiManager.associate does not implement interface MozWifiNetwork." is printed and wifi can not be connected automatically using wifi option.


Expected results:

wifi should be connected on running mochitest with 'wifi' option on a device.
WIFI manager API was changed to use webidl, however the related changes have not been applied to b2g_start_script.js. (both in gecko v2.0 and gecko master)

In v2.0 and master, MozwifiManager.webidl
 - DOMRequest associate(MozWifiNetwork network);
In the previous versions
 - nsIDOMDOMRequest associate(in jsval network);

So we have to change the code to connect WIFI from b2g_start_script.js.
the current code is the below.
 - manager.associate(wifiSettings);
It should be changed to the below.
 - manager.associate(new window.MozWifiNetwork(wifiSettings));

I verified the new code is working fine.
This is a patch to modify the parameter type of associate() in b2g_start_script.js.
I think this patch should be applied to both v2.0 and master.
David, what do you think about this issue and about my patch?
Flags: needinfo?(onecyrenus)
Component: General → Mochitest
Product: Firefox OS → Testing
Seems good to me.
Flags: needinfo?(onecyrenus)
Comment on attachment 8443270 [details] [diff] [review]
b2g_mochitest_wifi.patch

Review of attachment 8443270 [details] [diff] [review]:
-----------------------------------------------------------------

David Clarke isn't working for Mozilla anymore, it needs formal review in order to be checked in.
Attachment #8443270 - Flags: review?(jgriffin)
Assignee: nobody → hiro7998
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 8443270 [details] [diff] [review]
b2g_mochitest_wifi.patch

Review of attachment 8443270 [details] [diff] [review]:
-----------------------------------------------------------------

Looks ok if it passes try.
Attachment #8443270 - Flags: review?(jgriffin) → review+
Ok, tryserver is green for b2g mochitest.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/12390c6bb22f
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.