Closed Bug 1224085 Opened 9 years ago Closed 8 years ago

Waiting for states in "initialization" of Mobileconnection marionette-webapi tests

Categories

(Firefox OS Graveyard :: RIL, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: hsinyi, Unassigned)

Details

Attachments

(1 file)

Before each test starts, we will call "ensureMobileConnection()" in head.js to make sure "mobileconnection instance" is created without problems. That's still not enough because it's possible that radio state, registration state , ... are not ready. The safer way is that we need to explicitly wait for those states being ready before executing the real tests.


[1] https://dxr.mozilla.org/mozilla-central/source/dom/mobileconnection/tests/marionette/head.js#245
Assignee: nobody → htsai
Summary: Having and waiting for solid states in "initialization" of Mobileconnection marionette-webapi tests → Waiting for states in "initialization" of Mobileconnection marionette-webapi tests
Attached patch 1224085.patchSplinter Review
Wait for mozMobileConnection initialization thoroughly completes before aTestCaseMain runs.
Comment on attachment 8687101 [details] [diff] [review]
1224085.patch

Hi Edgar,
Comment 4 shows positive try results. Could you help review this? Thank you!
Attachment #8687101 - Flags: review?(echen)
Comment on attachment 8687101 [details] [diff] [review]
1224085.patch

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

Looks good, just one thing, please see my comment below. Thank you.

::: dom/mobileconnection/tests/marionette/head.js
@@ +303,5 @@
> + */
> +function ensureMobileConnectionInitialStates(aServiceId) {
> +  let mobileConn = getMozMobileConnectionByServiceId(aServiceId);
> +  if (mobileConn.radioState === "enabled" &&
> +      !!mobileConn.iccId && mobileConn.voice.connected) {

What if |radioState| is "enabled", but iccId isn't ready yet (e.g. ril is still processing icc io), then we still wait "radiostatechange" event which won't be sent actually in line#313. IMO, we should check status to decide whether we need to wait the event (same for |iccId| and |voice.connected|).
Attachment #8687101 - Flags: review?(echen) → review+
Considering the Tier3 situation, I got the impression that we won't fix this.
Assignee: htsai → nobody
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: