Add a check that the private browser window is ready as a workaround for bug 1204831

RESOLVED FIXED

Status

Firefox OS
Gaia::UI Tests
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: Martijn Wargers (zombie), Assigned: Martijn Wargers (zombie))

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Follow-up from bug 1204831.
There is currently a failure in here:
http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/tests/functional/browser/test_browser_private_navigation.py#22
22         browser = private_window.go_to_url(self.test_url)

This taps on the url bar in the private browser window, then wants to type in the url.
The problem currently is that the focus get suddenly removed from the url bar, because the private browser window is loaded very slowly, that's bug 1204831.

But we could guard for this by using the wait_for_page_to_load method in the test.

This is just a workaround for the issue in bug 1204831, because the url bar should not just loose focus while a user tries to type in something in the url bar.
(Assignee)

Updated

3 years ago
Blocks: 1204831
Summary: Add a wait_for_page_to_load method for a private browser window → Add a wait_for_page_to_load method for a private browser window as a workaround for bug 1204831
(Assignee)

Comment 1

3 years ago
Scratch that, it's better to check that the private browser window is ready to use when try to access the python object.
Summary: Add a wait_for_page_to_load method for a private browser window as a workaround for bug 1204831 → Add a check that the private browser window is ready as a workaround for bug 1204831
Created attachment 8662355 [details] [review]
[gaia] mwargers:1205626 > mozilla-b2g:master
(Assignee)

Comment 3

3 years ago
Comment on attachment 8662355 [details] [review]
[gaia] mwargers:1205626 > mozilla-b2g:master

Yes, that fixes the failure. I repeated 5 times on my Flame device and they all passed.
Note that this workaround should be removed when bug 1204831 gets fixed, because a user should be able to focus the url bar and start typing as soon as the private browser window is there.
Attachment #8662355 - Flags: review?(npark)
Attachment #8662355 - Flags: review?(jdorlus)
Comment on attachment 8662355 [details] [review]
[gaia] mwargers:1205626 > mozilla-b2g:master

Looks like a simple workaround.  So I guess it always eventually shifts the focus back to the private browser instance once it's ready?
Attachment #8662355 - Flags: review?(npark) → review+
(Assignee)

Comment 5

3 years ago
Yes, the focus is done in the go_to_url method which is done after the init of PrivateWindow.
Comment on attachment 8662355 [details] [review]
[gaia] mwargers:1205626 > mozilla-b2g:master

10x repeat passing on device.
Attachment #8662355 - Flags: review?(jdorlus) → review+
(Assignee)

Comment 7

3 years ago
Merged: https://github.com/mozilla-b2g/gaia/commit/750334a998ffc4b2d29fbd04e394d8cdd14fd29c
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.