Closed Bug 1031226 Opened 11 years ago Closed 11 years ago

[vibration] navigator.vibrate([]) fails to cancel a pre-existing instance of the processing vibration patterns algorithm

Categories

(Core :: DOM: Core & HTML, defect)

30 Branch
ARM
Other
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla33

People

(Reporter: zqzhang.cas, Assigned: smaug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release) Build ID: 20140605174243 Steps to reproduce: Navigator to http://www.w3c-test.org/vibration/cancel-with-empty-array-manual.html Click the 'Vibrate!' button. Actual results: The device vibrates for a short period of time (roughly one second) Expected results: It vibrates for a longer time (roughly five seconds, it should feel somewhat long)
OS: Windows 8 → Other
Hardware: x86_64 → ARM
Component: General → DOM
Product: Firefox for Android → Core
Version: Firefox 30 → 30 Branch
We explicitly bail out early for navigator.vibrate on empty pattern, and there's even a comment there saying this is what the spec says. In particular, the early return on empty pattern was added in bug 884935. It does look like the current spec draft has "Cancel the pre-existing instance of the processing vibration patterns algorithm, if any. " before the "If pattern is an empty list, or if the device is unable to vibrate, then return true and terminate these steps." bit. I did check, and the spec draft that was current back when bug 884935 was fixed also has the "cancel" verbiage...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(bugs)
Flags: needinfo?(andrew.quartey)
That was indeed a mistake and bug 1014581 didn't fix that case. Andrew, want to fix this, or should I?
Flags: needinfo?(bugs)
Flags: needinfo?(andrew.quartey)
Flags: needinfo?(andrew.quartey)
Assignee: nobody → bugs
(Andrew, feel free to take this if you have patch before me.)
Seems I mistake the 'Actual results' and 'Expected results'; can someone swap them? BTW, what does 'Flags: needinfo?' mean? Do you need more info from me, or something else?
I was asking needinfo from Andrew. And bugzilla comments can't, in general, be modified afterwards.
As far as I see, Hal should be able to take care of the right behavior.
Attachment #8450402 - Flags: review?(mounir)
Flags: needinfo?(andrew.quartey)
Comment on attachment 8450402 [details] [diff] [review] empty_pattern.diff Review of attachment 8450402 [details] [diff] [review]: ----------------------------------------------------------------- r=me, sorry for not spotting that. Did you check that Hal is actually doing the right thing here when the pattern is empty?
Attachment #8450402 - Flags: review?(mounir) → review+
Based on code inspection it should do the right thing.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Thanks for the fixing. The test passes on Nightly (2014-07-13).
Status: RESOLVED → VERIFIED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: