Skip tests that are expected to fail in both Stylo and Gecko modes. They would unexpectedly "pass" in styloVsGecko mode when comparing the two failures, which is not a useful result.
MozReview-Commit-ID: 3mOpjU225Q1
--HG--
extra : rebase_source : 0c307639c3626af3b6b43e05d3ee73d08b3f47ce
We call attributeChangedCallback in two cases:
1. When any of the attributes in the observed attribute list has changed,
appended, removed, or replaced.
2. When upgrading an element, for each attribute in element's attribute list
that is in the observed attribute list.
MozReview-Commit-ID: LKUY5ibp9RI
* * *
Bug 1334051 - Part 3: Optimize attributeChanged callbacks. r=smaug
This patch does 2 things:
. when SetBodyUsed() is called, the pump for the stream reading is activated.
. Just because of the reading of the stream could end up executing JS code, we
need to pass the JSContext in the correct state down to SetBodyUsed.
The e10s tests were written assuming a world where ContentTask.spawn and
LocalStorage were both PContent. Also, that Quantum DOM labeling wasn't
something to worry about. These assumptions no longer held, resulting in
the test intermittently failing if all changes hadn't propagated via
PBackground to the tab under test by the time the ContentTask.spawn
state retrieval call made it to the tab's main thread.
This has been corrected by using "storage" events where already in use and
polling where not in use. Plase see the added comments for more details.
The included test crashes without the included fix if run with --disable-e10s.
e10s doesn't crash because HttpChannelChild examines the return value of the
call to the listener's OnStartRequest method and invokes Cancel() if it
NS_FAILED. This is a divergence between e10s and non-e10s. See the bug for
more details and discussion.
--HG--
extra : rebase_source : 9da386b0f1c0b349728170b301f62b0175c2c571
`nsRange` registers mutation observers to adjust the range when content
changes. However, there are some cases where we adjust the start and/or
end offsets but don't notify selection listeners (i.e. we don't call
`nsRange::DoSetRange` to set the new range points, contrary to what the
comment above `nsRange::DoSetRange` says). This patch makes us call
`nsRange::DoSetRange` in those cases. The patch adds a testcase in
test_selectevents.html, and changes a few unexpected-pass cases in
test_composition_text_querycontent.xul that this patch fixed.
MozReview-Commit-ID: 73D8RYMS3MS
--HG--
extra : rebase_source : da0cc3073e4b8ad23c6f6eab42da5aa8b269cae9
Android sets dom.disable_window_showModalDialog to true in mobile.js so this
test now fails because it explicitly sets the pref to false. For the time
being, it's easiest to simply skip this test on Android and turn it back on
once we remove the test entirely.
MozReview-Commit-ID: 5XsiXupESvg
--HG--
extra : rebase_source : 8d176e069aac5cc49ec06b7055be5a81b45c188a
Annoyingly, setting the pref doesn't magically make the function appear on the
current window, so we create an iframe and retrieve it from there.
MozReview-Commit-ID: 9fOr4YJOzXh
--HG--
extra : rebase_source : d23643b388538955cc831a3b6e1473232ab5498a
The browser-chrome test suite now detects and reports unhandled rejections of native Promises, in addition to those created by Promise.jsm. The whitelisting mechanism is updated to use primarily the PromiseTestUtils.expectUncaughtRejection function. Tests will fail if a rejection that is not whitelisted occurs, or if a whitelisted rejection does not occur anymore.
MozReview-Commit-ID: 1beGB5GG8Ty
--HG--
extra : rebase_source : b6573f8e2001f91d0e5a50f6376b191459549e94
extra : intermediate-source : 0411e687044ecc7b56684196238e6e6e68a9d685
extra : source : 8d53be05afc59519c5ce8cfae96d284a972fda71
The intermittent failure appears to have been due to mOriginsHavingData
only being updated when the db thread flushes. The db thread has a
hard-coded 5 second flush interval. It's likely that e10s startup was
previously so slow that we were assured of having a flush happen by the
time our fresh process created its parent actor.
We correct this by reliably ensuring a flush before spinning up the
process to check preload state. We also ensure a flush at the start of
the test for our check that there was no preload in the initial cases.
We were actually more vulnerable in that case, I believe, but as a
browser chrome test, there were no other tests that would have used
content localStorage.
We additionally ensure that the content process has received and
populated mOriginsHavingData by having the tab opening process wait for
about:blank to load in the process before actually opening our origin.
Prior to this change we were depending on orderings that aren't
guaranteed.
--HG--
extra : rebase_source : 92d3c675cee82ffe8b562e83860601e0c6dc1a9b
Bug 1345990 introduced a "forceNewProcess" argument in
BrowserTestUtils.openNewForegroundTab. By switching to this we can
stop bloating the process count pref to try and produce equivalent
results. To minimize test churn and because it doesn't really hurt to
double-check, the code that asserts that our tabs are each in different
processes and related book-keeping infrastructure have been left intact.
We also set a preference to disable preallocated processes in the interest
of maximizing test consistency and minimizing breakage. It's conceivable
that a preallocated process might end up creating its StorageDBParent
actor prior to when we want, breaking things. By ensuring the process
isn't created until we want it, we avoid a lot of brittleness.
--HG--
extra : rebase_source : 5736f7b2d06b720cefbe82eb6052e71b9fc14f23
This patch is for the intermittent bug 1357082 which has a failure in the test 'test_pointerlock-api.html' and is more frequent when it is run on Ubuntu 16.04. This failure is resolved by retrying the mouse movement until it actually occurs.
MozReview-Commit-ID: 9XC4zmWj8Gn
--HG--
extra : rebase_source : 8f2d80661f8da82a68eeade2261a2d729c13c84d
This is necessary because we asynchronously send the updated UserContextId back
from the child to the parent process, and we would occasionally lose the race on
infrastructure causing us to see the non-updated version.
With this change we explicitly ask the content process, which is not racey.
MozReview-Commit-ID: LODNi1YmBI8
This replaces the JS policy service stubs with a pure C++ version which
directly makes policy decisions based on active WebExtensionPolicy objects.
This is the first step in a larger refactoring, which will remove the
ExtensionManagement module entirely, and replace the current add-on policy
service with direct, non-virtual access to native WebExtensionPolicy objects.
It will also be followed by related changes to migrate the content script and
extension page matching to native code, based on the existing MatchPattern and
WebExtensionPolicy bindings.
MozReview-Commit-ID: 2MpbmXZGiPZ
--HG--
extra : rebase_source : 8b268618164b45605143e858665e592de829a6fa
The browser-chrome test suite now detects and reports unhandled rejections of native Promises, in addition to those created by Promise.jsm. The whitelisting mechanism is updated to use primarily the PromiseTestUtils.expectUncaughtRejection function. Tests will fail if a rejection that is not whitelisted occurs, or if a whitelisted rejection does not occur anymore.
MozReview-Commit-ID: 1beGB5GG8Ty
--HG--
extra : rebase_source : 64395c5fdf25deebd60dfbf2cf5df3cbf7ca8abb
extra : amend_source : 0a3f13419c050662680f2bd110d724b3bf991732
extra : source : 8d53be05afc59519c5ce8cfae96d284a972fda71
The browser-chrome test suite now detects and reports unhandled rejections of native Promises, in addition to those created by Promise.jsm. The whitelisting mechanism is updated to use primarily the PromiseTestUtils.expectUncaughtRejection function. Tests will fail if a rejection that is not whitelisted occurs, or if a whitelisted rejection does not occur anymore.
MozReview-Commit-ID: 1beGB5GG8Ty
--HG--
extra : rebase_source : 59e5b84cb431f3ca28287d30a3da8fbea1363ec5
When eKeyPress event is dispatched from TabParent to a remote process, it
should store edit command for all editor types. Then, copied
WidgetKeyboardEvent in the remote process doesn't need to request the edit
commands when its ExecuteEditCommands() is called.
Note that this patch also changes a automated test, browser_bug1316330.js,
that uses nsIDOMWindowUtils.dispatchDOMEventViaPresShell() to dispatch
repeated keyboard events in the tab. However, it should use synthesizeKey()
to emulate everything of native keyboard events and the API can dispatch
repeated keyboard events too. (And the test has a bug. It tries to wait 0.5
sec when every keydown or keypress event. However, it fails since startTime
is never initialized. This patch fixes this bug too.)
MozReview-Commit-ID: IYhyxqH3Ch8
--HG--
extra : rebase_source : 0db911e8e6ea7fc537bda76f4cc0f8952cc13dd2
Discussion at <https://github.com/whatwg/dom/issues/319>. In short, the
specification used to say to throw sometimes InvalidCharacterError and
sometimes NamespaceError, but browsers disagreed on which to throw in
corner cases, and everyone agreed it wasn't worth the effort to spec the
distinction, so we just changed it to InvalidCharacterError across the
board.
The test changes are already upstream.
MozReview-Commit-ID: AWSZBznQprG
--HG--
extra : rebase_source : 2f0051f48124380f17300a38ceb8c2ab23015ca1
By using ContentTask, we get a Promise that resolves once we've heard confirmation from
the content process that the ContentTask function has completed running. This means we
can be certain that browser_beforeunload_between_chrome_content.js has had the beforeunload
event handlers added before attempting to unload the page.
MozReview-Commit-ID: DhoTsOZ4BNk
--HG--
extra : rebase_source : ee31ed4e9a8fe0b734a5961c8b0d47d75ccb6703
Other browsers do not support any of these (IIRC), telemetry reports
essentially zero usage, and supporting them is contrary to the DOM spec.
Notes on specific events:
CommandEvent and SimpleGestureEvent: These are not supposed to be
web-exposed APIs, so I hid the interfaces from web content too
(necessary to avoid test_all_synthetic_events.html failures).
DataContainerEvent: This was a non-standard substitute for CustomEvent
that seemed to have only one user, so I removed it entirely and switched
the user (MozillaFileLogger.js) to CustomEvent.
ScrollAreaEvent: This is entirely non-standard, but we apparently expose
it deliberately to web content, so I didn't see any reason to remove it
from createEvent.
SimpleGestureEvent and XULCommandEvent: Can still be created from
createEvent(), but not by content.
TimeEvent: This is still in because it has no constructor, so there's no
other way to create it. Ideally we'd update the SMIL spec to add a
constructor. I did remove TimeEvents.
MozReview-Commit-ID: 7Yi2oCl9SM2
--HG--
extra : rebase_source : 199ab921acfc531b8b85e77f90fcd799b03c887b
The dialog functionality of the non-standard window.find API has been broken
with e10s since it shipped, and bug 1182569 or bug 1232432 (or both) have
broken it for non-e10s.
This patch remove showDialog support entirely, for both e10s and non-e10s,
in a more deliberate way. We now ignore the argument.
MozReview-Commit-ID: 1CTzgEkDhHW
--HG--
extra : rebase_source : 9aa9623ef649fb2c42ad22738130c361acf6b8cc
I looked at the wrong try push before pushing this change to inbound. Backing it
out hopefully before it turns too many pushes orange.
MozReview-Commit-ID: 5cREsyfWrmb
We have to run the navigator checks in sub-iframes as we need to set preferences which affect navigator's API
which may or may not be already initialised with the current settings. The sub-iframes will have a navigator
object set up with the expected preferences for the test.
The iframes all call into the parent to publish the test results, this is because the SimpleTest infrastructure
doesn't cope with results being published from sub-iframes.
MozReview-Commit-ID: GFVQHMVkbMP
--HG--
rename : dom/power/test/test_bug957899.html => dom/power/test/test_bug957899_iframe.html
rename : dom/presentation/tests/mochitest/test_presentation_availability.html => dom/presentation/tests/mochitest/test_presentation_availability_iframe.html
rename : dom/tests/mochitest/gamepad/test_check_timestamp.html => dom/tests/mochitest/gamepad/test_check_timestamp_iframe.html
rename : dom/tests/mochitest/gamepad/test_gamepad_connect_events.html => dom/tests/mochitest/gamepad/test_gamepad_connect_events_iframe.html
rename : dom/tests/mochitest/gamepad/test_gamepad_extensions.html => dom/tests/mochitest/gamepad/test_gamepad_extensions_iframe.html
rename : dom/tests/mochitest/gamepad/test_gamepad_frame_state_sync.html => dom/tests/mochitest/gamepad/test_gamepad_frame_state_sync_iframe.html
rename : dom/tests/mochitest/gamepad/test_gamepad_hidden_frame.html => dom/tests/mochitest/gamepad/test_gamepad_hidden_frame_iframe.html
rename : dom/tests/mochitest/gamepad/test_gamepad.html => dom/tests/mochitest/gamepad/test_gamepad_iframe.html
rename : dom/tests/mochitest/gamepad/test_navigator_gamepads.html => dom/tests/mochitest/gamepad/test_navigator_gamepads_iframe.html
rename : dom/tests/mochitest/geolocation/test_geolocation_is_undefined_when_pref_is_off.html => dom/tests/mochitest/geolocation/test_geolocation_is_undefined_when_pref_is_off_iframe.html
rename : dom/workers/test/test_navigator.html => dom/workers/test/test_navigator_iframe.html
rename : dom/workers/test/test_navigator.js => dom/workers/test/test_navigator_iframe.js
extra : rebase_source : fe0f3e342cb55b5e9da7038acb59b5e2a5c8767e
Some interface tests into mochitest is failure on android beta and release.
test_serviceworker_interfaces.js has nonReleaseAndroid flag, so we should use it into test_interfaces.js and test_worker_interfaces.js
MozReview-Commit-ID: A1aHrTXwGil
--HG--
extra : rebase_source : 0990ec8a50b664ac711ee4977a104286f40ae07e