Граф коммитов

120 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Kingston 3421b8fcff Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin
Replacing js and text occurences of asyncOpen2
Replacing open2 with open

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

--HG--
rename : layout/style/test/test_asyncopen2.html => layout/style/test/test_asyncopen.html
extra : moz-landing-system : lando
2019-02-12 16:08:25 +00:00
Dorel Luca 313155b999 Backed out 4 changesets (bug 1521808) for build bustage. CLOSED TREE
Backed out changeset 80aeea5f7abe (bug 1521808)
Backed out changeset c8c151d92c03 (bug 1521808)
Backed out changeset cc0a5c7dabb4 (bug 1521808)
Backed out changeset 8d5174a560fa (bug 1521808)
2019-02-12 14:54:45 +02:00
Valentin Gosu 1c83ed37de Bug 1521808 - Add xpcshell-test for CrossOriginOpenerPolicy r=mayhemer,nika,annevk
Differential Revision: https://phabricator.services.mozilla.com/D18246

--HG--
extra : moz-landing-system : lando
2019-02-12 12:16:28 +00:00
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
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 61a7f9a598 Bug 1260399 - Remove deprecated messages in nsICookieManager methods - part 1 - nsICookieManager.add(), r=ehsan 2018-09-24 11:37:56 +02:00
Diego Pino Garcia 0f11b0a3d3 Bug 1483986 - Remove sync versions of document.cookie getter/setter; r=ehsan,froydnj 2018-09-21 23:01:32 -04:00
Valentin Gosu aac6fb9470 Bug 1460609 - Cookies are for parents r=mayhemer
Make sure cookies aren't saved on channel headers in the content process.
Adds test to verify that this works, and removes tests that expected cookie headers to be visible to the child.

MozReview-Commit-ID: KOB83xpuAlF

--HG--
extra : rebase_source : 6f9a5ef570fb23200acf8d75285e67d80b7c27f0
2018-06-07 14:12:37 +02:00
Patrick McManus f18aa94399 Bug 1462357 - remove the channel and socket interface id r=bagder,baku
the id was a b2g feature only settable via chrome privd xhr and is no
longer active in the code base

MozReview-Commit-ID: 84GPNvhvjNb

--HG--
extra : rebase_source : ab5c2229b98e1407b8b74ef2ee00dcfea45e046a
2018-05-16 16:05:03 -04:00
Michal Novotny ee8f43208a Bug 1448476 - Cache entry corruption after writing the alternate data. r=honzab
When writing to alt-data output stream fails for whatever reason, we now try to
truncate alternative data and keep the original data instead of dooming the
whole entry. The patch also changes how is the predicted size passed to the
cache. Instead of a dedicated method it's now an argument of openOutputStream
and openAlternativeOutputStream methods which fail in case the entry would
exceed the allowed limit.
2018-04-25 07:01:00 +03:00
Valentin Gosu ba3f9989ec Bug 1426353 - Do not allow the parent process to consume alt-data generated in the content process. r=michal
MozReview-Commit-ID: htQ28muaBI

--HG--
rename : netwerk/test/unit/test_alt-data_simple.js => netwerk/test/unit/test_alt-data_cross_process.js
rename : netwerk/test/unit_ipc/test_alt-data_simple_wrap.js => netwerk/test/unit_ipc/test_alt-data_cross_process_wrap.js
2018-03-06 02:44:51 +01:00
Andrew McCreight 754a4bcd3c Bug 1432992, part 2 - Manually remove some empty blocks. r=florian
Also, remove a now-obsolete comment from placesOverlay.xul and remove
some now-empty XPCShell test head files.

MozReview-Commit-ID: 6kKVQu8FAL3

--HG--
extra : rebase_source : 7dd05818d68a15bd170af734078db4ba45029d80
2018-01-25 16:52:25 -08:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Kris Maglione 918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou 9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione 6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Florian Quèze 0f55cd45be Bug 1421992 - script-generated patch to replace do_execute_soon, do_print and do_register_cleanup with executeSoon, info and registerCleanupFunction, rs=Gijs. 2017-12-21 11:10:23 +01:00
Florian Quèze 032c961e0a Bug 1421992 - script-generated patch to replace do_check_* functions with their Assert.* equivalents, rs=Gijs. 2017-12-21 11:08:17 +01:00
Mark Banner 099e4fa549 Bug 1421458 - Add more initial configuration setup and prepare .eslintignore for enabling ESLint on more xpcshell-test directories. r=mossop
MozReview-Commit-ID: 4nbTuNNnAdZ

--HG--
extra : rebase_source : 7131f0ddad79d28615a5799c657972bd84a69180
2017-11-28 22:57:08 +00:00
Valentin Gosu 016e88352f Bug 1411703 - test_original_sent_received_head_wrap.js fails locally r=dragana
Test fails when running locally:
./mach test netwerk/test/unit_ipc/test_original_sent_received_head_wrap.js

 Error: cannot open file '/home/user/mozilla-central/obj-ff-dbg/_tests/xpcshell/netwerk/test/unit/test_original_sent_received_head.js' for reading at /home/icecold/mozilla-central/testing/xpcshell/head.js:648


MozReview-Commit-ID: DcOWOWlH5ch

--HG--
extra : rebase_source : 30c5e28c61adace06cd49ca216108a277e37d58d
2017-10-25 21:41:48 +02:00
Valentin Gosu 13f4c5ecaf Bug 1408552 - Make sure we only instantiate CacheStorageService in the main process r=mayhemer
* A memory leak occurs when this happens in the content process
* I added an assertion that we only create it in the parent process

MozReview-Commit-ID: 1UTyusRg0qx

--HG--
extra : rebase_source : 400cfb21ee094ad33e15681f213af6dbe20ebbf5
2017-10-18 21:10:22 +02:00
Sebastian Hengst 538797050e Backed out changeset dfb238189002 (bug 1408552) for asserting in xpcshell's netwerk/test/unit_ipc/test_cache-entry-id_wrap.js. r=backout on a CLOSED TREE 2017-10-18 15:56:09 +02:00
Valentin Gosu ec70ea390d Bug 1408552 - Make sure we only instantiate CacheStorageService in the main process r=mayhemer
* A memory leak occurs when this happens in the content process
* I added an assertion that we only create it in the parent process

MozReview-Commit-ID: 1UTyusRg0qx

--HG--
extra : rebase_source : 646c1c82d141cadc6c1b19843b4cc750e1a1ce59
2017-10-18 14:35:33 +02:00
Ho-Pang Hsu 271618f7dd Bug 1395202 - Part 3: Create a testcase for nsICacheInfoChannel::cacheEntryId. r=michal, f=junior 2017-10-10 04:10:00 -04:00
Sebastian Hengst 44b9915533 Backed out changeset 7598b4ed02f6 (bug 1395202) 2017-10-10 15:42:07 +02:00
Ho-Pang Hsu 23754c0225 Bug 1395202 - Part 3: Create a testcase for nsICacheInfoChannel::cacheEntryId. r=michal, f=junior 2017-10-10 04:10:00 -04:00
Amy Chung 3a958eaecb Bug 1331680 - Part 4: Tests for document.cookie behaving synchronously and reflecting changes from the parent process. r=jdm
* * *
Bug 1331680 - modification part5 -- fixed try server errors. r=jdm
2017-08-03 19:02:06 +08:00
Florian Quèze 2924991bf6 Bug 1368456 - remove Promise.jsm imports in tests, r=mconley. 2017-06-23 11:25:52 +02:00
Ehsan Akhgari 87f01dcea3 Bug 1363311 - Honor Set-Cookie headers in multipart/mixed response boundary headers in e10s mode; r=jdm 2017-05-24 17:32:32 -04:00
Florian Queze 37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Florian Queze 95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Shih-Chiang Chien 9c648e86fc Bug 1337721 - Part 2, add xpcshell test for channel priority. r=mayhemer
MozReview-Commit-ID: JbbRg63ufW9

--HG--
extra : rebase_source : 4a32499e62a9c3f9292311a3974d5759bf5a579e
2017-02-10 16:56:04 +08:00
Mark Banner 16e6d381ac Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps
MozReview-Commit-ID: 62Hp5ISxowJ

--HG--
extra : rebase_source : daa8efb3409031fea553f4fd0c9d0746e38dc308
extra : histedit_source : b4c23aacf678ba0d0ac9c09191a7c494ead11a08
2017-01-18 10:30:39 +00:00
Ehsan Akhgari ad51310cc1 Bug 1170190 - Part 3: Add tests for the e10s case too; r=mayhemer 2016-12-23 14:40:11 -05:00
Ehsan Akhgari eac76d9772 Bug 1310845 - Remove support for mozapp iframes; r=fabrice,jryans,baku,mcmanus
This patch removes support for mozapp iframes, leaving support for
mozbrowser iframes intact.  Some of the code has been rewritten in order
to phrase things in terms of mozbrowser only, as opposed to mozbrowser
or app.  In some places, code that was only useful with apps has been
completely removed, so that the APIs consumed can also be removed.  In
some places where the notion of appId was bleeding out of this API, now
we use NO_APP_ID.  Other notions of appId which were restricted to this
API have been removed.
2016-11-16 09:13:38 -05:00
Carsten "Tomcat" Book 3eacc680db Backed out changeset 7d1f7dd996f7 (bug 1310845) 2016-11-16 14:50:44 +01:00
Ehsan Akhgari cb369370b3 Bug 1310845 - Remove support for mozapp iframes; r=fabrice,jryans,baku,mcmanus
This patch removes support for mozapp iframes, leaving support for
mozbrowser iframes intact.  Some of the code has been rewritten in order
to phrase things in terms of mozbrowser only, as opposed to mozbrowser
or app.  In some places, code that was only useful with apps has been
completely removed, so that the APIs consumed can also be removed.  In
some places where the notion of appId was bleeding out of this API, now
we use NO_APP_ID.  Other notions of appId which were restricted to this
API have been removed.
2016-11-15 18:31:46 -05:00
Sebastian Hengst db89e7fcf4 Bug 1310297 - Remove test annotations using b2g, mulet or gonk: netwerk. r=RyanVM
MozReview-Commit-ID: F2Wm2m6Wrkf

--HG--
extra : rebase_source : bcc9ccffedc16682d872cf8748c2c185bb453fa2
2016-11-05 11:29:21 +01:00
Valentin Gosu d746e122c8 Bug 1307491 - (Part 1) Remove support for per-app-offline in netwerk/ [nukeb2g] r=bagder
* * *
Bug 1307491 - Remove support for per-app-offline [nukeb2g] r=bagder

MozReview-Commit-ID: FoweWBv9QyE

--HG--
extra : rebase_source : 0f6e0f0d19f108c3aef8b25cb6d605ecd338ee2b
2016-10-17 03:54:46 +02:00
Valentin Gosu 632626f639 Bug 1231565 - (Part 4) Test that large alt-data content can be saved, and that streaming works r=honzab
--HG--
rename : netwerk/test/unit/test_alt-data_simple.js => netwerk/test/unit/test_alt-data_stream.js
rename : netwerk/test/unit_ipc/test_alt-data_simple_wrap.js => netwerk/test/unit_ipc/test_alt-data_stream_wrap.js
2016-09-27 10:26:32 +02:00
Honza Bambas cd3ee4c951 Bug 1231565 - (Part 1) Basic test for alt-data representation in cache r=honzab 2016-03-22 11:42:00 +01:00
Tim Huang 19e68da566 Bug 1291652 - Part 3: Update tests for fetching originAttributes from the nsILoadInfo, but not from the nsILoadContext. r=mayhemer
--HG--
extra : rebase_source : ebb2beb2c1c8cde1ecb1f04c151c37ff6705077c
2016-08-22 08:41:00 -04:00
Wes Kocher 730c59fce4 Backed out changeset e1f3ed984607 (bug 1261585) for causing bug 1292586 a=backout 2016-08-22 11:29:04 -07:00
Dragana Damjanovic dd.mozilla@gmail.com 35cecae1b6 Bug 1261585 - Make nsITraceableChannel listener work with content encoding.r=jduell
--HG--
extra : rebase_source : 98c549ada53f64f66eb716801f0140da6b7252ef
2016-07-19 05:05:00 +02:00
Jarda Snajdr fd72aae3ac Bug 1274556 - Add a channelId attribute to nsIHttpChannel (unit test) r=hurley 2016-06-01 12:30:27 -07:00