Commit Graph

152 Commits

Author SHA1 Message Date
Andrea Marchesini
62236a7f79 Bug 1550050 - Fix intermittent failures in test_same_base_domain_3.html forcing no cache via HTTP headers, r=valentin
At the end of each test, file_chromecommon.js deletes all the cookies, but it
doesn't invalidate the network cache. Some of the files are shared between
tests. When they are loaded from the cache, we don't set the cookies and,
because of this, the tests were reporting a wrong cookie number.

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

--HG--
extra : moz-landing-system : lando
2019-05-17 11:20:19 +00:00
Andrea Marchesini
c97597a819 Bug 1457503 - Removal of http-equiv cookies. draft, r=jkt
Differential Revision: https://phabricator.services.mozilla.com/D29841

--HG--
extra : moz-landing-system : lando
2019-05-08 13:50:45 +00:00
Ehsan Akhgari
3252b3943e Bug 1547397 - Part 1: Move some mochitests and browser-chrome tests for cookies out of extensions/cookies; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D29117

--HG--
rename : extensions/cookie/test/browser_test_favicon.js => netwerk/test/browser/browser_test_favicon.js
rename : extensions/cookie/test/damonbowling.jpg => netwerk/test/browser/damonbowling.jpg
rename : extensions/cookie/test/damonbowling.jpg^headers^ => netwerk/test/browser/damonbowling.jpg^headers^
rename : extensions/cookie/test/beltzner.jpg => netwerk/test/mochitests/beltzner.jpg
rename : extensions/cookie/test/beltzner.jpg^headers^ => netwerk/test/mochitests/beltzner.jpg^headers^
rename : extensions/cookie/test/file_chromecommon.js => netwerk/test/mochitests/file_chromecommon.js
rename : extensions/cookie/test/file_domain_hierarchy_inner.html => netwerk/test/mochitests/file_domain_hierarchy_inner.html
rename : extensions/cookie/test/file_domain_hierarchy_inner_inner.html => netwerk/test/mochitests/file_domain_hierarchy_inner_inner.html
rename : extensions/cookie/test/file_domain_hierarchy_inner_inner_inner.html => netwerk/test/mochitests/file_domain_hierarchy_inner_inner_inner.html
rename : extensions/cookie/test/file_domain_inner.html => netwerk/test/mochitests/file_domain_inner.html
rename : extensions/cookie/test/file_domain_inner_inner.html => netwerk/test/mochitests/file_domain_inner_inner.html
rename : extensions/cookie/test/file_image_inner.html => netwerk/test/mochitests/file_image_inner.html
rename : extensions/cookie/test/file_image_inner_inner.html => netwerk/test/mochitests/file_image_inner_inner.html
rename : extensions/cookie/test/file_loadflags_inner.html => netwerk/test/mochitests/file_loadflags_inner.html
rename : extensions/cookie/test/file_localhost_inner.html => netwerk/test/mochitests/file_localhost_inner.html
rename : extensions/cookie/test/file_loopback_inner.html => netwerk/test/mochitests/file_loopback_inner.html
rename : extensions/cookie/test/file_subdomain_inner.html => netwerk/test/mochitests/file_subdomain_inner.html
rename : extensions/cookie/test/file_testcommon.js => netwerk/test/mochitests/file_testcommon.js
rename : extensions/cookie/test/file_testloadflags.js => netwerk/test/mochitests/file_testloadflags.js
rename : extensions/cookie/test/file_testloadflags_chromescript.js => netwerk/test/mochitests/file_testloadflags_chromescript.js
rename : extensions/cookie/test/image1.png => netwerk/test/mochitests/image1.png
rename : extensions/cookie/test/image1.png^headers^ => netwerk/test/mochitests/image1.png^headers^
rename : extensions/cookie/test/image1.png => netwerk/test/mochitests/image2.png
rename : extensions/cookie/test/image2.png^headers^ => netwerk/test/mochitests/image2.png^headers^
rename : extensions/cookie/test/test1.css => netwerk/test/mochitests/test1.css
rename : extensions/cookie/test/test1.css^headers^ => netwerk/test/mochitests/test1.css^headers^
rename : extensions/cookie/test/test1.css => netwerk/test/mochitests/test2.css
rename : extensions/cookie/test/test2.css^headers^ => netwerk/test/mochitests/test2.css^headers^
rename : extensions/cookie/test/test_different_domain_in_hierarchy.html => netwerk/test/mochitests/test_different_domain_in_hierarchy.html
rename : extensions/cookie/test/test_differentdomain.html => netwerk/test/mochitests/test_differentdomain.html
rename : extensions/cookie/test/test_image.html => netwerk/test/mochitests/test_image.html
rename : extensions/cookie/test/test_loadflags.html => netwerk/test/mochitests/test_loadflags.html
rename : extensions/cookie/test/test_same_base_domain.html => netwerk/test/mochitests/test_same_base_domain.html
rename : extensions/cookie/test/test_same_base_domain_2.html => netwerk/test/mochitests/test_same_base_domain_2.html
rename : extensions/cookie/test/test_same_base_domain_3.html => netwerk/test/mochitests/test_same_base_domain_3.html
rename : extensions/cookie/test/test_same_base_domain_4.html => netwerk/test/mochitests/test_same_base_domain_4.html
rename : extensions/cookie/test/test_same_base_domain_5.html => netwerk/test/mochitests/test_same_base_domain_5.html
rename : extensions/cookie/test/test_same_base_domain_6.html => netwerk/test/mochitests/test_same_base_domain_6.html
rename : extensions/cookie/test/test_samedomain.html => netwerk/test/mochitests/test_samedomain.html
extra : moz-landing-system : lando
2019-04-30 14:07:12 +00:00
Brian Grinstead
ede8c44ef2 Bug 1544322 - Part 2.1 - Remove the [type] attribute for one-liner <script> tags loading files in /tests/SimpleTest/ in everything except for dom/ r=bzbarsky
This excludes dom/, otherwise the file size is too large for phabricator to handle.

