Closed
Bug 908012
Opened 12 years ago
Closed 12 years ago
B2G RIL: Add telephony marionette tests for conference call
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: hsinyi, Assigned: hsinyi)
References
Details
Attachments
(1 file, 3 obsolete files)
20.21 KB,
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
Assignee | ||
Comment 2•12 years ago
|
||
Assignee | ||
Comment 3•12 years ago
|
||
Addressed some nits.
Attachment #799951 -
Attachment is obsolete: true
Assignee | ||
Comment 4•12 years ago
|
||
Attachment #799972 -
Attachment is obsolete: true
Assignee | ||
Updated•12 years ago
|
Attachment #799977 -
Flags: review?(vyang)
Comment 5•12 years ago
|
||
Comment on attachment 799977 [details] [diff] [review]
908012.patch
Review of attachment 799977 [details] [diff] [review]:
-----------------------------------------------------------------
Thank you, but I'd like to have another run :)
::: dom/telephony/test/marionette/test_conference.js
@@ +30,5 @@
> + log("Verifying initial state.");
> + ok(telephony);
> + is(telephony.active, null);
> + ok(telephony.calls);
> + is(telephony.calls.length, 0);
I'd like to have a convenient function to track |telephony.active|, |telephony.calls|, |conference.calls| changes every time you perform an action.
function checkStates(telephonyActive, telephonyCalls, conferenceState, conferenceCalls) { ... }
@@ +31,5 @@
> + ok(telephony);
> + is(telephony.active, null);
> + ok(telephony.calls);
> + is(telephony.calls.length, 0);
> + calls = telephony.calls;
nit: |calls| is assigned but never referenced.
@@ +33,5 @@
> + ok(telephony.calls);
> + is(telephony.calls.length, 0);
> + calls = telephony.calls;
> +
> + runEmulatorCmd("gsm clear", function(result) {
<Copied from my comment in bug 821579>
Please have a utility function for this. See test_filter_mixed.js[1]. Or this case may, not very often, result in an intermittent failure like bug 903058.
[1]: https://mxr.mozilla.org/mozilla-central/source/dom/mobilemessage/tests/marionette/test_filter_mixed.js#16
@@ +48,5 @@
> + is(outgoingCall.state, "dialing");
> +
> + is(outgoingCall, telephony.active);
> + is(telephony.calls.length, 1);
> + is(telephony.calls[0], outgoingCall);
So we can replace these three calls with |checkStates(outgoingCall, [outgoingCall], '', null);|.
@@ +51,5 @@
> + is(telephony.calls.length, 1);
> + is(telephony.calls[0], outgoingCall);
> +
> + outgoingCall.onalerting = function(event) {
> + log("Received 'onalerting' call event.");
disconnect onalerting event handler?
@@ +171,5 @@
> +function conferenceAddTwoCalls() {
> + log("Creating a conference call.");
> +
> + ok(conference);
> + is(conference.calls.length, 0);
It looks like |telephony.conference| is instantiated along with |telephony| itself. So, we should move this check into |verifyInitialState()| and check |conference.calls.length| there, too.
@@ +196,5 @@
> + };
> +
> + conference.onconnected = function(event) {
> + log("Received 'connected' event for the conference call.");
> + conference.onconnected = null;
Is there a fixed order of conference oncallchanged and onconnected events? We can have a |is(conference.oncallchanged, null);| to make sure these events come in order. So applies to outgoingCall onstatechange and ongroupchange events. And incomingCall, of course.
Attachment #799977 -
Flags: review?(vyang) → feedback+
Assignee | ||
Comment 6•12 years ago
|
||
Review comments addressed.
Attachment #799977 -
Attachment is obsolete: true
Assignee | ||
Updated•12 years ago
|
Attachment #802114 -
Flags: review?(vyang)
Updated•12 years ago
|
Attachment #802114 -
Flags: review?(vyang) → review+
Assignee | ||
Comment 7•12 years ago
|
||
try looks good! https://tbpl.mozilla.org/?tree=Try&rev=45f569850d32
Assignee | ||
Comment 8•12 years ago
|
||
Comment 9•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•