WebDriver:SwitchToWindow should switch back to the top-level browsing context
Categories
(Remote Protocol :: Marionette, defect, P1)
Tracking
(firefox84 fixed)
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: juangj, Assigned: whimboo)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [marionette-fission-mvp][simple], [wptsync upstream])
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.89 Safari/537.36 Steps to reproduce: When "Switch to Window" is called with the handle of the current top-level browsing context (i.e., "switching" to the current window), the current browsing context should be reset to be equal to the top level. == WebDriver (Python) code == def testFrameSwitching(self): self.driver.get('http://localhost/frames.html') window = self.driver.current_window_handle self.assertEqual('outside', self.driver.find_element_by_id('x').text, 'Should start at top level after navigation') iframe = self.driver.find_element_by_tag_name('iframe') self.driver.switch_to.frame(iframe) self.assertEqual('inside', self.driver.find_element_by_id('x').text, 'Should switch to <iframe>') self.driver.switch_to.window(window) self.assertEqual('outside', self.driver.find_element_by_id('x').text, 'Should reset to top level after switching windows') == frames.html == <html> <body> <div id="x">outside</div> <iframe src="frames1.html" /> </body> </html> == frames1.html == <div id="x">inside</div> Actual results: In Marionette, the last assertion fails; it still considers the iframe to be the current context, instead of the top-level context associated with the window handle. Expected results: After switching windows, further commands should go to the top-level context.
Reporter | ||
Updated•8 years ago
|
Updated•7 years ago
|
Comment 1•6 years ago
|
||
Blocks conformance.
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
First we should make switch to window free of the race condition which I will cover soon on bug 1335085.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
Actually this failure can no longer seen with the actor implementation given that the driver directly calls into the right instance. But for the framescript we do not update the currently selected frame yet. This is easy to fix. Patch attached.
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fac1844bb15b [marionette] WebDriver:SwitchToWindow should switch back to the top-level browsing context. r=marionette-reviewers,webdriver-reviewers,maja_zf
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/26288 for changes under testing/web-platform/tests
Comment 8•4 years ago
|
||
bugherder |
Assignee | ||
Comment 9•4 years ago
|
||
(In reply to Web Platform Test Sync Bot (Matrix: #interop:mozilla.org) from comment #7)
Created web-platform-tests PR
https://github.com/web-platform-tests/wpt/pull/26288 for changes under
testing/web-platform/tests
The requirements sections on the PR still mentions that the patch hasn't been landed on mozilla-central yet. Does it need some kind of trigger?
Upstream PR merged by moz-wptsync-bot
Assignee | ||
Comment 11•4 years ago
|
||
Maybe that was just a little delay. Merge happened just now.
Updated•1 year ago
|
Description
•