[WebAPI] WebSMS: Develop a test to verify message timestamps

RESOLVED FIXED in Firefox 18

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: rwood, Assigned: rwood)

Tracking

unspecified
mozilla19
All
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(firefox18 fixed, firefox19 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

A couple of times I have noticed strange behaviour with SMS message timestamps.  For example, have incoming message A, then after it has been received, send SMS message B.  Expect timestamp of message B to be greater/later than message A timestamp, however I have seen the timestamp of message B being earlier than that of message A.  Unable to reproduce now though, so to ensure there is not an issue here, develop a test to specifically verify message timestamps in relation to message order, when send/receive multiple messages.
Posted patch 800377patch (obsolete) — Splinter Review
The difference in timestamps was because of clock drift between the SCTS (SMS centre timestamp) and the device emulator/host (a small number of milliseconds).  Developed the test to compare timestamps at seconds resolution (which is the max resolution of the SCTS anyway).
Attachment #671605 - Flags: review?(jgriffin)
Comment on attachment 671605 [details] [diff] [review]
800377patch

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

Looks good, just a couple of minor nits below.

::: dom/sms/tests/marionette/test_timestamp.js
@@ +6,5 @@
> +SpecialPowers.setBoolPref("dom.sms.enabled", true);
> +SpecialPowers.addPermission("sms", true, document);
> +
> +let sms = window.navigator.mozSms;
> +let myNumber = "15555215554";

This variable is unused.

@@ +23,5 @@
> +  log("Verifying initial state.");
> +  ok(sms, "mozSms");
> +  if(!testCount) {
> +    testCount = 1;
> +  }

This block is unnecessary, since testCount is set to 10 earlier.
Attachment #671605 - Flags: review?(jgriffin) → review-
Thanks for the feedback Jonathan, updated patch attached.
Attachment #671605 - Attachment is obsolete: true
Attachment #675103 - Flags: review?(jgriffin)
Attachment #675103 - Flags: review?(jgriffin) → review+
https://hg.mozilla.org/mozilla-central/rev/c45e5390c3cf
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
not trying on ash, since this patch will have effect there at present:

https://hg.mozilla.org/releases/mozilla-aurora/rev/03840ac0ca68
You need to log in before you can comment on or make changes to this bug.