Closed Bug 1127730 Opened 9 years ago Closed 9 years ago

[STK] icc_events.js need Unit Test

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

x86
macOS
defect
Not set
normal

Tracking

(b2g-v2.0M affected, b2g-v2.1 fixed, b2g-v2.1S fixed, b2g-v2.2 fixed, b2g-master fixed)

RESOLVED FIXED
2.2 S6 (20feb)
Tracking Status
b2g-v2.0M --- affected
b2g-v2.1 --- fixed
b2g-v2.1S --- fixed
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: selee, Assigned: selee)

References

Details

Attachments

(3 files)

STK module needs a unit test for icc_events.js .
The following events should be verified whether they are handled correctly. 
    STK_EVENT_TYPE_MT_CALL: 0x00,
    STK_EVENT_TYPE_CALL_CONNECTED: 0x01,
    STK_EVENT_TYPE_CALL_DISCONNECTED: 0x02,
    STK_EVENT_TYPE_LOCATION_STATUS: 0x03,
    STK_EVENT_TYPE_USER_ACTIVITY: 0x04,
    STK_EVENT_TYPE_IDLE_SCREEN_AVAILABLE: 0x05,
    STK_EVENT_TYPE_LANGUAGE_SELECTION: 0x07,
    STK_EVENT_TYPE_BROWSER_TERMINATION: 0x08,
Attached patch WIP patchSplinter Review
Here is the WIP patch which is testing the following events:
STK_EVENT_TYPE_IDLE_SCREEN_AVAILABLE
STK_EVENT_TYPE_BROWSER_TERMINATION
Comment on attachment 8562480 [details] [review]
[PullReq] weilonge:seanlee/STK/master/Bug1127730 to mozilla-b2g:master

Hi Tim, Fernando,

I implement a unit test for icc_events.js, and it needs your help to review it.
The responsibility of icc_events.js is to handle some kinds of STK setup event as the following:
      STK_EVENT_TYPE_MT_CALL
      STK_EVENT_TYPE_CALL_CONNECTED
      STK_EVENT_TYPE_CALL_DISCONNECTED
      STK_EVENT_TYPE_LOCATION_STATUS
      STK_EVENT_TYPE_USER_ACTIVITY
      STK_EVENT_TYPE_IDLE_SCREEN_AVAILABLE
      STK_EVENT_TYPE_LANGUAGE_SELECTION
      STK_EVENT_TYPE_BROWSER_TERMINATION

In general case, SIM card will send a list of the events that it wants to monitor, so the function icc_events.register should register the event depends on its type.
After the event registration, icc_events will send event envelope command (call sendStkEventDownload) to SIM card when the specific event happened.

If you need any information, please tell me.

Thank you!
Attachment #8562480 - Flags: review?(timdream)
Attachment #8562480 - Flags: review?(frsela)
Comment on attachment 8562480 [details] [review]
[PullReq] weilonge:seanlee/STK/master/Bug1127730 to mozilla-b2g:master

frsela can review this. Thanks.
Attachment #8562480 - Flags: review?(timdream) → feedback+
Comment on attachment 8562480 [details] [review]
[PullReq] weilonge:seanlee/STK/master/Bug1127730 to mozilla-b2g:master

Great !

Tested and runs great !

Good job and thanks for taking this !
Attachment #8562480 - Flags: review?(frsela) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment on attachment 8562480 [details] [review]
[PullReq] weilonge:seanlee/STK/master/Bug1127730 to mozilla-b2g:master

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #):

[User impact] if declined:
Won't impact to users. This patch is only a unit test for icc_events .

[Testing completed]:
Tested PASS in Unit Test.

[Risk to taking this patch] (and alternatives if risky):
No risk. This patch is only a unit test to improve the correctness of STK setup event feature.

[String changes made]:
None
Attachment #8562480 - Flags: approval-gaia-v2.2?
Attachment #8562480 - Flags: approval-gaia-v2.1?
Blocks: 1132363
Comment on attachment 8562480 [details] [review]
[PullReq] weilonge:seanlee/STK/master/Bug1127730 to mozilla-b2g:master

low risk, test only changes, good to land.
Attachment #8562480 - Flags: approval-gaia-v2.2?
Attachment #8562480 - Flags: approval-gaia-v2.2+
Attachment #8562480 - Flags: approval-gaia-v2.1?
Attachment #8562480 - Flags: approval-gaia-v2.1+
Thanks :)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: