Commit Graph

352 Commits

Author SHA1 Message Date
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Dave Townsend
4e82401311 Bug 1515863, r=valentin,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D15728

--HG--
extra : rebase_source : 2e1c705dd97d458080387896fd7a1f0e88523e06
2018-04-11 12:52:47 -07:00
Emilio Cobos Álvarez
d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Blake Kaplan
1ee3f7ba6b Bug 1515989 - Fix this test to use the service worker manager in the parent. r=asuth
I would have loved to get rid of ServiceWorkerContainer.getScopeForUrl in
favor of just doing things in the chrome script, but it's a pain to make it
work in both the parent-intercept and non- cases. Once we get rid of
non-parent-intercept, we should just remove this test-only API.

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

--HG--
extra : moz-landing-system : lando
2018-12-21 21:51:40 +00:00
Ehsan Akhgari
ebf73ac0ad Bug 1511303 - Ensure that visiting a page with an iframe does not cause an entry to be injected in the Cookies subpanel in the Control Centre; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D14776

--HG--
extra : moz-landing-system : lando
2018-12-18 23:20:30 +00:00
Bogdan Tara
d7c417565a Backed out changeset 3956dbb7e65d (bug 1511303) for browser_ignore_same_page_navigation.js failures CLOSED TREE 2018-12-19 00:57:37 +02:00
Ehsan Akhgari
c6e9319e51 Bug 1511303 - Ensure that visiting a page with an iframe does not cause an entry to be injected in the Cookies subpanel in the Control Centre; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D14776

--HG--
extra : moz-landing-system : lando
2018-12-18 18:33:26 +00:00
Brindusan Cristian
d2dd4a1581 Backed out changeset 80bcfbcc44ea (bug 1511303) for bc failures on browser_alltabslistener.js. CLOSED TREE 2018-12-18 18:39:39 +02:00
Ehsan Akhgari
14c2b81c65 Bug 1511303 - Ensure that visiting a page with an iframe does not cause an entry to be injected in the Cookies subpanel in the Control Centre r=baku
Differential Revision: https://phabricator.services.mozilla.com/D14776

--HG--
extra : moz-landing-system : lando
2018-12-18 15:18:49 +00:00
James Willcox
6042d9482d Bug 1511132 - Disable ServiceWindowClients.openWindow() under GeckoView r=asuth
This also disables test_openWindow.html when running in GeckoView.

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

--HG--
extra : moz-landing-system : lando
2018-12-14 21:28:14 +00: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
Jean-Yves Avenard
b61cc66043 Bug 1512456 - P7. Chain promises so they can be exclusive. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D14031

--HG--
extra : moz-landing-system : lando
2018-12-11 10:54:20 +00:00
Jean-Yves Avenard
dc9ee1f6ee Bug 1512456 - P6. Tidy up some MozPromise usage. r=gerald
Make consistent use of MozPromise chaining where possible and remove unnecessary refcount.

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

--HG--
extra : moz-landing-system : lando
2018-12-11 10:54:48 +00:00
Jean-Yves Avenard
ebce26bb61 Bug 1512456 - P3. Minor cleanup usage of GenericPromise. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D14026

--HG--
extra : moz-landing-system : lando
2018-12-11 10:46:21 +00:00
Jean-Yves Avenard
48517afae6 Bug 1512298 - Make IPDL MozPromise exclusive. r=gerald,froydnj
MozPromise most common use is to have an single or exclusive listener. By making the MozPromise generated by IPDL exclusive we can also use move semantics.

While at it, we also use move semantics for the ResponseRejectReason and via the callback's reject method so that the lambda used with the MozPromise::Then can be identical to the one used by the IPDL callback.
As it currently is, it provides no advantage over a copy as it's just an enum; however, this will facilitate future changes where it may not be.

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

--HG--
extra : moz-landing-system : lando
2018-12-11 19:22:26 +00:00
Mark Banner
8c00ef3f30 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D13746

--HG--
extra : moz-landing-system : lando
2018-12-11 13:15:08 +00:00
Jean-Yves Avenard
44594dd77a Bug 1510265 - P1. Enforce template-parameter classes restrictions in MozPromise. r=gerald
And some required fixes to make things compile.

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

--HG--
extra : moz-landing-system : lando
2018-12-06 16:26:01 +00:00
Ciure Andrei
ed617be144 Backed out 2 changesets (bug 1512052)for causing build bustages CLOSED TREE
Backed out changeset 4773a3f46c22 (bug 1512052)
Backed out changeset 2f48c5afbe57 (bug 1512052)

--HG--
rename : browser/components/attribution/test/xpcshell/.eslintrc.js => browser/components/attribution/test/.eslintrc.js
2018-12-05 05:47:39 +02:00
Mark Banner
8256078237 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Depends on D13745

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

--HG--
extra : moz-landing-system : lando
2018-12-04 22:27:35 +00:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Blake Kaplan
13fc0d95f9 Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth
Currently, we are required to fire updatefound in three cases:

  * When a "soft" update finds an update.
  * When a call to ServiceWorkerRegistration.update finds an update.
  * When ServiceWorkerContainer.register registers a ServiceWorker.

In the first case, there are no requirements on the timing of the event. For
the second two cases, however, the promise returned by update or register
needs to resolve before updatefound is dispatched. We hack around the first
case by explicitly counting the calls to update and only dispatching
updatefound when the final promise resolves. In the case of SWC.register, the
ServiceWorkerRegistration object might not even exist when it notices that we
need to fire updatefound, which suggests that we need some code to tell it
when to fire the event; except that in the soft update case, there is no
obvious place to do so. So, the easiest way to resolve this is to have the
parent process tell the ServiceWorkerRegistration when to fire updatefound
itself. This way, we don't rely on any tricky timing and everything is
consistent with itself.

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

--HG--
extra : moz-landing-system : lando
2018-11-29 23:06:32 +00:00
Ehsan Akhgari
2febd96e7e Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 00:54:56 +00:00
Cosmin Sabou
0afa5aa670 Backed out 2 changesets (bug 1508472) for causing build bustages on JobScheduler_posix.cpp. CLOSED TREE
Backed out changeset af951294cf96 (bug 1508472)
Backed out changeset 2320933cb7bc (bug 1508472)
2018-11-28 00:08:11 +02:00
Ehsan Akhgari
7c937c2747 Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-27 21:36:18 +00:00
Andreea Pavel
945463d394 Backed out changeset 11d6688b953f (bug 1508472) for build bustages on a CLOSED TREE 2018-11-27 18:28:30 +02:00
Ehsan Akhgari
d0a3a76106 Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-27 15:18:32 +00:00
Gabriele Svelto
566f669d07 Bug 1509450 - Remove unnecessary inclusions of ContentParent.h and ContentChild.h r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D12728

--HG--
extra : moz-landing-system : lando
2018-11-26 14:49:44 +00:00
Perry Jiang
66c2ebb86a Bug 1509135 - Only define UnregisterCallback once r=mrbkap
Differential Revision: https://phabricator.services.mozilla.com/D13018

--HG--
extra : moz-landing-system : lando
2018-11-27 00:58:44 +00:00
Andrea Marchesini
fd9ee3b364 Bug 1438945 - Part 5: SharedWorker browser test. r=asuth
--HG--
extra : rebase_source : 065a7528393499225a0da4206f22a7638c534bea
2018-11-19 15:18:21 -08:00
Perry Jiang
71c4ea8b76 Bug 1264177 - Implement FetchEvent.resultingClientId r=edenchuang,mrbkap
- Expose FetchEvent.resultingClientId on non-subresource, non-"report"-destination requests.
- Delay Clients.get(FetchEvent.resultingClientId) resolution until the resulting client is execution ready.
- Add WPTs to test for existence of resultingClientId and Clients.get promise resolution values.

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

--HG--
extra : moz-landing-system : lando
2018-11-15 08:28:23 +00:00
Narcis Beleuzu
ca3f27dd60 Backed out changeset 6ad8b10cc0d6 (bug 1264177) for wpt failures on fetch-destination-no-load-event.https.html . CLOSED TREE 2018-11-12 23:36:21 +02:00
Perry Jiang
84d5b8eb27 Bug 1264177 - Implement FetchEvent.resultingClientId r=edenchuang,mrbkap
- Expose FetchEvent.resultingClientId on non-subresource, non-"report"-destination requests.
- Delay Clients.get(FetchEvent.resultingClientId) resolution until the resulting client is execution ready.
- Add WPTs to test for existence of resultingClientId and Clients.get promise resolution values.

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

--HG--
extra : moz-landing-system : lando
2018-11-12 20:10:41 +00:00
Zibi Braniecki
7632ed1c46 Bug 1362774 - Several dom/workers tests need to wait for the environment to be ready. r=asuth
MozReview-Commit-ID: 4fZeNh635i1

--HG--
extra : rebase_source : b11bb682709e019630f1330117b06a24462f7488
2017-09-13 01:27:17 -07:00
Andrea Marchesini
223d7172bf Bug 1486698 - Update Fetch+Stream implementation to throw when the stream is disturbed or locked, r=bz
In this patch, I went through any place in DOM fetch code, where there are
ReadableStreams and update the locked, disturbed, readable checks.

