Closed Bug 1028099 Opened 7 years ago Closed 7 years ago

Telephony marionette test: hangup all calls locally in setup stage

Categories

(Firefox OS Graveyard :: RIL, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.0 S5 (4july)

People

(Reporter: aknow, Assigned: aknow)

Details

Attachments

(1 file, 2 obsolete files)

I think that during the test setup, we could clear the existing calls by hanging up from both 'local' and 'remote' sides.
The patch is rebased on bug 1027996
Attachment #8443380 - Flags: review?(htsai)
Comment on attachment 8443380 [details] [diff] [review]
Hang up calls locally in setup stage

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

::: dom/telephony/test/marionette/head.js
@@ +111,5 @@
> +    // Hang up all calls.
> +    let hangUpPromises = [];
> +
> +    for (let call of telephony.calls) {
> +      log('.. hangUp ' + call.number);

nit: use double-quote marks

@@ +116,5 @@
> +      hangUpPromises.push(hangUp(call));
> +    }
> +
> +    for (let call of conference.calls) {
> +      log('.. hangUp ' + call.number);

ditto.

@@ +124,5 @@
> +    return Promise.all(hangUpPromises)
> +      .then(() => {
> +        return emulator.run("gsm clear");
> +      })
> +      .then(delay(1000))

Not sure why we need a delay. We will wait for no calls anyway, no?

@@ +531,5 @@
> +   * @param call
> +   *        A TelephonyCall object.
> +   * @return A deferred promise.
> +   */
> +  function hangUp(call) {

Oh, sorry that we have this function in the latest m-c. Please rebase properly.
Attachment #8443380 - Flags: review?(htsai)
Attachment #8443380 - Attachment is obsolete: true
Attachment #8444302 - Flags: review?(htsai)
Comment on attachment 8444302 [details] [diff] [review]
#2 Hang up calls locally in setup stage

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

Thank you!

::: dom/telephony/test/marionette/head.js
@@ +1133,5 @@
>    this.gDial = dial;
>    this.gAnswer = answer;
>    this.gHangUp = hangUp;
>    this.gHold = hold;
> +  this.gHangUp = hangUp;

This is already in m-c :)
Attachment #8444302 - Flags: review?(htsai) → review+
https://tbpl.mozilla.org/?tree=Try&rev=3ce95cf399ed
Keywords: checkin-needed
Target Milestone: --- → 2.0 S5 (4july)
You need to log in before you can comment on or make changes to this bug.