Closed Bug 746031 Opened 8 years ago Closed 8 years ago

Marionette does not support iframes within iframes correctly


(Testing :: Marionette, defect)

Not set


(Not tracked)



(Reporter: mdas, Assigned: mdas)



(1 file, 2 obsolete files)

In the content process, if we switch into a frame that is within another frame, then switch back to the main window, and finally switch back into another frame, we lose the 'win' object in the listener:
MarionetteException: win is undefined
	EM_find((void 0),[object Object],(function (id) {sendResponse({value: id});}),false)@chrome://marionette/content/marionette-elements.js:249
	findElementContent([object Object])@chrome://marionette/content/marionette-listener.js:449

I got this error in B2G by switching into a browser iframe, then switching into the 'content' iframe of the browser. Then I did switch_to_frame() to get back to the top frame, then I switched into the browser frame again.
oh, to get the error, once I switched into the browser, I had to call a function that uses the 'win' object, like find_element.
This patch includes a fix for the bug stated above, chrome support for iframe switching (this was unsupported before), and tests for chrome and content.
Attachment #620143 - Flags: review?(jgriffin)
Had to update the patch!

I took out some obsolete code, and fixed an intermittent navigation failure by adding a small wait period before checking that the page has successfully loaded.
Attachment #620143 - Attachment is obsolete: true
Attachment #620143 - Flags: review?(jgriffin)
Attachment #620307 - Flags: review?(jgriffin)
Comment on attachment 620307 [details] [diff] [review]
patch for iframe fix, chrome support, and related tests v0.2

looks good!
Attachment #620307 - Flags: review?(jgriffin) → review+
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
So I tested this on the b2g emulator and the browser, and it works & there are no regressions!
Attachment #620307 - Attachment is obsolete: true
Attachment #678544 - Flags: review?(jgriffin)
Comment on attachment 678544 [details] [diff] [review]
pass reference to parent window when switching OOP frames. patch v1.0

wrong bug.
Attachment #678544 - Flags: review?(jgriffin)
You need to log in before you can comment on or make changes to this bug.