Closed Bug 800377 Opened 8 years ago Closed 8 years ago

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

Categories

(Core :: DOM: Device Interfaces, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19
Tracking Status
firefox18 --- fixed
firefox19 --- fixed

People

(Reporter: rwood, Assigned: rwood)

Details

Attachments

(1 file, 1 obsolete file)

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.
Attached 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: 8 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.