Commit Graph

3569 Commits

Author SHA1 Message Date
Kris Maglione
e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Andrea Marchesini
ae7e7d4c3a Bug 1521051 - Get rid of nsICookiePermission.ACCESS_ALLOW_FIRST_PARTY_ONLY, r=johannh, r=flod 2019-01-23 19:19:19 +01:00
Razvan Maries
7ccb4bf803 Backed out 2 changesets (bug 1521051) for xpcshell fails on extensions/cookie/test/unit/test_cookies_thirdparty.js. CLOSED TREE
Backed out changeset 90bb620dd870 (bug 1521051)
Backed out changeset 483fa314e45e (bug 1521051)
2019-01-23 22:09:32 +02:00
Ciure Andrei
a4eeeccf1d Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-01-23 20:55:29 +02:00
Andrea Marchesini
8e0c688733 Bug 1521051 - Get rid of nsICookiePermission.ACCESS_ALLOW_FIRST_PARTY_ONLY, r=johannh, r=flod 2019-01-23 19:19:19 +01:00
Vincent W
a3846471d6 Bug 1508985 - Enable ESLint for dom/tests/browser (manual changes) r=Standard8,qdot
Differential Revision: https://phabricator.services.mozilla.com/D14018

--HG--
extra : moz-landing-system : lando
2019-01-22 21:26:02 +00:00
Vincent W
3b243b7e27 Bug 1508985 - Enable ESLint for dom/tests/browser/ (automatic changes) r=Standard8,qdot
Differential Revision: https://phabricator.services.mozilla.com/D14017

--HG--
extra : moz-landing-system : lando
2019-01-22 21:26:30 +00:00
Boris Zbarsky
c17e30f6b2 Bug 1363208 part 4. Stop using cross-origin Xrays for WindowProxy. r=peterv,jandem
The change to test_bug440572.html is due to a behavior change.  Specifically,
before this change, any IDL-declared property, even one not exposed
cross-origin, would prevent named frames with that name being visible
cross-origin.  The new behavior is that cross-origin-exposed IDL properties
prevent corresponding frame names from being visible, but ones not exposed
cross-origin don't.  This matches the spec and other browsers.

Same thing for the changes to test_bug860494.xul.

The wpt test changes are just adding test coverage for the thing the other
tests caught.

Differential Revision: https://phabricator.services.mozilla.com/D15428

--HG--
extra : moz-landing-system : lando
2019-01-21 03:30:31 +00:00
Cosmin Sabou
7ccc9d8b0b Merge mozilla-inbound to mozilla-central. a=merge 2019-01-19 11:57:49 +02:00
Muchtar Salimov
a12b9e7b37 Bug 1508984 - Enable ESLint for dom/tests/unit/ and dom/system (manual changes) r=Standard8,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D13624

--HG--
extra : moz-landing-system : lando
2019-01-18 18:56:46 +00:00
Johann Hofmann
ee15b3664f Bug 1483440 - Part 1 - Remove purge-domain-data, add purge-sessionStorage notification. r=baku
The browser:purge-domain-data notification had two different intentions,
- to clear session store information and
- to clear all localStorage and sessionStorage
Firing the notification accomplished both at the same time, which from a
user perspective is of course totally not understandable. This commit
removes purge-domain-data in favor of the two distinct purge-localStorage and
purge-sessionStorage events. This gives callers more granular choice on
what they want to clear.

Differential Revision: https://phabricator.services.mozilla.com/D16460

--HG--
extra : moz-landing-system : lando
2019-01-17 17:40:35 +00:00
Brad Werth
52a3895d81 Bug 1504659 Part 4: Update tests to distinguish between layout and visual viewports. r=botond
Testing the initial value of innerWidth and innerHeight is not really viable when
the visual viewport has been set by the opener, but constrained by the device.
The returned value differs between the desktop and mobile browsers because of the
device constraints. The simplest thing to do is to test the CSS viewport and
ensure that the innerWidth values can be set.

Differential Revision: https://phabricator.services.mozilla.com/D15996

--HG--
extra : moz-landing-system : lando
2019-01-16 21:57:52 +00:00
Cosmin Sabou
f621d8b160 Backed out 5 changesets (bug 1504659) for android reftest failures. CLOSED TREE
Backed out changeset 793e842be7f6 (bug 1504659)
Backed out changeset 229ed2090371 (bug 1504659)
Backed out changeset 0818e2b1f2c5 (bug 1504659)
Backed out changeset bd806b413342 (bug 1504659)
Backed out changeset 3e12097e2b60 (bug 1504659)
2019-01-16 21:23:39 +02:00
Brad Werth
6a0e2e91b4 Bug 1504659 Part 4: Update tests to distinguish between layout and visual viewports. r=botond
Testing the initial value of innerWidth and innerHeight is not really viable when
the visual viewport has been set by the opener, but constrained by the device.
The returned value differs between the desktop and mobile browsers because of the
device constraints. The simplest thing to do is to test the CSS viewport and
ensure that the innerWidth values can be set.

Differential Revision: https://phabricator.services.mozilla.com/D15996

--HG--
extra : moz-landing-system : lando
2019-01-16 17:14:03 +00:00
Paolo Amadini
788354b1e7 Bug 1516258 - Part 2 - Remove XULScrollElement. r=NeilDeakin
There is still styling associated with the "scrollbox" element, but eventually those instances can be replaced with simple boxes.

Differential Revision: https://phabricator.services.mozilla.com/D15298

--HG--
extra : rebase_source : 1ff8502e01df16e791c06b9cdcbe38fb2b55ccd7
2019-01-10 11:50:31 +00:00
Neil Deakin
cb10352f4b Bug 1482389, replace TreeBoxObject with XULTreeElement inherited from XULElement, r=peterv,paolo
--HG--
rename : dom/webidl/TreeBoxObject.webidl => dom/chrome-webidl/XULTreeElement.webidl
rename : layout/xul/tree/TreeBoxObject.cpp => dom/xul/XULTreeElement.cpp
rename : layout/xul/tree/TreeBoxObject.h => dom/xul/XULTreeElement.h
2018-12-04 11:25:30 -05:00
Bas Schouten
c03b298a19 Bug 1506537 - Part 3: Add test for keypress telemetry. r=mstange
--HG--
extra : rebase_source : 26d0976d98bf23019620f32faab2109cc4ffc7a8
2018-12-13 03:37:22 +01:00
Masayuki Nakano
ed2040ac16 Bug 1447239 - Implement InputEvent.inputType r=smaug
This patch implements InputType.inputType which is declared by Input Events.
The attribute has already been implemented by Chrome and Safari.  Chrome
implements Input Events Level 1, but Safari implements Input Events Level 2.
 Difference between them is only whether it supports "insertFromComposition",
"deleteByComposition" and "deleteCompositionText".  This patch makes the
level switchable with pref and takes Level 1 by default because Level 2 is
still unstable around event order with composition events.

For reducing string copy cost at dispatching "input" event, this patch
makes EditorInternalInputEvent store valid input-type as enum class,
EditorInputType and resolves it to string value when
dom::InputEvent::GetInputType() is called.  Note that the reason why
this patch names the enum class as EditorInputType is, there is InputType
enum class already for avoiding conflict the name, this appends "Editor"
prefix because "input" and "beforeinput" events are fired only when an
editor has focus.

Differential Revision: https://phabricator.services.mozilla.com/D14128

--HG--
extra : moz-landing-system : lando
2019-01-07 10:10:57 +00:00
Timothy Guan-tin Chien
bd38b39f8a Bug 1512048 - Convert tabmodalprompt binding to JSM module r=Gijs
This converts the tabmodalprompt binding to a class, to be constructed along side with the element
by TabModalPromptBox.

TabModalPromptBox will keep the instances in a map and pass it to the callers, instead of the element.
The tests and callers can access the class instance by passing the element reference to the map.

Differential Revision: https://phabricator.services.mozilla.com/D15505

--HG--
rename : toolkit/components/prompts/content/tabprompts.xml => toolkit/components/prompts/content/tabprompts.jsm
extra : moz-landing-system : lando
2019-01-04 19:29:34 +00:00
Andrea Marchesini
039b4b8b84 Bug 1517696 - Better exposing of blobImplType for StreamBlobImpl, r=smaug 2019-01-04 11:29:48 +01:00
Andrea Marchesini
000aedaf7d Bug 1517448 - Set PrincipalInfo for Request and Response objects - tests, r=smaug 2019-01-03 19:24:38 +01:00
Andrew McCreight
f557e273ca Bug 1517036 - Remove some unused test support files. r=mrbkap
Differential Revision: https://phabricator.services.mozilla.com/D15531

--HG--
extra : moz-landing-system : lando
2019-01-01 18:28:12 +00:00
Emilio Cobos Álvarez
b0bc11783b Bug 1513658 - Implement DocumentOrShadowRoot.node(s)FromPoint. r=smaug
ChromeOnly for now, needs tests that I'll make sure to land with.

Differential Revision: https://phabricator.services.mozilla.com/D14360

--HG--
extra : moz-landing-system : lando
2018-12-24 12:33:22 +00:00
Matthew Noorenberghe
91692c277f Bug 1515048 - Disable the Payment Request UI and tests by default on Nightly. r=jaws,baku
Differential Revision: https://phabricator.services.mozilla.com/D14885

--HG--
extra : moz-landing-system : lando
2018-12-20 15:08:47 +00:00
Andrea Marchesini
1472148116 Bug 1513647 - MutableBlobStorage should be used in eCouldBeInTemporaryFile mode for fetch(), r=smaug 2018-12-19 15:48:29 +01:00
James Willcox
e67010fdec Bug 1514360 - Fix test_navigator_buildID.html under GeckoView r=Ehsan
Depends on D14613

Differential Revision: https://phabricator.services.mozilla.com/D14614

--HG--
extra : moz-landing-system : lando
2018-12-14 22:51:58 +00:00
Geoff Brown
e260da40f6 Bug 1512464 - Remove invalid entries from dom/tests/mochitest/general/chrome.ini; r=smaug 2018-12-13 09:08:45 -07:00
Daniel Stenberg
704416cc5c Bug 1503393 - adjust tests for localhost proxying r=mayhemer
--HG--
extra : rebase_source : 49fd0951c9bce6058a1a54a4772891aa28ebb354
extra : source : 52e8ef71af9b837be53b294d09381d70c5efceba
2018-12-03 16:28:14 +02:00
James Willcox
46b85d411a Bug 1506642 - Don't try to test for various Push interfaces on GeckoView r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D11661

--HG--
extra : moz-landing-system : lando
2018-12-10 22:19:26 +00:00
Timothy Guan-tin Chien
5f45d86bf7 Bug 1512696 - Pick up is attribute from XHTML element in XUL document r=smaug
This patch allow nsXULPrototypeElement to set mIsAtom when the namespace is in XHTML.

The value is needed by XULDocument::CreateElementFromPrototype() so we could properly
pass it to NS_NewHTMLElement().

Differential Revision: https://phabricator.services.mozilla.com/D13987

--HG--
extra : moz-landing-system : lando
2018-12-10 21:19:35 +00:00
Emilio Cobos Álvarez
6729b2a1c2 Bug 1511138 - Fix / update tests. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D13550
2018-12-07 14:23:31 -05:00
arthur.iakab
168846ee68 Backed out 5 changesets (bug 1511138) for causing eslint failure on SelectChild.jsm CLOSED TREE
Backed out changeset daee82295b3c (bug 1511138)
Backed out changeset d23c9c3e1566 (bug 1511138)
Backed out changeset a99600391704 (bug 1511138)
Backed out changeset 4ef293b90887 (bug 1511138)
Backed out changeset 4df286b234b3 (bug 1511138)
2018-12-07 20:55:24 +02:00
Emilio Cobos Álvarez
3767b3a6d1 Bug 1511138 - Fix / update tests. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D13550
2018-12-07 13:01:01 -05:00
Jason Orendorff
388017b68a Bug 1505122 - Enable ReadableStream for beta and release. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D12187

