Closed
Bug 940884
Opened 12 years ago
Closed 12 years ago
B2G SMS: Create MobileMessageDB.jsm
Categories
(Firefox OS Graveyard :: RIL, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: vicamo, Assigned: vicamo)
References
Details
Attachments
(4 files, 4 obsolete files)
1.21 KB,
patch
|
khuey
:
review+
airpingu
:
review+
|
Details | Diff | Splinter Review |
5.97 KB,
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
10.98 KB,
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
127.40 KB,
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #836542 +++
Move nearly all MobileMessageDatabaseService.js lines into a jsm so that we can have a test on it.
Assignee | ||
Comment 1•12 years ago
|
||
Simply copy MobileMessageDatabaseService.js as MobileMessageDB.jsm.
Assignee: nobody → vyang
Attachment #8336758 -
Flags: review?(khuey)
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #8336759 -
Flags: review?(gene.lian)
Assignee | ||
Comment 3•12 years ago
|
||
This patch is to ease test cases development, so that we can have full control to database initialization process.
Attachment #8336762 -
Flags: review?(gene.lian)
Assignee | ||
Comment 4•12 years ago
|
||
test cases for MobileMessageDB init/close/re-init.
Attachment #8336764 -
Flags: review?(gene.lian)
Assignee | ||
Comment 6•12 years ago
|
||
Assignee | ||
Comment 7•12 years ago
|
||
Mnw failed due to bug 940881, which had already fix landed. Re-trigger again.
The new test case introduced in attachment 8336764 [details] [diff] [review] passed successfully.
Updated•12 years ago
|
Attachment #8336759 -
Flags: review?(gene.lian) → review+
Comment 8•12 years ago
|
||
Comment on attachment 8336762 [details] [diff] [review]
part 2.b/3: Move init functions out of MobileMessage constructor
Review of attachment 8336762 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/mobilemessage/src/gonk/MobileMessageDB.jsm
@@ +290,5 @@
>
> /**
> + * Initialize this MobileMessageDB.
> + *
> + * @param aName
s/aName/aDbName
@@ +292,5 @@
> + * Initialize this MobileMessageDB.
> + *
> + * @param aName
> + * A string name for that database.
> + * @param aVersion
s/aVersion/aDbVersion
Attachment #8336762 -
Flags: review?(gene.lian) → review+
Comment 9•12 years ago
|
||
Comment on attachment 8336764 [details] [diff] [review]
part 3/3: test cases
Review of attachment 8336764 [details] [diff] [review]:
-----------------------------------------------------------------
This is awesome! Thanks!
::: dom/mobilemessage/tests/marionette/head.js
@@ +350,5 @@
> +
> +/* Initialize a MobileMessageDB. Resolve if initialized with success, reject
> + * otherwise.
> + *
> + * Forfill params: a MobileMessageDB instance.
s/Forfill/Fullfill
@@ +361,5 @@
> + * version.
> + *
> + * @return A deferred promise.
> + */
> +function initMobileMessageDB(aMmdb, aName, aVersion) {
Where is |@param aMmdb|?
@@ +381,5 @@
> + * @return The passed MobileMessageDB instance.
> + */
> +function closeMobileMessageDB(aMmdb) {
> + aMmdb.close();
> + return aMmdb;
Why need to return?
Attachment #8336764 -
Flags: review?(gene.lian) → review+
Updated•12 years ago
|
Attachment #8336758 -
Flags: review+
Assignee | ||
Comment 10•12 years ago
|
||
(In reply to Gene Lian [:gene] (needinfo? encouraged) from comment #9)
> ::: dom/mobilemessage/tests/marionette/head.js
> @@ +381,5 @@
> > + * @return The passed MobileMessageDB instance.
> > + */
> > +function closeMobileMessageDB(aMmdb) {
> > + aMmdb.close();
> > + return aMmdb;
>
> Why need to return?
It was designed to be a handler for Promise. Return value of a Promise handler becomes the argument for the next handler in chain. So, returning the input argument here helps chaining up handlers easily.
However, bug 943233 prevents this easy setup due to some unknown exported js object unwrapping issue. See there for details.
Assignee | ||
Comment 11•12 years ago
|
||
rebase onto bug 942780.
Attachment #8336759 -
Attachment is obsolete: true
Assignee | ||
Comment 12•12 years ago
|
||
address comment 8
Attachment #8336762 -
Attachment is obsolete: true
Assignee | ||
Updated•12 years ago
|
Attachment #8338427 -
Flags: review+
Assignee | ||
Updated•12 years ago
|
Attachment #8338428 -
Flags: review+
Assignee | ||
Comment 13•12 years ago
|
||
address comment 9.
Attachment #8336764 -
Attachment is obsolete: true
Attachment #8338429 -
Flags: review+
Attachment #8336758 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 14•12 years ago
|
||
Will only land after v1.3 gets forked.
Assignee | ||
Comment 15•12 years ago
|
||
Rebase after bug 946079, bug 945711
Attachment #8338427 -
Attachment is obsolete: true
Attachment #8345678 -
Flags: review+
Assignee | ||
Comment 16•12 years ago
|
||
Assignee | ||
Comment 17•12 years ago
|
||
Comment 18•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1033175b536c
https://hg.mozilla.org/mozilla-central/rev/fbf36cc32d02
https://hg.mozilla.org/mozilla-central/rev/b50959566023
https://hg.mozilla.org/mozilla-central/rev/4ca61e6ae245
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•