Because we expose streams more often, we need an extra care in the use of
ErrorResult objects. JS streams can now throw exceptions and we need to handle
them.

This patch also fixes a bug in FileStreamReader::CloseAndRelease() which could
be called in case mReader creation fails.
2018-10-31 18:30:18 +01:00
Ehsan Akhgari
8a4d8f4fa4 Bug 1501978 - Part 2: Remove the browser.contentblocking.enabled pref from the tests that set it to true needlessly r=baku
Depends on D10074

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

--HG--
extra : moz-landing-system : lando
2018-10-30 07:47:56 +00:00
Gurzau Raul
08a80deaa6 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-10-30 00:04:59 +02:00
Perry Jiang
2d17bf3ec7 Bug 1354577 - require ServiceWorkerContainer.register() to only accept JavaScript MIME types r=edenchuang
- Change "ServiceWorkerRegisterMimeTypeError" to "ServiceWorkerRegisterMimeTypeError2"
to account for more acceptable MIME types

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

--HG--
extra : moz-landing-system : lando
2018-10-29 15:09:40 +00:00
Perry Jiang
96d721e851 Bug 1357290 - move test_update_missing_imported_script.html to WPT r=edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D6439

--HG--
extra : moz-landing-system : lando
2018-10-25 19:01:20 +00:00
Ehsan Akhgari
43f23459b2 Bug 1501286 - Part 4: Remove the browser.contentblocking.ui.enabled pref from several tests which now set it needlessly r=johannh
Depends on D9521

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

--HG--
extra : moz-landing-system : lando
2018-10-25 16:46:42 +00:00
Andrea Marchesini
e8e66c0565 Bug 1499995 - part 3 - Tests for nested iframes controlled by ServiceWorkers, r=ehsan 2018-10-25 10:44:12 +02:00
Andrea Marchesini
5993c288fc Bug 1502802 - Implement PostMessageOptions for Client and ServiceWorker, r=smaug 2018-10-29 16:26:30 +01:00
Julian Descottes
2fcd6cb020 Bug 1499096 - Update tests using ok() to is();r=Standard8
This changeset updates all the test that were wrongly using ok() and wanted to
use is() AND for which the assert is still passing without any modification
required.

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

--HG--
extra : moz-landing-system : lando
2018-10-23 07:12:23 +00:00
Perry Jiang
0516414da1 Bug 1399446 - implement ServiceWorkerGlobalScope and ServiceWorkerContainer onmessageerror event handlers r=edenchuang,baku
Differential Revision: https://phabricator.services.mozilla.com/D5213

--HG--
extra : moz-landing-system : lando
2018-10-22 21:22:25 +00:00
Valentin Gosu
5ac68030f7 Bug 1487100 - Allow calling nsICacheInfoChannel.preferAlternativeDataType(altDataType, contentType) multiple times r=michal,luke
This patch changes the way we set and handle the preferred alternate data type.
It is no longer just one choice, but a set of preferences, each conditional
on the contentType of the resource.

For example:
  var cc = chan.QueryInterface(Ci.nsICacheInfoChannel);
  cc.preferAlternativeDataType("js-bytecode", "text/javascript");
  cc.preferAlternativeDataType("ammended-text", "text/plain");
  cc.preferAlternativeDataType("something-else", "");

When loaded from the cache, the available alt-data type will be checked against
"js-bytecode" if the contentType is "text/javascript", "ammended-text" if the contentType is "text/plain" or "something-else" for all contentTypes.
Note that the alt-data type could be "something-else" even if the contentType is "text/javascript".

The preferences are saved as an nsTArray<mozilla::Tuple<nsCString, nsCString>>.

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

--HG--
extra : rebase_source : eb4961f05a52e557e7d2d986d59e0a2cf18a3447
extra : source : dd1c31ea78c2b15d14750d137037a54d50719997
2018-10-17 13:58:30 +00:00
Dorel Luca
1a48c88d19 Backed out 2 changesets (bug 1487100) for XPCShell failures in netwerk/test/unit_ipc/test_alt-data_simple_wrap.js
Backed out changeset 7f9d03c29a6f (bug 1487100)
Backed out changeset dd1c31ea78c2 (bug 1487100)
2018-10-18 05:51:42 +03:00
Valentin Gosu
e392dbc5dd Bug 1487100 - Allow calling nsICacheInfoChannel.preferAlternativeDataType(altDataType, contentType) multiple times r=michal,luke
This patch changes the way we set and handle the preferred alternate data type.
It is no longer just one choice, but a set of preferences, each conditional
on the contentType of the resource.