--HG--
extra : moz-landing-system : lando
2018-11-30 16:31:47 +00:00
Razvan Maries
77d87d9972 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-11-30 05:13:14 +02:00
Jan Varga
7941181395 Bug 1286798 - Part 32: Add a test for snapshotting verification in multi-e10s setup; r=asuth 2018-11-29 21:48:57 +01:00
Jan Varga
d015b67aae Bug 1286798 - Part 20: Add checks for the 5 MB origin limit; r=asuth
The 5 MB limit is no longer applied to the whole group (eTLD+1). That will be controlled by quota manager.
2018-11-29 21:48:19 +01:00
Jan Varga
81c542fbe6 Bug 1286798 - Part 19: Implement a helper method for datastore preloading verification; r=asuth
A new type of request is introduced, PBackgroundLSSimpleRequest. This protocol is much simpler than PBackgroundLSRequest which needs to be cancelable.
2018-11-29 21:48:15 +01:00
Jan Varga
b968ceb813 Bug 1286798 - Part 18: Verify that data is persisted on disk; r=asuth,mrbkap
New methods open() and close() are added to the Storage WebIDL interface. They are only available when a pref is set and are only intended for testing. There's also a new method resetStoragesForPrincipal() which is used as a callback for close() since datastores don't release directory locks immediately. resetStoragesForPrincipal() requests an exclusive lock for given origin, so it must wait for any exising shared locks to be released.
2018-11-29 21:48:11 +01:00
Jan Varga
944443d481 Bug 1286798 - Part 16: Adjust ClearDataService for new local storage implementation; r=asuth
This patch also adds support for creating LSObjects from chrome for any given origin which can be used for example by xpcshell tests.
2018-11-29 21:48:05 +01:00
Jan Varga
ae769dcc6b Bug 1286798 - Part 12: Honor the storage preference and cookie settings in all LocalStorage API methods; r=asuth 2018-11-29 21:47:52 +01:00
Jan Varga
9bbba97e91 Bug 1286798 - Part 11: Enable tests for session only mode (but only for the old local storage implementation); r=asuth
An attribute for checking if the next gen local storage implementation is enabled is exposed via a new interface nsILocalStorageManager which should be used for any other local storage specific stuff.
2018-11-29 21:47:48 +01:00
Jan Varga
be167c5e0b Bug 1286798 - Part 10: Support for storage events; r=asuth,janv
Storage events are fired either directly after getting response from synchronous SetItem call or through observers. When a new onstorage event listener is added, we sycnhronously register an observer in the parent process. There's always only one observer actor per content process.
PBackgroundLSDatabase is now managed by a new PBackgroundLSObject protocol. PBackgroundLSObject is needed to eliminate the need to pass the principal info and document URI everytime a write operation occurs.
Preparation of an observer shares some states with preparation of a datastore, so common stuff now lives in LSRequestBase and preparation of a datastore now implements a nested state machine.

This patch was enhanced by asuth to drop observers only when the last storage listener is removed.
EventListenerRemoved is invoked on any removal, not just the final removal, so we need to make sure it's the final removal before dropping observer.
2018-11-29 21:47:45 +01:00
Jan Varga
60831f2e38 Bug 1286798 - Part 3: New basic (memory only) implementation of LocalStorage; r=asuth,mccr8
The implementation is based on a cache (datastore) living in the parent process and sync IPC calls initiated from content processes.
IPC communication is done using per principal/origin database actors which connect to the datastore.
The synchronous blocking of the main thread is done by creating a nested event target and spinning the event loop.
2018-11-29 21:47:20 +01:00
Andrea Marchesini
70de4bde06 Bug 1503681 - rel=noopener implicit for target=_blank in anchor and area elements when no rel attribute is set - fix tests, r=me CLOSED TREE 2018-11-28 12:39:19 +01:00
Andrea Marchesini
f399725b04 Bug 1503681 - rel=noopener implicit for target=_blank in anchor and area elements when no rel attribute is set - fix tests, r=me 2018-11-28 08:22:06 +01:00
Brindusan Cristian
025923e8bc Backed out 3 changesets (bug 1503681) for geckoview failures on org.mozilla.geckoview.test.GeckoSessionTestRuleTest.waitForChromeJS. CLOSED TREE
Backed out changeset 211c7dfdc408 (bug 1503681)
Backed out changeset 076cc5bece1d (bug 1503681)
Backed out changeset 7a19fe6be68c (bug 1503681)
2018-11-28 11:10:48 +02:00
Andrea Marchesini
d69ebc1ae7 Bug 1503681 - rel=noopener implicit for target=_blank in anchor and area elements when no rel attribute is set - fix tests, r=me 2018-11-28 08:22:06 +01:00
Jason Orendorff
725be0ed7c Bug 1511040 - Handle errors in test_readableStreams.html. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D13410

--HG--
extra : moz-landing-system : lando
2018-11-29 22:44:46 +00:00
Jason Orendorff
d9b4527a64 Bug 1391756 - Try to fix rare timeout in dom/tests/mochitest/fetch/test_readableStreams.html. r=baku
Also removes an infinite regress of nested iframes. The original problem was
that tests would start running before the child iframe was done loading. The
straightforward fix is to have the child frame start the test. But this caused
further error messages because the child iframe is loaded more than once;
removing the iframe from the iframe fixes this.

Differential Revision: https://phabricator.services.mozilla.com/D13385

--HG--
extra : moz-landing-system : lando
2018-11-29 22:35:04 +00:00