Closed Bug 1209841 Opened 9 years ago Closed 9 years ago

Send synthesized long tap event in AccessibleCaret marionette test

Categories

(Core :: DOM: Selection, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

(Blocks 1 open bug)

Details

Attachments

(7 files)

In marionette test, long tap to select is triggered by a timer in AccessibleCaret, which is not the same as being triggered by APZ eMouseLongTap events on the device. To test the code path for handling the eMouseLongTap, I think we can use nsIDOMWindowUtils to synthesize fake long tap events in marionette test and send them to gecko.
Blocks: 1207934
Bug 1209841 - Merge test_selectioncarets2.py into test_selectioncarets.py. r=automatedtester

* Eliminate the duplicated code for setting the preferences.
* Rename open_test_html() in test_selectioncarets2.py to
  open_test_html_multirange() to avoid name collision.
Attachment #8667819 - Flags: review?(dburns)
Bug 1209841 - Delete test_selectioncarets2.py. r=automatedtester
Attachment #8667820 - Flags: review?(dburns)
Bug 1209841 - Improve move_caret_by_offset() in selection.py. r=automatedtester

* Incorporate the for-loop in python into javascript so that we only
  need to call execute_script() once.
* Add documentation for parameters.
Attachment #8667821 - Flags: review?(dburns)
Bug 1209841 - Simplify functions related to select word. r=automatedtester

* Use word_location() and long_press_on_location() to implement
  long_press_on_word.
* Use long_press_on_location() instead of
  long_press_without_contextmenu().
Attachment #8667822 - Flags: review?(dburns)
Bug 1209841 - Strip prefix underscore in to_unix_line_ending(). r=automatedtester
Attachment #8667823 - Flags: review?(dburns)
Bug 1209841 - Support mouse long tap in SendMouseEvent(). r=smaug

This is for synthesizing mouse long tap in marionette test for
AccessibleCaret.
Attachment #8667824 - Flags: review?(bugs)
Bug 1209841 - Send synthesized mouse long tap to gecko. r=automatedtester

Instead of using long_press_without_contextmenu() with built-in long tap
injector in AccessibleCaretEventHub to select a word, we can use
DOMWindowUtis to send synthesized mouse long tap events to gecko. This
triggers the code path which is closer to the real events fired by APZ
on B2G.

This change also makes marionette tests cover the focus-changing code by
long tap in AccessibleCaretManager. This is subtle but significant since
it's possible to write focus changing tests via long tap now.
Attachment #8667825 - Flags: review?(dburns)
Attachment #8667824 - Flags: review?(bugs) → review+
Comment on attachment 8667819 [details]
MozReview Request: Bug 1209841 - Merge test_selectioncarets2.py into test_selectioncarets.py. r=automatedtester

https://reviewboard.mozilla.org/r/20825/#review18765
Attachment #8667819 - Flags: review?(dburns) → review+
Comment on attachment 8667820 [details]
MozReview Request: Bug 1209841 - Delete test_selectioncarets2.py. r=automatedtester

https://reviewboard.mozilla.org/r/20827/#review18767
Attachment #8667820 - Flags: review?(dburns) → review+
Attachment #8667821 - Flags: review?(dburns) → review+
Comment on attachment 8667821 [details]
MozReview Request: Bug 1209841 - Improve move_caret_by_offset() in selection.py. r=automatedtester

https://reviewboard.mozilla.org/r/20829/#review18769
Attachment #8667822 - Flags: review?(dburns) → review+
Comment on attachment 8667822 [details]
MozReview Request: Bug 1209841 - Simplify functions related to select word. r=automatedtester

https://reviewboard.mozilla.org/r/20831/#review18771
Comment on attachment 8667823 [details]
MozReview Request: Bug 1209841 - Strip prefix underscore in to_unix_line_ending(). r=automatedtester

https://reviewboard.mozilla.org/r/20833/#review18773
Attachment #8667823 - Flags: review?(dburns) → review+
Comment on attachment 8667824 [details]
MozReview Request: Bug 1209841 - Support mouse long tap in SendMouseEvent(). r=smaug

https://reviewboard.mozilla.org/r/20835/#review18775
Attachment #8667824 - Flags: review+
Comment on attachment 8667824 [details]
MozReview Request: Bug 1209841 - Support mouse long tap in SendMouseEvent(). r=smaug

https://reviewboard.mozilla.org/r/20835/#review18777
Attachment #8667824 - Flags: review+
Attachment #8667825 - Flags: review?(dburns) → review+
Comment on attachment 8667825 [details]
MozReview Request: Bug 1209841 - Send synthesized mouse long tap to gecko. r=automatedtester

https://reviewboard.mozilla.org/r/20837/#review18779
Blocks: 1210315
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: