If a range endpoint is in the middle of a text node, and you call
deleteContents() or extractContents(), the spec says to delete the data
from the node. In the case of extractContents(), the new text node
that's inserted into the DocumentFragment is a clone with its data set
to the bit that was deleted.
<https://dom.spec.whatwg.org/#dom-range-deletecontents>
<https://dom.spec.whatwg.org/#dom-range-extractcontents>
We don't do this. Instead, we split the text node. Then the bit to
delete is deleted naturally at a later stage together with all the other
nodes.
The result is the same, but on the way there we do a bunch more node
mutations. This causes extra mutation records, which cause us to fail a
WPT test. Chrome passes. Changing to match the spec actually reduces
our lines of code anyway.
MozReview-Commit-ID: FTTV5yNSj71
--HG--
extra : rebase_source : 8d5f36c68c71db0700f0b86d1a73462759f922e8
In case of websites manipulating the browser's history via history.pushState
there will be no usual page load events fired. Instead listeners for popstate
events have to be used.
When such an event occurs we can directly return because the browser will
not load the underlying page. This only happens when navigating to another
page first, or restarting Firefox.
MozReview-Commit-ID: 3PceeYK9Co7
--HG--
extra : rebase_source : 30c162f72279712920a96ebc2076db27d01c41b6
Return the contents of value, if it exists, after asserting the response
was successful.
assert_success can be passed a value which will assert that the response's
value matches an expected value. If you want to compare a subsection
of the response it may be convenient to for the value to be returned
after it has been asserted that the response was a success.
MozReview-Commit-ID: 1dyzQIazYEN
--HG--
extra : rebase_source : f628f1fa144ccfd026b21df1b4bc2e748b08413c
Introduces two new APIs on client.Window in the WPT WebDriver client:
client.Window#state and client.Window#rect. The latter is used to reduce
raw calls amongst client.Window's shorthands to GET window/rect.
MozReview-Commit-ID: Kf4P2q93QaL
--HG--
extra : rebase_source : cd38db307a3db08c0cc94eb7adb582bd885987e2
If a test leaves the window in maximized, minimized, or fullscreen
state it should be returned to the normal state the next time a session
is requested.
MozReview-Commit-ID: IALlITFVz1w
--HG--
extra : rebase_source : df1944bc73d967fa9ff0fe4e60e7815044afef0b
Upgrades the webdriver crate dependency to 0.29.0, which contains some
backwards incompatible changes for RectResponse. This type has been
split in two, WindowRectResponse and ElementRectResponse.
The former type contains a new "state" field which is already implemented
by Marionette. Because geckodriver is used with a range of earlier
Firefoxen, it defaults to "normal" window state if the field is not
returned from Marionette. This is acceptable.
MozReview-Commit-ID: FRxppRVmiZl
--HG--
extra : rebase_source : 4a86659f337598bb4f5623c51f5df288c8a5dd69
Per spec, Range.prototype.extractNodes() should copy the nodes in tree
order:
https://dom.spec.whatwg.org/#dom-range-extractcontents
Gecko instead copies them in reverse order. This causes us to fail a
wpt MutationObserver test.
MozReview-Commit-ID: 8MYXGhDsJCd
--HG--
extra : rebase_source : 94fb2e96370e575906ba9927d904561744a1d7bb
They were just dropped from the spec:
https://github.com/whatwg/dom/issues/362https://github.com/whatwg/dom/pull/489
ErrorEvent we never supported anyway until it was added recently to
match the spec. PopStateEvent is not supported by WebKit, Blink is
planning to try dropping support, our telemetry shows usage is
basically zero, and we never supported any way to initialize it anyway.
The changes to Document-createEvent.html and Document-createEvent.js are
taken from upstream. The other wpt changes are new in this commit.
MozReview-Commit-ID: A6GzhLwL08l
--HG--
extra : rebase_source : 4bdcd605b179ea787985845e9b1c53f76ebc179a
The marionette.defaultPrefs.port and marionette.logging preferences were
removed in https://bugzil.la/1344748, which shipped in Firefox 54.
Because the next version of geckodriver (0.19.0) will only support
Firefox 55 and greater, it is safe to remove the fallbacks.
MozReview-Commit-ID: 4fhtoRasqyB
--HG--
extra : rebase_source : 0ac6dff0343efd66312a482f2be832e95013be48
This is the one event we don't support in createEvent() that Blink
doesn't want to drop support for because they see nontrivial usage:
https://www.chromestatus.com/metrics/feature/timeline/popularity/1171
Supporting it shouldn't hurt us and might make us work better on
whatever the sites are that Blink is hitting.
MozReview-Commit-ID: FbfTd6AYnDg
--HG--
extra : rebase_source : f6bbcbd04af87349064b965814571e832932c130
This will only work if runByManifest is enabled, otherwise the harness will error out. It's also
illegal to set this on an individual test, it must be on the entire manifest.
MozReview-Commit-ID: LWYa3Sk1uyW
--HG--
extra : rebase_source : ea4add087c795324745a0a5fc18b3ef50b2292b0
Currently manifestparser will only look for line continuations *after* looking for a key. This means
that line continuations cannot contain key separators. For example, this:
[test]
foo=
bar=baz
gets treated as:
{'name': 'test', 'foo': '', 'bar': 'baz'}
Here, bar=baz will be treated as a new key/value pair despite the indentation. This patch switches
the order around, so we look for a continuation first. Now, it is only treated as a continuation if
the indent is greater than the indent of the preceding key.
So this manifest:
[test]
foo=bar
baz=fleem
is a continuation and results in:
{'name': 'test', 'foo': 'bar\nbaz=fleem'}
But this manifest:
[test]
foo=bar
baz=fleem
is not a continuation, and yields:
{'name': 'test', 'foo': 'bar', 'baz': 'fleem'}
MozReview-Commit-ID: FAMP5TUIo9q
--HG--
extra : rebase_source : 624c53cfe0565374c1224dd86a3fffc8831279d3
Per spec, getSelection() should return null when the document is not
associated with a browsing context.
MozReview-Commit-ID: B6QbLWVmfcF
--HG--
extra : rebase_source : 4826ba52726ac413bc8c4b95cc309da7ce7986ab
On Taskcluster machines, /tools/buildbot doesn't exist. It turns out, nothing
refers to exes['python'] anyway, so we can just remove that (the preference is
to use sys.executable instead).
The references to exes['buildbot'] were all for sendchanges from builds to
tests, and those too are all gone now.
Lines like
'virtualenv': ['/tools/buildbot/bin/python', '/tools/misc-python/virtualenv.py'],
Were committing two sins: first, using a python executable from a random
virtualenv; and second, using a virtualenv.py from another random directory (in
this case, it's a utility script for a PuppetAgain module). Such lines are
replaced with a reference to /tools/virtualenv/bin/virtualenv, which is
installed for the express purpose of providing a virtualenv binary on testers
(for builds, we use the vendored copy).
MozReview-Commit-ID: 4iHX3B3MLyK
--HG--
extra : rebase_source : e4b4902a19d688b148c136bd10c706fc127cbf2d
The geckodriver HTTPD proxy implements WebDriver conforming capabilities
negotation and it is unnecessary to do this in the Marionette WebDriver
service. The capabilities matching that Marionette implements is also
not as good as the implementation found in geckodriver.
The WebDriver:NewSession command will still accept a JSON Object of
"configuration" capabilities that carry the pre-matched capabilities from
geckodriver. These will be used as configuration options for the session.
Type- and bounds checks will still be performed on this input.
MozReview-Commit-ID: CROjgGuTXOG
--HG--
extra : rebase_source : eb7e9f69fe3b23b77ea497d758fe30ac93d6373c
Also remove stale expected failures for region and locality.
MozReview-Commit-ID: 7McvaCWfY3a
--HG--
extra : rebase_source : e94b5e30df85f911fe8f5ce52dbd6459efbc92df
Changes to match spec, Chrome, and Safari. The spec was discussed and
is what we want -- we already expand entities from the internal subset
when parsing, so there's no need to remember their definitions. Indeed
it seems like it would make sense to alter the parser to throw away the
internal subset entirely at the end of parsing.
MozReview-Commit-ID: LDvYAqSZkgE
--HG--
extra : rebase_source : 928722b51d931a3c1ce358b2346c5e535bfa16df
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.
MozReview-Commit-ID: 4ecl3RZhOwC
--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
The WebDriver service in the remote protocol accepts sessionId and
session_id and we only need on. All known consumers are using sessionId,
and we can drop the session_id fallback.
MozReview-Commit-ID: 6fa5Lgkzwfu
The element click functions in testing/marionette/interaction.js are
generator functions using "yield". This patch converts them to async
functions.
MozReview-Commit-ID: 4A4cTaY619w
The element click functions in testing/marionette/interaction.js are
generator functions using "yield". This patch converts them to async
functions.
MozReview-Commit-ID: 4A4cTaY619w
--HG--
extra : rebase_source : 1b6f1b545f438ae253fd4024500bf41536d976aa
With a WebDriver-conforming Element Click implementation, the element
click intercepted error is returned when an element with pointer-events:
"none" causes the click to hit the underlying element.
This patch does not functionally change anything yet about the
accessibility tests, but splits disabled_accessibility_elementIDs into
two lists, aria_disabled_elements and pointer_events_none_elements, in
anticipation of moving Marionette to use a different click implementation.
In the future, the ARIA tests will fail with "element not accessible"
errors as they do now, but the pointer-events tests will fail with
"element click intercepted" instead.
MozReview-Commit-ID: Ks1hyUVyLK7
--HG--
extra : rebase_source : 20dbcc228955626cd2d1617aa055f29f4e5928a4
Because the sizemodechange event is not synchronous on all platforms,
we additionally need to await the window's dimensions to change.
However, if the window manager does not have a notion of a maximised
state, this operation too could time out. However, it is believed
that the additional wait will allow for the window to transition to the
required state in this scenario.
MozReview-Commit-ID: KeHJMKSJfjQ
--HG--
extra : rebase_source : 797b3be8f6adb027f15dd638f22afa6efd0f0432
This introduces a specialisation of the well-known Promise that can
time out after a set limit, causing the promises' "reject" callback to
be invoked.
The TimedPromise object represents the timed, eventual completion
(or failure) of an asynchronous operation, and its resulting value.
In contrast to a regular Promise, it times out after a set timeframe.
MozReview-Commit-ID: Rb3POsPYeT
--HG--
extra : rebase_source : cdff792dfa43af3cff1b20b3e81edb1a826e561e
The condition can be used for other things than poll-waiting.
MozReview-Commit-ID: 1sudv5JuEQT
--HG--
extra : rebase_source : ff58917f6fc0a860e149805ad838816541091705
Resetting these interfaces means they will not be set up again if the
client.Session instance is reused.
MozReview-Commit-ID: 7JW61VrMFpD
--HG--
extra : rebase_source : 6cf19950ab66e04f1e8999dc13497c435249c98d
The Maximize Window command is a POST endpoint and should consequently
be a method, not a property.
MozReview-Commit-ID: DJfKdhMIX75
--HG--
extra : rebase_source : 03409f3a30ac338704921801832d3210e8ef9236
It happens that we receive responses that do not have a body value.
We want to be able to use assert_success with these as well.
MozReview-Commit-ID: B1f0Hn406Nj
--HG--
extra : rebase_source : 6f47e4bd8a72fecf365a6e06771effb1f8e055a5
The dictionary from Marionette#window_size is a subset of what is returned
from Marionette#window_rect, causing the self.assertEqual to complain
that they are not equal. We want to compare the same types.
MozReview-Commit-ID: L4XTlgtUYKW
--HG--
extra : rebase_source : c3adf89777ac589cab2fb84fe3e543f22d9895fc
The "delta" in the second assertion was not deducted from the height.
The patch also improves the error message.
MozReview-Commit-ID: 8u8UhKg3Q62
--HG--
extra : rebase_source : a3771620fc15225ac6932c718515b8dfcf2fdab0
The window state was included for only some of the commands' responses
earlier.
MozReview-Commit-ID: DdNyR7vdgtY
--HG--
extra : rebase_source : b7c3c7376f8affff673c903ba2c90e2cee93878a