When the shift special key has been included as part of a sendkeys command,
subsequent characters that appear on a US keyboard must be replaced by the
shifted character for that key.
Differential Revision: https://phabricator.services.mozilla.com/D139978
Rather than copying over the code from EventUtils, load EventUtils.js
into event.js. This is slightly complicated by the fact that
EventUtils.js depends on the existence of a global named `window`. So
instead of loading the script as a normal component, we need to use
`loadSubScript` to create an instance of the script with the required
window binding (this is similar to the approach the CDP module uses).
The actual API changes for mouse events are ~trivial, but for key
events things are a little more involved. The code previously (in
effect) called synthesizeKey with the virtual keycode as the aKey
argument. However EventUtils.js documents this as deprecated, so we
switch to providing the actual key, with the `KEY_` prefix for
non-printable characters.
To make this easier, all the data about various keys from the
WebDriver spec is collapsed into a single lookup table, rather than
having a table for each interesting property.
Differential Revision: https://phabricator.services.mozilla.com/D138449
Depends on D138523
Given our current broadcast logic, we should not stumble on webextension contexts during broadcast.
This is because getAllBrowsingContextsInSubtree will not cross process boundaries.
Nevertheless, adding explicit support for WebExtensions in our filter method should be ok, with the added test.
Whenever we lift the JSWindowActor restrictions and rely on isBrowsingContextCompatible for filtering this will help avoid regressions.
Differential Revision: https://phabricator.services.mozilla.com/D138531
When requested to return early from waitForInitialNavigationCompleted
when the navigation starts, the URIs of the current location and for the
destination will be returned.
Differential Revision: https://phabricator.services.mozilla.com/D137539
WebDriver commands that currently assert for Firefox should
actually check for desktop because Thunderbird also supports
all of these.
Differential Revision: https://phabricator.services.mozilla.com/D136574
PathUtils::CreateUniquePath was doing main thread IO, so we're moving it to
IOUtils to use its event loop to do the IO.
Additionally, we're adding IOUtils::CreateUniqueDirectory which is the same as
::CreateUniqueFile, but for directories.
Differential Revision: https://phabricator.services.mozilla.com/D133841
PathUtils::CreateUniquePath was doing main thread IO, so we're moving it to
IOUtils to use its event loop to do the IO.
Additionally, we're adding IOUtils::CreateUniqueDirectory which is the same as
::CreateUniqueFile, but for directories.
Differential Revision: https://phabricator.services.mozilla.com/D133841
If the navigation causes the browsing context to be replaced,
the listener cannot be unregistered. As such keep a reference
to the original webProgress instance that can still be used.
Differential Revision: https://phabricator.services.mozilla.com/D135595
We are not supporting the TOP_BROWSING_CONTEXT yet in BiDi, but message handler already supports it, and assumes browser ids. But as discussed we will need to use custom UUIDs, and on the side have a mapping between browser ids and UUIDs, as browserids might be available late.
Differential Revision: https://phabricator.services.mozilla.com/D135414
Before an instance of a WindowGlobalMessageHandler is ready to be used the
initial session data needs to be applied. Because this happens asynchronously
an internal "window-global-handler-created" event will be used for which the
root message handler or any other module can listen for.
Differential Revision: https://phabricator.services.mozilla.com/D134265
There are two kind of events that can be used by module implementations
to pass information within the message handler framework.
First, with internal events the different modules and the message handlers
themselves can send around information eg. informing the parent process
about specific DOM events happening in the child process. These events
are not intended to be sent to external clients.
Second, with protocol events the different modules can send events with
a payload as specified in the appropriate protocol. These events shouldn't
be intercepted, modified, or ignored and will be sent to external clients.
Differential Revision: https://phabricator.services.mozilla.com/D134264
PathUtils::CreateUniquePath was doing main thread IO, so we're moving it to
IOUtils to use its event loop to do the IO.
Additionally, we're adding IOUtils::CreateUniqueDirectory which is the same as
::CreateUniqueFile, but for directories.
Differential Revision: https://phabricator.services.mozilla.com/D133841