Open Bug 1713440 Opened 5 years ago Updated 1 month ago

MessageHandler: Support chrome browsing contexts

Categories

(Remote Protocol :: WebDriver BiDi, task, P3)

task
Points:
8

Tracking

(Not tracked)

REOPENED

People

(Reporter: jdescottes, Unassigned)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [webdriver:m22])

Add support for chrome window contexts. This is currently not handled in the prototype stack.

Even for such parent process contexts, a dedicated CommandsHandler should be created for the target chrome window context.
We might reuse the same transport class as the one created for Bug 1713439 or come up with a dedicated one.

Points: --- → 8
Priority: -- → P3
Summary: CommandsHandler: Support chrome window contexts → MessageHandler: Support chrome window contexts
Blocks: 1722679

As a proof of concept based on the current MessageHandler patches, the following patch allows to capture log events emitted from a chrome window.

https://hg.mozilla.org/try/rev/8d985698a779b2bebcd8fc042be13b37c87a8b7d

It does two things:

  • relaxes the filtering performed in the FrameTransport in order to also accept parent process browsing contexts
  • adds the includeChrome flag to the MessageHandlerFrameActor definition

With this, the following manual test should work:

  • start firefox with --remote-debugging-port
  • direct connect to BiDi with a websocket client
  • create a session
  • send a session.subscribe command for ['log.entryAdded']
  • open the BrowserToolbox
  • run gBrowser.ownerGlobal.console.log("TEST") (gBrowser.ownerGlobal points to the Chrome window)
  • you should receive an entryAdded event
Whiteboard: [bidi-m1-mvp] → [bidi-m2-mvp]
Priority: -- → P3

Resetting points for now given that I don't think that this should really be 8 points.

I just found this bug and we probably should have it separated out from any implementation bug of a BiDi command supporting the parent process.

Points: 8 → ---
Priority: P3 → --
Whiteboard: [webdriver:triage]

As discussed in the triage meeting today this is a very old bug and it might not apply anymore, or would have to be split anyway. We decided to close it.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX

This is actually not a wontfix. We still have to add support for chrome contexts to the message manager. At least it is necessary for retrieving all the supported browsing contexts - right now only tab related browsing contexts are queried for. This is going to block support for realm targets when evaluating scripts via script.evaluate and script.callFunction.

Overall we need to pass along the request to include and filter as well chrome browsing contexts down until isBrowsingContextCompatible. This requires a bit of refactoring.

(In reply to Julian Descottes [:jdescottes] (PTO -> Jan 5th) from comment #1)

  • adds the includeChrome flag to the MessageHandlerFrameActor definition

Adding this flag is now getting done on bug 1944570 with the implementation of the script.evaluate and script.callFunction commands by using a chrome browsing context.

Status: RESOLVED → REOPENED
Depends on: 1944570
Resolution: WONTFIX → ---
Summary: MessageHandler: Support chrome window contexts → MessageHandler: Support chrome browsing contexts

I had to disable the test remote/shared/messagehandler/test/browser/browser_session_data_browser_element.js temporarily because browser chrome tests always run with system access allowed and this would mean that we include chrome and not only browser windows, so the test starts to fail because the session data is as well loaded into extension sidebars. We need to reenable the test with the patch on this bug.

Points: --- → 8
Priority: -- → P2
Whiteboard: [webdriver:m19]
Whiteboard: [webdriver:m19] → [webdriver:m20]
Priority: P2 → P3
Whiteboard: [webdriver:m20] → [webdriver:m21]
Whiteboard: [webdriver:m21] → [webdriver:m22]
You need to log in before you can comment on or make changes to this bug.