Intermittent test_window_handles_chrome.py TestWindowHandles.test_window_handles_after_closing_original_tab | AssertionError: u'about:blank' != 'http://127.0.0.1:49337/empty.html'

RESOLVED FIXED in Firefox -esr52

Status

Testing
Marionette
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: Treeherder Bug Filer, Assigned: whimboo)

Tracking

({intermittent-failure})

Version 3
mozilla55
intermittent-failure
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox-esr52 fixed, firefox54 fixed, firefox55 fixed)

Details

User Story

To get started on this bug for Marionette please consult the documentation for new contributors:

https://wiki.mozilla.org/User:Mjzffr/New_Contributors

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(2 attachments)

Created attachment 8872425 [details]
screenshot.png

09:49:27    ERROR -  TEST-UNEXPECTED-FAIL | test_window_handles_chrome.py TestWindowHandles.test_window_handles_after_closing_original_tab | AssertionError: u'about:blank' != 'http://127.0.0.1:49337/empty.html'
09:49:27     INFO -  Traceback (most recent call last):
09:49:27     INFO -    File "C:\slave\test\build\venv\lib\site-packages\marionette_harness\marionette_test\testcases.py", line 166, in run
09:49:27     INFO -      testMethod()
09:49:27     INFO -    File "C:\slave\test\build\tests\marionette\tests\testing\marionette\harness\marionette_harness\tests\unit\test_window_handles_chrome.py", line 193, in test_window_handles_after_closing_original_tab
09:49:27     INFO -      self.assertEqual(self.marionette.get_url(), self.empty_page)

The screenshot shows that we are still loading the page. So we miss to wait for the empty page being loaded after switching to the newly opened tab:

https://dxr.mozilla.org/mozilla-central/rev/4541134e973a6bd5e667a603e844854c8e5361da/testing/marionette/harness/marionette_harness/tests/unit/test_window_handles_chrome.py#180-193

So in line 193 we would need a call to `Wait().until()` instead of `assertEqual` with the timeout being the page load timeout. An example can be found in the test file `test_modal_dialogs.py` which is located in the same directory.

Please note that other tests in this file might also be affected by this race condition.
Mentor: hskupin
User Story: (updated)
Keywords: good-first-bug
Whiteboard: [lang=py]
I will pick this up myself given that we have a huge increase in those failures now.
Assignee: nobody → hskupin
Mentor: hskupin
Status: NEW → ASSIGNED
Keywords: good-first-bug
Whiteboard: [lang=py]
Comment hidden (mozreview-request)
Attachment #8872560 - Flags: review?(ato)

Comment 4

a year ago
mozreview-review
Comment on attachment 8872560 [details]
Bug 1368526 - Wait for the page to be loaded in a newly opened tab/window.

https://reviewboard.mozilla.org/r/144090/#review147892

::: commit-message-34ac1:1
(Diff revision 1)
> +Bug 1368526 - Ensure to wait for the page being loaded in a newly opened tab/window.

s/Ensure to wait for the page being loaded/Wait for the page to load/
Attachment #8872560 - Flags: review?(ato) → review+
Comment hidden (mozreview-request)

Comment 6

a year ago
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4c6b36ee9f17
Wait for the page to be loaded in a newly opened tab/window. r=ato

Comment 7

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/4c6b36ee9f17
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
status-firefox55: --- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
The tests were introduced via bug 1323185, and got uplifted to 52. So I would request an uplift of this fix to both beta and esr52.
Blocks: 1323185
status-firefox54: --- → affected
status-firefox-esr52: --- → affected
Whiteboard: [checkin-needed-beta][checkin-needed-esr52]
Removing uplift request due to a possible regression. More information to come.
Whiteboard: [checkin-needed-beta][checkin-needed-esr52]
Depends on: 1369083
After some more investigation I doubt that this change has caused bug 1369083. But for safety lets get this landed on beta only for now. If it's fine I will request uplift for esr52 afterward.
Whiteboard: [checkin-needed-beta]
Needs rebasing for Beta.
Flags: needinfo?(hskupin)
Whiteboard: [checkin-needed-beta]
The backport patch can be found as commit 4ea830827bf0 in the following try build:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=76ca873907d738355466ef83b68951fb1d9ec1ca
Flags: needinfo?(hskupin)
Whiteboard: [checkin-needed-beta]
15 failures in 820 pushes (0.018 failures/push) were associated with this bug in the last 7 days.   

Repository breakdown:
* autoland: 12
* mozilla-inbound: 2
* mozilla-central: 1

Platform breakdown:
* linux32: 6
* linux64: 4
* windows8-64: 2
* windows7-32-vm: 2
* osx-10-10: 1

For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1368526&startday=2017-05-29&endday=2017-06-04&tree=all
https://hg.mozilla.org/releases/mozilla-beta/rev/09f9827c36d6
status-firefox54: affected → fixed
Whiteboard: [checkin-needed-beta]
Beta looks fine. So please also uplift this test-only patch to esr52. Thanks.
Whiteboard: [checkin-needed-esr52]

Comment 16

a year ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-esr52/rev/eeb30d723265
status-firefox-esr52: affected → fixed
Whiteboard: [checkin-needed-esr52]
You need to log in before you can comment on or make changes to this bug.