Closed Bug 890079 Opened 11 years ago Closed 11 years ago

Homescreen grid tests failing in TBPL with: document.createTouch is not a function

Categories

(Firefox OS Graveyard :: Gaia::Homescreen, defect)

defect
Not set
normal

Tracking

(b2g18 fixed, b2g-v1.1hd fixed)

RESOLVED FIXED
Tracking Status
b2g18 --- fixed
b2g-v1.1hd --- fixed

People

(Reporter: jgriffin, Assigned: julienw)

References

Details

Attachments

(1 file)

Two homescreen grid unit tests are failing in TBPL, both with the error "document.createTouch is not a function". log: https://tbpl.mozilla.org/php/getParsedLog.php?id=24905821&tree=Cedar&full=1 14:41:20 INFO - gaia-unit-tests TEST-UNEXPECTED-FAIL | grid.js > ensurePanning > should be able to pan | document.createTouch is not a function 14:41:20 INFO - gaia-unit-tests INFO | stack trace: 14:41:20 INFO - TypeError: document.createTouch is not a function 14:41:20 INFO - at sendTouchEvent (http://homescreen.gaiamobile.org:8080/test/unit/grid_test.js:145) 14:41:20 INFO - at (anonymous) (http://homescreen.gaiamobile.org:8080/test/unit/grid_test.js:175) 14:41:20 INFO - at wrapper (http://test-agent.gaiamobile.org:8080/common/test/mocha_generators.js:62) 14:41:20 INFO - at run (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3709) 14:41:20 INFO - at runTest (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4081) 14:41:20 INFO - at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4127) 14:41:20 INFO - at next (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4007) 14:41:20 INFO - at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4016) 14:41:20 INFO - at next (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3964) 14:41:20 INFO - at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3979) 14:41:20 INFO - at done (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3700) 14:41:20 INFO - at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3712) 14:41:20 INFO - at (anonymous) (http://test-agent.gaiamobile.org:8080/common/test/mocha_generators.js:46) 14:41:20 INFO - at wrapper (http://test-agent.gaiamobile.org:8080/common/test/mocha_generators.js:73) 14:41:20 INFO - at run (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3709) 14:41:20 INFO - at next (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3973) 14:41:20 INFO - at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3984) 14:41:20 INFO - at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4932) 14:41:20 INFO - gaia-unit-tests TEST-END | ensurePanning > 14:41:20 INFO - gaia-unit-tests TEST-START | onDragStart > 14:41:20 INFO - gaia-unit-tests TEST-START | ensurePanning > 14:41:20 INFO - gaia-unit-tests TEST-UNEXPECTED-FAIL | grid.js > onDragStart > ensurePanning > should be able to pan | document.createTouch is not a function 14:41:20 INFO - gaia-unit-tests INFO | stack trace: 14:41:20 INFO - TypeError: document.createTouch is not a function 14:41:20 INFO - at sendTouchEvent (http://homescreen.gaiamobile.org:8080/test/unit/grid_test.js:145) 14:41:20 INFO - at (anonymous) (http://homescreen.gaiamobile.org:8080/test/unit/grid_test.js:175) 14:41:20 INFO - at wrapper (http://test-agent.gaiamobile.org:8080/common/test/mocha_generators.js:62) 14:41:20 INFO - at run (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3709) 14:41:20 INFO - at runTest (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4081) 14:41:20 INFO - at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4127) 14:41:20 INFO - at next (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4007) 14:41:20 INFO - at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4016) 14:41:20 INFO - at next (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3964) 14:41:20 INFO - at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3979) 14:41:20 INFO - at done (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3700) 14:41:20 INFO - at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3712) 14:41:20 INFO - at (anonymous) (http://test-agent.gaiamobile.org:8080/common/test/mocha_generators.js:46) 14:41:20 INFO - at wrapper (http://test-agent.gaiamobile.org:8080/common/test/mocha_generators.js:73) 14:41:20 INFO - at run (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3709) 14:41:20 INFO - at next (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3973) 14:41:20 INFO - at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3984) 14:41:20 INFO - at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4932)
Alexandre, is it possible that document.createTouch doesn't exist on a non-touch enabled b2g desktop ? FTR this works correctly in a normal Firefox nightly. I think this happens when running with a DESKTOP=0 profile.
Flags: needinfo?(poirot.alex)
(In reply to Julien Wajsberg [:julienw] from comment #1) > Alexandre, is it possible that document.createTouch doesn't exist on a > non-touch enabled b2g desktop ? FTR this works correctly in a normal Firefox > nightly. In nightly, but with the gaia's DESKTOP=1 profile, right? > > I think this happens when running with a DESKTOP=0 profile. Then, we should consider moving this pref: https://github.com/mozilla-b2g/gaia/blob/master/build/preferences.js#L56 to b2g prefs, or in the meantime set it if we either have DEBUG or DESKTOP. If we move it to b2g, we may have to also move the touch helper, as I think that toggling this pref breaks the user experience: https://github.com/mozilla-b2g/gaia/blob/master/tools/extensions/desktop-helper/content/touch-events.js
Flags: needinfo?(poirot.alex)
At one point I moved from using mouse events to touch events (because the touch helper broke them at the time ;) ), I can probably bring back the mouse events along with the touch events. Seems easier than changing the pref.
Assignee: nobody → felash
Attached patch patch v1 (deleted) — Splinter Review
Turns out we were already sending mouse events, so this patch only disabled touch events when document.createTouch is missing. see also pull request at https://github.com/mozilla-b2g/gaia/pull/10793
Attachment #771253 - Flags: review?(crdlc)
Comment on attachment 771253 [details] [diff] [review] patch v1 Please read my comment on Github or in the patch, thanks
Attachment #771253 - Flags: review?(crdlc) → review+
fixed the comments, and landed: master: 3f51aa0913ad86b50abd97d2b25e07b59677708c
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
a=npotb v1-train: 7a47eefcb86371aa0916b506c126a88f81e9c157 thanks a lot Cristian !
v1.1.0hd: 7a47eefcb86371aa0916b506c126a88f81e9c157
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: