Closed Bug 980354 Opened 10 years ago Closed 10 years ago

B2G SMS & MMS: can't populate MobileMessageDB in marionette test cases

Categories

(Firefox OS Graveyard :: RIL, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vicamo, Assigned: vicamo)

References

Details

Attachments

(2 files, 3 obsolete files)

+++ This bug was initially created as a clone of Bug #974820 +++

E/GeckoConsole(   45): [JavaScript Error: "Permission denied to access object" {file: "resource://gre/modules/MobileMessageDB.jsm" line: 1812}]

This is best illustrated in bug 930839 comment 7 by Kyle Huey.
By running mmdb related test cases with chrome context, the problems I had in bug 943233 and bug 930839 comment 7 are gone.  We then have to separate "head.js" and "mmdb_head.js" because there is no SpecialPowers within chrome context.
Assignee: nobody → vyang
Attachment #8387014 - Flags: review?(gene.lian)
Attached patch part 2/2: test cases (obsolete) — Splinter Review
Add some more test cases in "test_mmdb_full_storage.js" as examples.
Comment on attachment 8387016 [details] [diff] [review]
part 2/2: test cases

Only touched Mobile Message marionette test cases: https://tbpl.mozilla.org/?tree=Try&rev=84019ed69843
Attachment #8387016 - Flags: review?(gene.lian)
Attachment #8387014 - Flags: review?(gene.lian) → review?(htsai)
Comment on attachment 8387016 [details] [diff] [review]
part 2/2: test cases

Ask for HsinYi's review because we're both in work week now.
Attachment #8387016 - Flags: review?(gene.lian) → review?(htsai)
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #4)
> Comment on attachment 8387016 [details] [diff] [review]
> part 2/2: test cases
> 
> Ask for HsinYi's review because we're both in work week now.

I found my review is reassigned when I'm available to clean up my review queue today. Thank you guys! Please let me know if you still need my support. Thanks!
Comment on attachment 8387014 [details] [diff] [review]
part 1/2: add mmdb_head.js and run mmdb test cases in chrome context

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

::: dom/mobilemessage/tests/marionette/test_mmdb_full_storage.js
@@ +31,3 @@
>      } else {
>        ok(false, "Unexpected result: " + aRv);
>        deferred.reject(aRv);

The change due to mmdb_head.js looks good, but I always encounter an error that leads to promise rejection (aRv = 0) with local marionette try. The test fails.
Attachment #8387014 - Flags: review?(htsai)
Comment on attachment 8387014 [details] [diff] [review]
part 1/2: add mmdb_head.js and run mmdb test cases in chrome context

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

My bad... I was using an old build for previous tests. Everything works now.
Attachment #8387014 - Flags: review+
Comment on attachment 8387016 [details] [diff] [review]
part 2/2: test cases

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

::: dom/mobilemessage/tests/marionette/test_mmdb_full_storage.js
@@ +28,5 @@
> +  return saveSendingMessage(aMmdb, newSavableMessage())
> +    .then((aValue) => aValue[0],
> +          (aValue) => aValue[0])
> +    .then((aValue) => is(aValue, Cr.NS_ERROR_FILE_NO_DEVICE_SPACE, "Database error code"))
> +    .then(() => aMmdb);

Returning aMmdb is kinda annoying and not clear enough. Could we revise this as our offline discussion? Except this, everything looks good.
Attachment #8387016 - Flags: review?(htsai)
Attached patch part 2/2: test cases : v2 (obsolete) — Splinter Review
1) Address previous review comment.  Add some comments at a few strange steps as well.
2) In |testMarkMessageRead|, the test should fail if |saveReceivedMessage| fails.
Attachment #8387016 - Attachment is obsolete: true
Attachment #8389806 - Flags: review?(htsai)
Attachment #8389806 - Flags: review?(htsai) → review+
No change. r=hsinyi only.
Attachment #8387014 - Attachment is obsolete: true
Attachment #8390301 - Flags: review+
No change. r=hsinyi only.
Attachment #8389806 - Attachment is obsolete: true
Attachment #8390302 - Flags: review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: