Closed Bug 1120805 Opened 11 years ago Closed 10 years ago

[B2G][RIL] Remove deprecated xpcshell test functions used in RIL test code

Categories

(Firefox OS Graveyard :: RIL, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:backlog, firefox39 fixed)

RESOLVED FIXED
tracking-b2g backlog
Tracking Status
firefox39 --- fixed

People

(Reporter: jdai, Assigned: jdai)

Details

Attachments

(1 file, 3 obsolete files)

Base on [1], many of xpcshell test case assertions are deprecated since Gecko 32.0. We need to rename all of them. [1] https://developer.mozilla.org/en-US/docs/Mozilla/QA/Writing_xpcshell-based_unit_tests
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Summary: [B2G][RIL] Rename deprecated RIL test cases function. → [B2G][RIL] Remove deprecated xpcshell test functions used in RIL test code
Remove some modified code which are unintended to be.
Attachment #8551639 - Attachment is obsolete: true
Attachment #8551639 - Flags: review?(echen)
Attachment #8551650 - Flags: review?(echen)
Comment on attachment 8551650 [details] [diff] [review] Remove deprecated xpcshell test functions used in RIL test code.(V2) Review of attachment 8551650 [details] [diff] [review]: ----------------------------------------------------------------- Sorry for the late review, I was busy in other things with higher priority. Please see my comments below, thank you. `do_throws` is also deprecated [1], please also help to replace it by [2]. And I got conflict when applying this patch into latest m-c, please help to provide a rebased version. [1] https://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/tests/header_helpers.js#218-219,223-224 [2] https://dxr.mozilla.org/mozilla-central/source/testing/modules/Assert.jsm#411-448 ::: dom/system/gonk/tests/test_ril_worker_icc_SimRecordHelper.js @@ +1346,5 @@ > recordHelper.readCphsInfo(() => { onsuccess = true; }, > () => { onerror = true; }); > > + ok((cphsSt) ? onsuccess : onerror); > + ok(!(cphsSt) ? onerror : onsuccess); Should this be `ok(!((cphsSt) ? onerror : onsuccess));`?
Attachment #8551650 - Flags: review?(echen)
1. Updating relative testcase to address comment 3. 2. Providing a rebased version patch to the latest m-c.
Attachment #8551650 - Attachment is obsolete: true
Attachment #8561802 - Flags: review?(echen)
Comment on attachment 8561802 [details] [diff] [review] Remove deprecated xpcshell test functions used in RIL test code.(V3) Review of attachment 8561802 [details] [diff] [review]: ----------------------------------------------------------------- r=me with comments addressed, thank you. ::: dom/system/gonk/tests/test_ril_worker_buf.js @@ +56,5 @@ > self.context.Buf.readInt32(); > + } catch (e) { > + ex = e; > + } > + ok(!ex); try { .... } catch (e) { ok(false, "Got exception: " + e); } @@ +71,5 @@ > self.context.Buf.readUint16(); > + } catch (e) { > + ex = e; > + } > + ok(!ex); Ditto @@ -77,5 @@ > while (buf.readAvailable > 0) { > buf.readUint8(); > } > > - do_check_throws(function over_read_handler() { Please also removes the `do_check_throws()` defined in header_helpers.js.
Attachment #8561802 - Flags: review?(echen) → review+
blocking-b2g: --- → backlog
b2g-inbound is closed now, I will try pushing later.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: