Closed Bug 1159601 Opened 8 years ago Closed 8 years ago

Permaorange apps/system/test/marionette/text_selection_test.js | Text selection > without lockscreen check functionality copy and paste across all trees independent of merges


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

Not set


(Not tracked)



(Reporter: chenpighead, Assigned: chenpighead)




(1 file)

+++ This bug was initially created as a clone of Bug #1157092 +++

Started on mozilla-central on a merge of a green cset from mozilla-inbound on top of a green merge from fx-team. Started on b2g-inbound on the merge from mozilla-central. At that point, you were looking like a poor innocent victim of bustage from some evil upstream Gecko hacker.

But, started on mozilla-inbound two csets below the merge from mozilla-central, which is on something which hadn't been merged to mozilla-central, and retriggers on csets below where it started are coming back failing. At this point, you look like your tests have external dependencies not pinned in tree, which is a major party foul and a violation of the visibility requirements, or an invisible change in the TaskCluster infra where they run broke you. Either way, Gij-24 is hidden on all trunk trees.
I dug a little deeper and found the root cause. It turns out that patches for Bug 1021499 enlarge selection carets' touch area, and the original test case run on Linux may fail. 

It can be seen from [1], we press center of input element to trigger longpress effect. A moveByOffset(0, 0) is used here to set a flag in order to prevent the context_menu popup. Since caret is enlarged, press center is now can press on the right caret. Then, moveByOffset(0, 0) will trigger an effect like flick to move the right caret to the center position of input element, which causes the selection range change. Due to the resolution issue i think, this can be reproduce only on Linux, not on Mac.

We can't modify the implementation of longpress, because we need moveByOffset(0,0) to prevent context_menu popup. However, whenever we have two successive calls of longpress, the second call of longpress has possibility to change the selection range selected by the first call of longpress. So, we need to avoid two successive calls of longpress.
Attachment #8599145 - Flags: review?(gduan)
Would you consider to fix other cases? such as bug 1157092, there're also two successive calls of longpress. I'm afraid your testvalue -> test would cause intermittent failure again. And please try to relaunch the test since all Gip fails.
Flags: needinfo?(jeremychen)
Comment on attachment 8599145 [details] [review]
[gaia] chenpighead:bug1159601 > mozilla-b2g:master

I saw you already removed longPress in 'copy and paste' test. Thanks.
Attachment #8599145 - Flags: review?(gduan) → review+
I checked text_selection_test.js and there's no more "two successive calls of longpress" or "calling copy right after longpress" for now. Still wait for positive result for gaia-ui-test.
Flags: needinfo?(jeremychen)
Autolander could not locate a review from a user within the suggested reviewer list. Either the patch author or the reviewer should be in the suggested reviewer list.
Will manually land this for now with my approval. Thanks for the patch.

In master:
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.