Closed
Bug 1212811
Opened 9 years ago
Closed 9 years ago
TEST-UNEXPECTED-FAIL | test_windows.py TestBaseWindow.test_switch_to_and_focus | AssertionError: False is not true
Categories
(Testing :: Firefox UI Tests, defect)
Tracking
(firefox41 wontfix, firefox42 wontfix, firefox43 wontfix, firefox44 wontfix, firefox45 wontfix, firefox46 fixed, firefox47 fixed, firefox48 fixed, firefox-esr45 affected)
People
(Reporter: whimboo, Assigned: whimboo)
References
Details
(Keywords: intermittent-failure)
Attachments
(1 file)
Traceback (most recent call last):
File "/home/mozauto/jenkins/workspace/mozilla-central_functional/venv/local/lib/python2.7/site-packages/marionette/marionette_test.py", line 296, in run
testMethod()
File "/home/mozauto/jenkins/workspace/mozilla-central_functional/venv/lib/python2.7/site-packages/firefox_puppeteer/tests/test_windows.py", line 153, in test_switch_to_and_focus
self.assertTrue(win2.focused)
AssertionError: False is not true
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Updated•9 years ago
|
status-firefox41:
--- → affected
status-firefox42:
--- → affected
status-firefox43:
--- → affected
status-firefox44:
affected → ---
OS: Unspecified → Linux
Hardware: Unspecified → All
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Updated•9 years ago
|
status-firefox44:
--- → affected
Assignee | ||
Comment 3•9 years ago
|
||
We had a couple of those reports for the latest beta tests. I have checked the affected Linux machines and each of those had a crash report dialog open for the Keyboard input methods application: /usr/bin/ibus-daemon.
I retriggered the builds but looks like nearly all of them are still failing. So that dialog is not the reason.
status-firefox45:
--- → affected
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Updated•9 years ago
|
Product: Mozilla QA → Testing
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 8•9 years ago
|
||
Ok, so the problem here could be in the `focused_chrome_window_handle()` method:
https://dxr.mozilla.org/mozilla-central/source/testing/puppeteer/firefox/firefox_puppeteer/ui/windows.py#42
In some cases - I assume on slower or highly utilized machines - the focus is not set immediately to the new window. Instead it takes a moment and exactly when performing the focus change no window has the focus. The above mentioned method would return `null` then. As result the failure in the BaseWindow test would happen.
Maybe the best option here would be to safe-guard `focused_chrome_window_handle()` and only return if a valid handle has been found or a timeout happens.
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Assignee | ||
Comment 9•9 years ago
|
||
Ok, I was able to reproduce this problem on an affected Linux machine:
** Focusing of handle: 3
** focused_chrome_window_handle: None
** focused_chrome_window_handle: 15
We should indeed safe-guard the `focused_chrome_window_handle()` method.
Assignee | ||
Comment 10•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/38455/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/38455/
Attachment #8727357 -
Flags: review?(mjzffr)
Assignee | ||
Comment 11•9 years ago
|
||
Comment on attachment 8727357 [details]
MozReview Request: Bug 1212811 - focused_chrome_window_handle() should wait until focus transition has been finished. r=maja_zf
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38455/diff/1-2/
Assignee | ||
Comment 12•9 years ago
|
||
Comment on attachment 8727357 [details]
MozReview Request: Bug 1212811 - focused_chrome_window_handle() should wait until focus transition has been finished. r=maja_zf
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38455/diff/2-3/
Comment on attachment 8727357 [details]
MozReview Request: Bug 1212811 - focused_chrome_window_handle() should wait until focus transition has been finished. r=maja_zf
https://reviewboard.mozilla.org/r/38455/#review35071
r+wc -- I have a small doubt, but otherwise this looks good.
::: testing/puppeteer/firefox/firefox_puppeteer/ui/windows.py:64
(Diff revision 3)
> + return Wait(self.marionette).until(get_active_handle,
Can `get_active_handle` ever legitimately return 0? In that case, wouldn't `until` fail due to 0 being falsey?
Attachment #8727357 -
Flags: review?(mjzffr) → review+
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 14•9 years ago
|
||
(In reply to Maja Frydrychowicz (:maja_zf) from comment #13)
> Can `get_active_handle` ever legitimately return 0? In that case, wouldn't
> `until` fail due to 0 being falsey?
No, we do not have outer window ids of 0. The first visible chrome window which is the browser window has the id 3.
Comment 15•9 years ago
|
||
Comment 16•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Assignee | ||
Comment 17•9 years ago
|
||
No test failure for this particular issue anymore the last days. Please get this patch landed on aurora and beta. It's a test-only change. Thanks.
Whiteboard: [checkin-needed-aurora][checkin-needed-beta]
Comment 18•9 years ago
|
||
bugherder uplift |
Whiteboard: [checkin-needed-aurora][checkin-needed-beta] → [checkin-needed-beta]
Comment 19•9 years ago
|
||
bugherder uplift |
Updated•9 years ago
|
Whiteboard: [checkin-needed-beta]
You need to log in
before you can comment on or make changes to this bug.
Description
•