For example:
  var cc = chan.QueryInterface(Ci.nsICacheInfoChannel);
  cc.preferAlternativeDataType("js-bytecode", "text/javascript");
  cc.preferAlternativeDataType("ammended-text", "text/plain");
  cc.preferAlternativeDataType("something-else", "");

When loaded from the cache, the available alt-data type will be checked against
"js-bytecode" if the contentType is "text/javascript", "ammended-text" if the contentType is "text/plain" or "something-else" for all contentTypes.
Note that the alt-data type could be "something-else" even if the contentType is "text/javascript".

The preferences are saved as an nsTArray<mozilla::Tuple<nsCString, nsCString>>.

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

--HG--
extra : moz-landing-system : lando
2018-10-17 13:58:30 +00:00
Andrea Marchesini
dce8b79fdd Bug 1499397 - ServiceWorker tests should run with cookiePolicy 0, r=ehsan 2018-10-17 07:37:53 +02:00
Coroiu Cristina
dd67a9014b Backed out changeset 7c1aecbca3dd (bug 1498278) for causing leaks at at mozilla::extensions::ChannelWrapper::Get
--HG--
rename : browser/extensions/webcompat/injections.js => browser/extensions/webcompat/webextension/background.js
rename : browser/extensions/webcompat/injections/css/bug0000000-dummy-css-injection.css => browser/extensions/webcompat/webextension/injections/css/bug0000000-dummy-css-injection.css
rename : browser/extensions/webcompat/injections/js/bug0000000-dummy-js-injection.js => browser/extensions/webcompat/webextension/injections/js/bug0000000-dummy-js-injection.js
rename : browser/extensions/webcompat/injections/js/bug1452707-window.controllers-shim-ib.absa.co.za.js => browser/extensions/webcompat/webextension/injections/js/bug1452707-window.controllers-shim-ib.absa.co.za.js
rename : browser/extensions/webcompat/injections/js/bug1457335-histography.io-ua-change.js => browser/extensions/webcompat/webextension/injections/js/bug1457335-histography.io-ua-change.js
rename : browser/extensions/webcompat/injections/js/bug1472075-bankofamerica.com-ua-change.js => browser/extensions/webcompat/webextension/injections/js/bug1472075-bankofamerica.com-ua-change.js
rename : browser/extensions/webcompat/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js => browser/extensions/webcompat/webextension/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js
rename : browser/extensions/webcompat/injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js => browser/extensions/webcompat/webextension/injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js
2018-10-12 23:12:07 +03:00
Dennis Schubert
e4d812b56a Bug 1498278 - Import WebExtension sources for the WebCompat GoFaster Addon to Desktop. r=aswan
Differential Revision: https://phabricator.services.mozilla.com/D8422

--HG--
rename : browser/extensions/webcompat/webextension/background.js => browser/extensions/webcompat/injections.js
rename : browser/extensions/webcompat/webextension/injections/css/bug0000000-dummy-css-injection.css => browser/extensions/webcompat/injections/css/bug0000000-dummy-css-injection.css
rename : browser/extensions/webcompat/webextension/injections/js/bug0000000-dummy-js-injection.js => browser/extensions/webcompat/injections/js/bug0000000-dummy-js-injection.js
rename : browser/extensions/webcompat/webextension/injections/js/bug1452707-window.controllers-shim-ib.absa.co.za.js => browser/extensions/webcompat/injections/js/bug1452707-window.controllers-shim-ib.absa.co.za.js
rename : browser/extensions/webcompat/webextension/injections/js/bug1457335-histography.io-ua-change.js => browser/extensions/webcompat/injections/js/bug1457335-histography.io-ua-change.js
rename : browser/extensions/webcompat/webextension/injections/js/bug1472075-bankofamerica.com-ua-change.js => browser/extensions/webcompat/injections/js/bug1472075-bankofamerica.com-ua-change.js
rename : browser/extensions/webcompat/webextension/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js => browser/extensions/webcompat/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js
rename : browser/extensions/webcompat/webextension/injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js => browser/extensions/webcompat/injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js
extra : moz-landing-system : lando
2018-10-12 15:37:37 +00:00
Andrea Marchesini
dc8ad03720 Bug 1495285 - Introduce TrackingDummyChannel to annotate channels before being intercepted by ServiceWorkers, r=francois, r=mayhemer, f=asuth 2018-10-12 11:40:36 +02:00