(CopyPasteTest) Test case for selection utility bubble hide/show when scroll start/end

RESOLVED FIXED

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jeremychen, Assigned: jeremychen)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 4 obsolete attachments)

Version: 37 Branch → unspecified
Assignee: nobody → jeremychen
Created attachment 8573176 [details] [diff] [review]
Gaia JS integration test wip

In this bug, I try to produce a scrolling scenario and get the visibility of utility bubble before/after scroll end. I've written a draft wip and met some problems. 

Initially, I want to use "action.press().moveByOffset().perform();" for the scrolling scenario, but it failed to work on b2g desktop client. 

Then, I tried "action.press().move().perform();" instead. It worked on b2g desktop. But, on b2g desktop, it will fire scroll end automatically whenever we stop scrolling, even we're not yet called "action.release().perform()". Another issue on b2g desktop is that the utility bubble is always shown during the scrolling. 

So, I moved on to run the wip on device. However, the wip, which is able to produce a scrolling scenario on b2g desktop, is failed to do that on device.

George, could you take a look and give me some feedback?
Flags: needinfo?(gduan)
George,

It seems that I wrongly use the function moveByOffset by sending the wrong args. Now, I can use following code to make scroll happen both on b2g desktop and device.

action.press(fakeTextselectionApp.BugContent, 100, 150).moveByOffset(0, -50).perform();

But, it still fires touchend automatically even though action.release().perform is not called yet. Kind of stuck here. Any idea?
Flags: needinfo?(gduan)
Flags: needinfo?(gduan)
Hey Jeremy,
sorry, I have no idea for that, basically js marionette should behave the same as py marionette. 
could you update your patch as comment 2? How do I know if touchend is fired or not? I would like to verify it and find someone to deeply look into marionette.
Flags: needinfo?(gduan) → needinfo?(jeremychen)
Created attachment 8574535 [details] [diff] [review]
Gaia JS integration test wip

In this patch, I can make scroll happen by moveByOffset() on b2g desktop.

For the automatically sending touchend event issue, I kind of figure it out by discussing with Morris and TYLin. During scrolling, since we don't know when a scroll is ended or not, there is a timeout interval (seems =300ms) for APZ to send scrollend event automatically.

STR:
1. Run b2g desktop
2. Open "UI test" app and get into "copy test API"
3. Select some text
4. Start scroll and keep mouse down on screen.

Expect:
Bubble is hidden.

Actual:
Bubble is shown.
Attachment #8573176 - Attachment is obsolete: true
Flags: needinfo?(jeremychen)
(In reply to George Duan [:gduan] [:喬智] from comment #3)
> Hey Jeremy,
> sorry, I have no idea for that, basically js marionette should behave the
> same as py marionette. 
> could you update your patch as comment 2? How do I know if touchend is fired
> or not? I would like to verify it and find someone to deeply look into
> marionette.

I kind of figure out why the touchend is fired automatically. It turns out that since APZ is not enabled on b2g desktop yet (see bug 1131237), we handle scroll event and set caret to invisible in another code flow. (https://dxr.mozilla.org/mozilla-central/source/layout/base/SelectionCarets.cpp?from=SelectionCarets.cpp#1200) Accordingly, I think this may not be a bug. 

After discussed with Morris and George, I'm going to work on another patch. Thanks to George's work in Bug 1141406, it won't take long.
Created attachment 8578571 [details] [diff] [review]
Gaia JS integration test wip (v2)

Depend on Bug1141406. I'll send pull request after patch for Bug1141406 landed.
Attachment #8574535 - Attachment is obsolete: true
Depends on: 1141406
Created attachment 8582908 [details] [review]
[gaia] chenpighead:Bug1139803 > mozilla-b2g:master
Attachment #8578571 - Attachment is obsolete: true
Comment on attachment 8582908 [details] [review]
[gaia] chenpighead:Bug1139803 > mozilla-b2g:master

Hi George,
I use the patch in Bug 1141406 to write this test. Could you check this patch for JS integration test?
Attachment #8582908 - Flags: review?(gduan)
Comment on attachment 8582908 [details] [review]
[gaia] chenpighead:Bug1139803 > mozilla-b2g:master

r=gduan
Attachment #8582908 - Flags: review?(gduan) → review+
Reverted as bug 1141406 was backed out and this has a dependency on that. Otherwise we get errors like: https://treeherder.mozilla.org/logviewer.html#?job_id=1575958&repo=b2g-inbound

https://github.com/mozilla-b2g/gaia/commit/508b8d48fb5ecf08bf0e5b4fef42bc48b770e7f2
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Created attachment 8585924 [details] [review]
[gaia] chenpighead:Bug1139803 > mozilla-b2g:master
Attachment #8585924 - Flags: review?(gduan)
Attachment #8582908 - Attachment is obsolete: true
Comment on attachment 8585924 [details] [review]
[gaia] chenpighead:Bug1139803 > mozilla-b2g:master

plz land it once treeherder is green! r=gduan
Attachment #8585924 - Flags: review?(gduan) → review+
Keywords: checkin-needed

Updated

4 years ago
Keywords: checkin-needed
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.
Hi George, can you help check-in this patch? I've no idea why Autolander is not working...
Flags: needinfo?(gduan)
Keywords: checkin-needed

Updated

4 years ago
Keywords: checkin-needed
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.
Attachment #8582908 - Attachment is obsolete: false
Attachment #8582908 - Attachment is obsolete: true
Sure, the test result looks sweet,
master: https://github.com/mozilla-b2g/gaia/commit/4bb3a933bd805e8df1e11827cb247754c3565b0b
Status: REOPENED → RESOLVED
Last Resolved: 4 years ago4 years ago
Flags: needinfo?(gduan)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.