This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 2` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 03:50:44 +00:00
Mark Banner
dba6983e75 Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D23850

--HG--
extra : moz-landing-system : lando
2019-03-28 09:38:14 +00:00
Ehsan Akhgari
66c9fa5c58 Bug 1529836 - Part 2: Add a test for capping the maximum life-time of client-side cookies; r=baku
Depends on D20780

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

--HG--
extra : moz-landing-system : lando
2019-02-26 18:34:10 +00:00
Narcis Beleuzu
36e0294e17 Backed out 2 changesets (bug 1529836) for mochitest failures on test_documentcookies_maxage.html . CLOSED TREE
Backed out changeset d8ec58f95f80 (bug 1529836)
Backed out changeset 2fa205089aea (bug 1529836)
2019-02-26 17:57:02 +02:00
Ehsan Akhgari
c8ce081831 Bug 1529836 - Part 2: Add a test for capping the maximum life-time of client-side cookies; r=baku
Depends on D20780

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

--HG--
extra : moz-landing-system : lando
2019-02-25 06:57:10 +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
Dave Townsend
e8b1884f16 Bug 1518746: Switch to load events for all tested resources. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D16901

--HG--
extra : moz-landing-system : lando
2019-01-21 07:48:26 +00:00
Dave Townsend
6fa8b55502 Bug 1518746: Add additional logging to test_accept_header.html. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D16485

--HG--
extra : moz-landing-system : lando
2019-01-14 19:36:26 +00:00
Andrea Marchesini
7728c152a2 Bug 1417463 - Default accept header should follow the fetch spec - tests, r=mayhemer 2019-01-08 23:36:17 +01:00
Andrea Marchesini
6a82516944 Bug 1502055 - test for Clear-Site-Data + 304 http status r=mayhemer
--HG--
extra : histedit_source : d0fece4fbb82cca9e70e851d18f40f6edb8cf868
2018-10-31 06:46:00 +02:00
Ehsan Akhgari
abebd286d4 Bug 1503201 - Add a crash test for fetching a subresource served with an invalid authentication realm r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D10570

--HG--
extra : moz-landing-system : lando
2018-11-01 16:36:52 +00:00
Mark Banner
a26105ff45 Bug 1501662 - Add more .eslintrc.js files for test directories (dom, modules, netwerk and parser). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D9661

--HG--
extra : moz-landing-system : lando
2018-10-24 19:11:17 +00:00
Joel Maher
50b91c0a14 Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
Florian Quèze
c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Andrew McCreight
b7bb86d0d4 Bug 1436184 - Remove definitions of Ci, Cr, Cc, and Cu from httpd.js and .sjs files. r=florian
MozReview-Commit-ID: IKKb9zr2OSf

--HG--
extra : rebase_source : 72d949405c18e6d421422e7865182352eee0c407
2018-02-06 15:03:13 -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
Florian Quèze
2b1c8dccb6 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01: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
Amy Chung
a0e6c2af00 Bug 1425031 - Don't broadcast to content processes cookie updates that initiated in content processes. r=jdm 2018-01-12 12:53:00 -05: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
Brindusan Cristian
dbf026ac00 Backed out changeset 1a64ce266ba5 (bug 1425031) for mochitest failures on test_1425031.html on a CLOSED TREE 2018-01-30 00:20:25 +02:00
Amy Chung
6c7cd2d790 Bug 1425031 - Don't broadcast to content processes cookie updates that initiated in content processes. r=jdm 2018-01-12 12:53:00 -05:00
Kris Maglione
aec63e140c Backed out 3 changesets (bug 1431533) for Android mochitest bustage. CLOSED TREE
MozReview-Commit-ID: 5ubE9EMQpZ9

--HG--
extra : histedit_source : df68d7595925c07d9d6e8bacc2c46e69556f479a%2C72b768b9825e20ede6603ead75f871c50dc041f7
2018-01-24 22:04:59 -08:00
Kris Maglione
30b3a49bfd Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
MozReview-Commit-ID: 8V1ZT53ReiP

--HG--
extra : rebase_source : 12b5f8c3e125111db7382eb3d7d20a99fb2c35b3
extra : absorb_source : e99fa7f6eee02e7e6cadeb898c7fcf6dac9c902a
extra : histedit_source : d0dfc31fadc2b81d341c9d0cd1efec02923c003b
2018-01-24 15:48:47 -08:00
Kris Maglione
ded77ac796 Bug 1431533: Part 3 - Define ChromeUtils on chrome-privileged Sandboxes that need it. r=mixedpuppy
This is necessary before we enable the ESLint rule to require using
ChromeUtils for module imports rather than older methods.

MozReview-Commit-ID: mKqByUS0o2

--HG--
extra : rebase_source : d4b856aac7ff7eddc37cbf591c4e6522c45453e2
extra : histedit_source : 1ca2b6031e480fb44a15991241901224acc9e52f
2018-01-18 14:52:39 -08:00
Luke Crouch
111ae8a75d Bug 587523 - rename referer.userControlPolicy to referer.defaultPolicy r=valentin
MozReview-Commit-ID: A2hkYfdTCR9

--HG--
extra : rebase_source : 6d3775da80338b66eee44f13ba177f29933dd114
2018-01-10 16:51:10 -06:00
Amy Chung
1bca7e374d Bug 1425292 - Add test for being unable to use document.cookie to access cookie after the non-httponly cookie modifies to httponly cookie. r=jdm 2017-12-22 16:08:53 +08:00
Shih-Chiang Chien
be3edff94c Bug 1404454 - use about:blank as the inital page of the testing iframe. r=dragana
In our test script we set the unload handler on the inner iframe earlier than the page is loaded, therefore it pass the origin check since the contentWindow object is for about:blank.
Security error will raise if the OnStartRequest for that iframe is received beforehand.
Use about:blank can guarantee to have same-origin window on the inner iframe.

MozReview-Commit-ID: 8AiwGIfoF4

--HG--
extra : rebase_source : cfad1803a61719470f8240700ac917c4931e3dfe
2017-12-09 20:31:29 -06:00
Francois Marier
5d8fa6f351 Bug 446344 - Implement Origin header CSRF mitigation. r=ckerschb,dragana
MozReview-Commit-ID: EZpGo0UfmUP

--HG--
extra : rebase_source : dce83c8314148c104e47ae322c4d578e96986ea3
extra : source : d4747fd86a331aed7b524b509f915f0c9dd6044f
2017-11-24 17:35:05 -08:00
Shih-Chiang Chien
25a29bf7ad Bug 1396395 - Part 2, add test case. r=dragana
MozReview-Commit-ID: 95RPLxNix4W

--HG--
extra : rebase_source : e6b97e01f4c8afc81bf049e2914d93628008a4f2
2017-09-15 16:01:57 +08: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
Junior Hsu
84e58e3864 Bug 1373198 - Part 4: disable rcwn for necko mochitest tests which require deterministic cache behavior, r=michal 2017-06-16 09:32:00 +02:00
Andrew McCreight
31e39883db Bug 1375262 - Add the ability to pass sandbox options to SpecialPowers.loadChromeScript(). r=jmaher
SpecialPowers.loadChromeScript() sends a script to the child process,
then creates a sandbox, and runs the script in that sandbox. There are
various sandboxOptions that can be passed when creating a sandbox, and
it would be nice to have that functionality for loadChromeScript.

I just need this for wantGlobalProperties, but I might as well make it
as general as possible. I'm not sure all of the types it can take can
actually be serialized across processes, but I guess that's okay.

MozReview-Commit-ID: GoJjXdjizFk

--HG--
extra : rebase_source : 9c2bc190dbf5a080978953cffd64205e8b816367
2017-06-20 15:50:20 -07:00
Paolo Amadini
10ee6a5c4e Bug 1362970 - Part 2 - Script-generated patch to convert .then(null, ...) to .catch(...). r=florian
Changes to Promise tests designed to test .then(null) have been reverted, and the browser/extensions directory was excluded because the projects it contains have a separate process for accepting changes.

MozReview-Commit-ID: 1buqgX1EP4P

--HG--
extra : rebase_source : 3a9ea310d3e4a8642aabbc10636c04bfe2e77070
2017-06-19 11:32:37 +01:00
Thomas Nguyen
262347b745 Bug 1351146 - P2 - Update test case and usage of nsIRedirectHistoryEntry interface. r=dragana
MozReview-Commit-ID: s61VV5CLx8
2017-05-25 19:42:00 +02: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
Ehsan Akhgari
929501a6eb Bug 1351980 - Initialize and uninitialize UserAgentOverrides.jsm for Firefox; r=mconley 2017-04-04 21:18:21 -04:00
Ehsan Akhgari
30f6ca0075 Bug 1347425 - Part 2: Add a test for replacing multiple occurrences of a regex in the site-specific UA override; r=mcmanus 2017-03-28 22:10:51 -04:00
Ehsan Akhgari
c2e08ee61a Bug 1347425 - Part 1: Move site-specific Navigator.userAgent overrides to a more efficient C++ implementation; r=baku,schien
Necko computes this information in order to set the User-Agent header in
the parent process.  This header is set on all outgoing requests, and
therefore in the content process we can easily copy the value of this
header from the document channel object instead of the inefficient sync
IPC that currently happens in order to access the JavaScript
implementation living in the parent process.
2017-03-28 22:10:33 -04:00
Andrea Marchesini
12b54aa0f5 Bug 1299500 - Get rid of DeviceStorage API - part 10 - DeviceStorage, r=ehsan, r=billm 2017-03-08 20:15:45 +01:00
Junior Hsu
a9616aa8f5 Bug 1338154 - not normalize ipv4 for resource and chrome uri. r=valentin 2017-02-13 03:10:00 +08:00
Florian Quèze
85611a7b6d Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws.
--HG--
extra : rebase_source : a22344ee1569f58f1f0a01017bfe0d46a6a14602
2017-01-17 11:50:25 +01:00