[MCTS][2.2] webapi:telephony test cause Telephony.oncallschanged event not found

RESOLVED FIXED

Status

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: oouyang, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

54 bytes, text/x-github-pull-request
atsai
: review+
askeing
: review+
Details | Review | Splinter Review
(Reporter)

Description

4 years ago
From the following bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1081811

We think it need makes some change depends on this bug.
(Reporter)

Comment 1

4 years ago
Hi Hsin-Yi,

I think this case is related to bug 1081811.
Could you give us some hint or infomration, and let us to modify this case to resolve this issue?
Flags: needinfo?(htsai)
(In reply to oo[oouyang] from comment #1)
> Hi Hsin-Yi,
> 
> I think this case is related to bug 1081811.
> Could you give us some hint or infomration, and let us to modify this case
> to resolve this issue?

Sure.

After bug 1081811, please make sure that you don't rely on 'callschanged' event to determine if telephony initialization work completes. You should wait for 'ready' event instead. Please give it a try and see if my suggestion helps.
Flags: needinfo?(htsai)
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #2)
> (In reply to oo[oouyang] from comment #1)
> > Hi Hsin-Yi,
> > 
> > I think this case is related to bug 1081811.
> > Could you give us some hint or infomration, and let us to modify this case
> > to resolve this issue?
> 
> Sure.
> 
> After bug 1081811, please make sure that you don't rely on 'callschanged'
> event to determine if telephony initialization work completes. You should
> wait for 'ready' event instead. Please give it a try and see if my
> suggestion helps.

Sorry, there's no ready event in the latest m-c code. Instead, we have a 'ready' promise.
(Reporter)

Comment 4

4 years ago
Hi Hsin-yi,

Could you please provide a piece of sample code to use 'ready' promise?

Thanks
Flags: needinfo?(htsai)
Do something like:
 
let telephony = window.navigator.mozTelephony;

telephony.ready.then(
  function() {
    // Do what you need once telephony is ready.  
    console.log("Telephony got ready");

   // Some callback here...
  },
  function() {
   // Do what you need once telephony fails initializing.
  }
);


gecko/dom/telephony/test/marionette/test_ready.js could also provide a good reference to you.
Flags: needinfo?(htsai)
(Reporter)

Comment 6

4 years ago
Created attachment 8591485 [details] [review]
fix telephony 2.2 issues
Attachment #8591485 - Flags: review?(fyen)
Attachment #8591485 - Flags: review?(atsai)
Comment on attachment 8591485 [details] [review]
fix telephony 2.2 issues

LGTM
Attachment #8591485 - Flags: review?(fyen) → review+

Comment 8

4 years ago
Comment on attachment 8591485 [details] [review]
fix telephony 2.2 issues

r=me. merged.
Attachment #8591485 - Flags: review?(atsai) → review+

Updated

4 years ago
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.