Closed Bug 810517 Opened 7 years ago Closed 7 years ago
Error: listener Window is null" when running test _browser .py twice in a row
According to Zac, https://github.com/zacc/gaia-ui-tests/blob/browser_smoke_test/gaiatest/tests/test_browser.py fails when run twice in a row. Needs investigation.
Summary: test_browser.py fails when run twice in a row → "TypeError: listenerWindow is null" when running test_browser.py twice in a row
The problem is here: http://mxr.mozilla.org/mozilla-central/source/testing/marionette/marionette-actors.js#1654 Child processes and the parent process maintain completely independent lists of windows, from which outerWindowID comes. When a register message is received from an OOP frame, the outerWindowID comes from the child processes' window list...the same outerWindowID in the parent process may not exist, or may point to some random window.
The solution is just to add another check that listenerWindow is valid before attempting to access it's href. Unfortunately, I don't know of a better way to determine whether the frame registration is coming from an OOP process, but it would be nice if there were.
Attachment #680739 - Flags: review?(mdas)
Actually, I wonder if we can use window.parent to determine this?
(In reply to Jonathan Griffin (:jgriffin) from comment #4) > Actually, I wonder if we can use window.parent to determine this? No, we can't; that trick only works *from* the OOP process, not the parent one.
Comment on attachment 680739 [details] [diff] [review] Check for valid listenerWindow, Review of attachment 680739 [details] [diff] [review]: ----------------------------------------------------------------- Good catch! I'd add a comment about the outerWindowID mismatch if you can, to explain why we may not find the listenerWindow.
Attachment #680739 - Flags: review?(mdas) → review+
pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=0eb0be2c7d95
Attachment #680739 - Attachment is obsolete: true
Comment on attachment 680866 [details] [diff] [review] Check for valid listenerWindow, Review comments addressed; carrying r+ forward.
Attachment #680866 - Flags: review+
Also pushed to ash: https://tbpl.mozilla.org/?tree=Ash&rev=4edf1ed07d1e
re-pushed to try, since my original didn't seem to trigger tests on the emulator: https://tbpl.mozilla.org/?tree=Try&rev=6066eca91645
Assignee: nobody → jgriffin
ash looks ok, pushing to aurora: https://hg.mozilla.org/releases/mozilla-aurora/rev/484b0596984a
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.