Closed
Bug 810517
Opened 12 years ago
Closed 12 years ago
"TypeError: listenerWindow is null" when running test_browser.py twice in a row
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla19
People
(Reporter: jgriffin, Assigned: jgriffin)
Details
Attachments
(1 file, 1 obsolete file)
1.77 KB,
patch
|
jgriffin
:
review+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Comment 1•12 years ago
|
||
The symptoms are thus:
The test runs ok the first time. On the second run, it launches the browser and successfully navigates the browser to mozilla.org. When it tries to switch into the browser's iframe (https://github.com/zacc/gaia-ui-tests/blob/master/gaiatest/tests/test_browser.py#L49), an error occurs and the call to switch_to_frame dies:
E/GeckoConsole( 106): [JavaScript Error: "TypeError: listenerWindow is null" {file: "chrome://marionette/content/marionette-actors.js" line: 1658}]
Assignee | ||
Updated•12 years ago
|
Summary: test_browser.py fails when run twice in a row → "TypeError: listenerWindow is null" when running test_browser.py twice in a row
Assignee | ||
Comment 2•12 years ago
|
||
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.
Assignee | ||
Comment 3•12 years ago
|
||
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)
Assignee | ||
Comment 4•12 years ago
|
||
Actually, I wonder if we can use window.parent to determine this?
Assignee | ||
Comment 5•12 years ago
|
||
(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 6•12 years ago
|
||
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+
Assignee | ||
Comment 7•12 years ago
|
||
pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=0eb0be2c7d95
Assignee | ||
Comment 8•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Attachment #680739 -
Attachment is obsolete: true
Assignee | ||
Comment 9•12 years ago
|
||
Comment on attachment 680866 [details] [diff] [review]
Check for valid listenerWindow,
Review comments addressed; carrying r+ forward.
Attachment #680866 -
Flags: review+
Assignee | ||
Comment 10•12 years ago
|
||
Also pushed to ash: https://tbpl.mozilla.org/?tree=Ash&rev=4edf1ed07d1e
Assignee | ||
Comment 11•12 years ago
|
||
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 | ||
Comment 12•12 years ago
|
||
Assignee: nobody → jgriffin
Assignee | ||
Comment 13•12 years ago
|
||
ash looks ok, pushing to aurora: https://hg.mozilla.org/releases/mozilla-aurora/rev/484b0596984a
Comment 14•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Updated•2 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•