With Fission enabled "WebDriver:SwitchToFrame" raises: SecurityError: Permission denied to access property "frameElement" on cross-origin object
Categories
(Remote Protocol :: Marionette, defect, P3)
Tracking
(Fission Milestone:M7, firefox84 fixed)
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
References
(Blocks 1 open bug)
Details
(Whiteboard: [marionette-fission-mvp])
As noticed on bug 1580692 the WebDriver:SwitchToFrame
command is broken under Fission. The following error gets raised:
JavaScript error: chrome://marionette/content/listener.js, line 1542: SecurityError: Permission denied to access property "frameElement" on cross-origin object
Here the source code:
It means we cannot directly access frameElement
here.
I assume this would need actors in each frame, and to do the comparison in the parent process?
Mike, if you could give a hint that would be great. Thanks!
Assignee | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Yeesh, sorry for the delay getting back to this. My needinfo stack is too high. :(
So yes, with Fission enabled, you'll not be able to access properties like the frameElement
on third-party iframes. I actually think that might be true even today without Fission - evaluating window.frames[1].frameElement
from the console at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe throws the same exception.
What you might be able to do is get access to the BrowsingContext of the frame you're interested in, and then send a message to that BrowsingContext's parent. That parent should be able to access the frameElement by accessing .embedderElement
on it, which should return the <iframe>
, assuming that that DOM node exists in the process running that.
Comment 2•5 years ago
|
||
Tentatively moving all bugs whose summaries mention "Fission" (or other Fission-related keywords) but are not assigned to a Fission Milestone to the "?" triage milestone.
This will generate a lot of bugmail, so you can filter your bugmail for the following UUID and delete them en masse:
0ee3c76a-bc79-4eb2-8d12-05dc0b68e732
Comment 3•5 years ago
|
||
Tracking for Fission milestone M6 because we want to be able to run Marionette tests with Fission before enabling in Nightly.
Assignee | ||
Comment 4•5 years ago
|
||
Looks like we have to replace outerWindowId with browsingContext.id first, before we can work on this bug.
Note that the wdspec cross-origin tests for switchToFrame are the only tests I could find that exercise WebDriver/Marionette cross-origin behaviour.
Assignee | ||
Comment 8•4 years ago
|
||
SwitchToFrame has been slightly refactored. So the affecting line here is:
Assignee | ||
Comment 9•4 years ago
|
||
This will be fixed with bug 1654628 when the command gets executed with the JSWindowActor implementation. But even then it will be put behind the preference marionette.actors.enabled
for the time being. Once the implementation is stable, it will be enabled by default.
Assignee | ||
Comment 10•4 years ago
|
||
The remaining warning is all related to page navigation and should be fixed by bug 1612831.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 11•4 years ago
|
||
So to get rid of this it finally needs bug 1660168, which is enabling the usage of the JSWindowActor by default for Fission builds.
Assignee | ||
Comment 13•4 years ago
|
||
Now with turned on actor usage in Marionette for Fission this is no longer a problem. As such marking as fixed.
Updated•2 years ago
|
Description
•