Closed Bug 931697 Opened 11 years ago Closed 11 years ago

WebTelephony: Add marionette test cases for multi-sim

Categories

(Firefox OS Graveyard :: RIL, defect)

x86_64
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
1.3 Sprint 6 - 12/6

People

(Reporter: aknow, Assigned: aknow)

References

Details

Attachments

(1 file, 4 obsolete files)

      No description provided.
Attached patch Sample dsds outgoing marionette test (obsolete) (deleted) — Splinter Review
Attached patch Add dsds outgoing call marionette test (obsolete) (deleted) — Splinter Review
1. dsds outgoing call test
2. startDSDSTest() macro in head.js
Attachment #823854 - Attachment is obsolete: true
Attachment #827880 - Flags: review?(htsai)
Comment on attachment 827880 [details] [diff] [review]
Add dsds outgoing call marionette test

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

General comment: Please don't forget manifest.in

::: dom/telephony/test/marionette/head.js
@@ +160,5 @@
> +
> +  if (numRIL > 1) {
> +    startTest(test);
> +  } else {
> +    log('Not a DSDS environment. Test is skipped.');

nit: use double quotation mark.

::: dom/telephony/test/marionette/test_dsds_outgoing.js
@@ +130,5 @@
> +
> +  return deferred.promise;
> +}
> +
> +function makeCallForServiceId(number, serviceId) {

I'd rename it testOutgoingCallForServiceId.

And I'd like to see 'testIncomingCallForServiceId' too. :)

@@ +139,5 @@
> +    .then(() => dial(number, serviceId))
> +    .then(call => { outCall = call; })
> +    .then(() => {
> +      is(outCall.serviceId, serviceId);
> +      return checkAll(outCall, [outCall], [outInfo.ringing]);

We don't need 'return', i.e. |checkAll(outCall, [outCall], [outInfo.ringing]);| is fine.
Attachment #827880 - Flags: review?(htsai)
> @@ +139,5 @@
> > +    .then(() => dial(number, serviceId))
> > +    .then(call => { outCall = call; })
> > +    .then(() => {
> > +      is(outCall.serviceId, serviceId);
> > +      return checkAll(outCall, [outCall], [outInfo.ringing]);
> 
> We don't need 'return', i.e. |checkAll(outCall, [outCall],
> [outInfo.ringing]);| is fine.

I think 'return' is needed.

.then(() => {
  is(outCall.serviceId, serviceId);
  return checkAll(outCall, [outCall], [outInfo.ringing]);
})

checkAll() return a promise. We should return it. Otherwise, the next .then part will be execute immediately.
1. Add incoming call test.
2. I would like to rename the filename to "test_dsds_normal_call" (also in manifest). This part is not included in the patch to avoid the difficulty of diff view after renaming.
Attachment #827880 - Attachment is obsolete: true
Attachment #8342195 - Flags: review?(htsai)
Attached patch file rename (obsolete) (deleted) — Splinter Review
Attachment #8342198 - Flags: review?(htsai)
Comment on attachment 8342195 [details] [diff] [review]
#2 multisim test (Add dsds outgoing call marionette test)

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

Looks good!
Attachment #8342195 - Flags: review?(htsai) → review+
Comment on attachment 8342198 [details] [diff] [review]
file rename

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

Looks good. Please squish the two patches into one for landing, thanks.
Attachment #8342198 - Flags: review?(htsai) → review+
Attachment #8342198 - Attachment is obsolete: true
Attachment #8342195 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/08d07ae47342
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.3 Sprint 6 - 12/6
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: