We normally fail in nsStandardURL::SetPassword if the username is empty.
But if the password we are trying to set is also empty, we should't really fail.
MozReview-Commit-ID: FIDqkPrb1gp
--HG--
extra : rebase_source : 9080c44e91e27acd210f3ace3a234528513928c3
* Code in XMLHttpRequestMainThread is converted to set the username and password individually. This is because when the parameters are empty, it ended up calling SetUserPass(":") which always returns an error.
MozReview-Commit-ID: 3cK5HeyzjFE
--HG--
extra : rebase_source : f34400c11245d88648b0ae9c196637628afa9517
The test would set a timer for 200ms then expect to be called back more than 200ms later (as in 201ms or more)
This change makes sure that we don't fail if the callback comes back exactly 200ms later.
MozReview-Commit-ID: 1OCyO3juAdZ
--HG--
extra : rebase_source : 5e123337f73e6b95f5f0afa7d63604d5558dfd94
Provides an optional resolver mechanism for Firefox that allows running
together with or instead of the native resolver.
TRR offers resolving of host names using a dedicated DNS-over-HTTPS server
(HTTPS is required, HTTP/2 is preferable).
DNS-over-HTTPS (DOH) allows DNS resolves with enhanced privacy, secure
transfers and improved performance.
To keep the failure rate at a minimum, the TRR system manages a dynamic
persistent blacklist for host names that can't be resolved with DOH but works
with the native resolver. Blacklisted entries will not be retried over DOH for
a couple of days. "localhost" and names in the ".local" TLD will not be
resolved via DOH.
TRR is preffed OFF by default and you need to set a URI for an available DOH
server to be able to use it. Since the URI for DOH is set with a name itself,
it may have to use the native resolver for bootstrapping. (Optionally, the
user can set the IP address of the DOH server in a pref to avoid the required
initial native resolve.)
When TRR starts up, it will first verify that it works by checking a
"confirmation" domain name. This confirmation domain is a pref by default set
to "example.com". TRR will also by default await the captive-portal detection
to raise its green flag before getting activated.
All prefs for TRR are under the "network.trr" hierarchy.
The DNS-over-HTTPS spec: https://tools.ietf.org/html/draft-ietf-doh-dns-over-https-03
MozReview-Commit-ID: GuuU6vjTjlm
--HG--
extra : rebase_source : 53fcca757334090ac05fec540ef29d109d5ceed3
See the comment on "Address test failures caused by bumping timer precision to 2 ms"
for more details.
MozReview-Commit-ID: LrsucEPdZIo
--HG--
extra : rebase_source : 8147c034f7dc93f678eebc80b0afabf55729d804
This also introduces a hidden pref to allow server-timing access from
HTTP contexts for the purposes of our xpcshell tests. We'll remove that
once we get h2 (and therefore tls test) support for server-timing
trailers (https://bugzilla.mozilla.org/show_bug.cgi?id=1436601).
This does not reject or otherwise error when receiving server-timing
headers or trailers on non-HTTPS contexts, it just makes it unavailable
outside the channel.
MozReview-Commit-ID: qi4h0VQknE
--HG--
extra : rebase_source : 6e6f139cff04f224878ecbf2bcbc84963221cfb6
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
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
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
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm
MozReview-Commit-ID: 1Nc3XDu0wGl
--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm
MozReview-Commit-ID: 1Nc3XDu0wGl
--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
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
The test previously only switched off the pref and didn't restore the
old value when done.
--HG--
extra : rebase_source : 87a769b3148f17b74f98c343743039b8d0d265c2
* changes call to use nsIURIMutator.setSpec()
* Add new NS_MutateURI constructor that takes new Mutator object
* Make nsSimpleNestedURI::Mutate() and nsNestedAboutURI::Mutate() return mutable URIs
* Make the finalizers for nsSimpleNestedURI and nsNestedAboutURI make the returned URIs immutable
MozReview-Commit-ID: 1kcv6zMxnv7
--HG--
extra : rebase_source : 99b13e9dbc8eaaa9615843b05e1539e19b527504
Calling SetSpec on an nsIURI object doesn't reinitialize the object, meaning
it's not equivalent with creating a new URI with the same spec. While this
might be counter-intuitive we want to preserve existing behaviour for
the moment.
This change makes BaseURIMutator::InitFromSpec call SetSpec on the existing
cloned URI if available. Otherwise it creates a new one.
MozReview-Commit-ID: LuHVRhBItiP
--HG--
extra : rebase_source : fc7b64d01adcb7f2ac5bbd9cfc16dadb3c4939c9
This test is aimed to check whether the order that http server gets requests is the same as the order in the client's pending queue.
However, even if the transactions are dispatched according to the order in pending queue, it doesn't mean the server can get the request in the same order.
This is because the transaction is really dispatched to a connection when nsHalfOpenSocket::OnOutputStreamReady() is called. The order may not be always the same as the pending queue.
Hence, this patch processes the dummy http request once at the time when the previous request's OnStopRequest() is called. This can force the client dispatch only one transaction at the time and make the behavior of this test more predictable.
--HG--
extra : rebase_source : 5f4631ecabdf1f36352a80fbe1939b54348ab682
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
Using test_script_loader_js_cache.html as the base of the testcase.
Interpolate the service worker which performs pass-through fetch.
--HG--
extra : histedit_source : 73dcc70fdbf3a210d73d60a7a70d3bf4bbea4217
This class isn't being used right now, and MozURL is a much better alternative if interaction with rust URLs is required.
MozReview-Commit-ID: ADdYRrrTnr6
--HG--
extra : rebase_source : b36aa26c20e7daaadab1f3360bab0ed4681eb7f8
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
This means the callsites don't need to use getter_Copies(). This roughly halves
the number of calls to getter_Copies() in the tree.
The patch also removes the bool return value from these functions, because it's
not used.
--HG--
extra : rebase_source : 9281411f959282b4ff33e18205ce647f963f0108
* 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
* 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
This test turns the existing stand alone test for the FTP directory
listing parser into a gtest.
MozReview-Commit-ID: 7n60TfcTXTJ
--HG--
extra : rebase_source : 79c88708a9bf9bee6c27a82f2c93a95016e063dd
After the automatic fixes in the previous patch, a few of the times in
late March and early April are still off by an hour. Maybe this was
affected by the changes in when daylight savings time or some bug in
my conversion script. I have no idea. This patch just fixes the test
to match the actual output.
MozReview-Commit-ID: IghWfkWfxvi
--HG--
extra : rebase_source : ef2e8c6c3d5fbe3d50443ac0042d139e5da44d64
The dates in the input for this file are specified as seconds since
Jan 1, 1970 or whenever. The conversion to a normal date depends on
the current time zone. The original output seems to have been
generated using GMT+1, with adjustments for daylight savings time at
the appropriate parts of the year. To make this easier to test, this
patch changes all of the times to GMT, without any daylight savings
time adjustment.
This change was automatically created by the Python script attached to
the bug.
MozReview-Commit-ID: 3uSAGtJYsMW
--HG--
extra : rebase_source : 2bdf3dd8f7d7b07320a19c4710ded75e4d0a86d1
D-WinNT: The parser treats <JUNCTION> without an arrow as junk for
some reason. Chrome's FTP directory listing parser doesn't seem to
support <JUNCTION> at all, so it can't be too important. I just
deleted that from the expected output to match Firefox's current
behavior. I also added basic tests for three bugs that were fixed
without any tests landed.
E-EPLF.out: Add a license to the top.
U-WinNT.out: We're not testing junk or comment output, and we don't
use the list: prefix, so remove all of those. Also, we now output the
proper year (2000 instead of 00, for instance), so fix that in the
test output. Finally, the time in the output for this test is
formatted differently, for whatever reason, so change it to match the
actual output.
V-VMS-mix.out: Fix file sizes. File sizes on VMS can only be
approximated. When the FTP tests initially landed in 2002, this was
handled by not trying. Bug 22299 landed in 2003 and changed our
behavior to approximate the size, but the tests were not
updated.
MozReview-Commit-ID: 1DVfBfHh82y
--HG--
extra : rebase_source : 623ac06cb62497b8fc3db01f73c18b3cf0df6783
Also adds the necessary methods to rust-url-capi and fixes a bug in rusturl_set_username
MozReview-Commit-ID: 9rsPIQAbWBJ
--HG--
extra : rebase_source : a1dee0b0e26a5c816f47a7c7c779c2454f87f51f
Also adds the necessary methods to rust-url-capi and fixes a bug in rusturl_set_username
MozReview-Commit-ID: 9rsPIQAbWBJ
--HG--
extra : rebase_source : 550aafbfb1d57257db49897a7506ebb9f038021f
The Windows and OSX code paths were essentially doing the same thing,
and the Unix fallback was using an old convention that is pretty much
outdated.
Under normal conditions (XPCOM initialized by Firefox),
NS_XPCOM_INIT_CURRENT_PROCESS_DIR is set from BinaryPath anyways, so
this only really affects adhoc XPCOM initialization from e.g. C++ unit
tests.
--HG--
extra : rebase_source : b3151fffd4c82159b633a48dead86f2c3b0a03d6
When for some reason the target of a resource: substitution doesn't end
with a / (which can happen when e.g. building a FileURI with a path
that doesn't exist), relative path resolution of the resource URLs end
up rooted under the parent of the non-existing directory.
e.g
resource://foo/bar is substituted with /path/for/bar if
resource://foo/ is registered for file:///path/for/foo (instead of
file:///path/for/foo/)
--HG--
extra : rebase_source : b59dae0337a707a96adfc1c89c27235a856ec58e
When for some reason the target of a resource: substitution doesn't end
with a / (which can happen when e.g. building a FileURI with a path
that doesn't exist), relative path resolution of the resource URLs end
up rooted under the parent of the non-existing directory.
e.g
resource://foo/bar is substituted with /path/for/bar if
resource://foo/ is registered for file:///path/for/foo (instead of
file:///path/for/foo/)
--HG--
extra : rebase_source : 9907f7c54f43851ba1a956a5d278d301013204d2
The Windows and OSX code paths were essentially doing the same thing,
and the Unix fallback was using an old convention that is pretty much
outdated.
Under normal conditions (XPCOM initialized by Firefox),
NS_XPCOM_INIT_CURRENT_PROCESS_DIR is set from BinaryPath anyways, so
this only really affects adhoc XPCOM initialization from e.g. C++ unit
tests.
--HG--
extra : rebase_source : b3151fffd4c82159b633a48dead86f2c3b0a03d6
When for some reason the target of a resource: substitution doesn't end
with a / (which can happen when e.g. building a FileURI with a path
that doesn't exist), relative path resolution of the resource URLs end
up rooted under the parent of the non-existing directory.
e.g
resource://foo/bar is substituted with /path/for/bar if
resource://foo/ is registered for file:///path/for/foo (instead of
file:///path/for/foo/)
--HG--
extra : rebase_source : 50a329318a2424bc5679a2e026e755271214224a
This flags is added in the http channel interface by which developers can control the TLS
connections from JavaScript code (e.g. Add-ons). Basically, all the changes accounted for
plumbing this TLS flags from JavaScript level to C++ code responsible for calling NSS
module. We also added a unit test to make sure that separate connections are created if we
use different tlsFlags. Basically we used a concrete set of flag values that covers the
edge cases and check the hashkey generated in the connection info.
--HG--
rename : netwerk/test/unit/test_separate_connections.js => netwerk/test/unit/test_tls_flags_separate_connections.js
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.
MozReview-Commit-ID: 4ecl3RZhOwC
--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
SetRef and several other methods call InvalidateCache, which in turn sets mCheckedIfHostA to false.
That means that each time before trying to access mDisplayHost we need to make sure it is properly initalized.
MozReview-Commit-ID: Agtsy6Lx7Nb
These tests use BrowserTestUtils.crashBrowser() and fail with ASan enabled.
MozReview-Commit-ID: CpkldaKouzD
--HG--
extra : rebase_source : 02c4c0c13e7ab3ba144b2922b0cc54913daa6ab9
Add a test to see when "network.http.active_tab_priority" is false, the http requests should be sent by their priority. That means the transaction with the highest priority will be dispatched first.
--HG--
extra : rebase_source : dc05145834d93077a4742aa57b1becc3996f074a
This patch introduce new pref "network.http.active_tab_priority" which indicate whether or not we dispatch transactions from active tab before others from background tab.
--HG--
extra : rebase_source : 093ab372d392eec285889f307d4540012e7aac9f
When we get the usre's frequent visting site from UnifiedComplete.js,
and then open a network connection for it before the user hits
the enter key.
MozReview-Commit-ID: 36moBeeUnyZ
--HG--
extra : rebase_source : 4122534b2d21d2a959fd8dbb8533dd3e0ef75621
All the instances are converted as follows.
- nsSubstring --> nsAString
- nsCSubstring --> nsACString
--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
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
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
Since the uri classifier needs topWindowURI to decide whether or not to enable channel annotation, we have to allow to change this attribute in js for passing the test.
--HG--
extra : rebase_source : c5effa05fecef0d32600e4c9c926dbfa77c2ca6f
This patch removes the C++ code used to run the minidump analyzer when a
content process crashes, and replaces it with JS code within the CrashService
object. This removes the need for a separate shutdown blocker in C++ code and
allows end-to-end testing of the crash service functionality. Additionally
the exception handler code can be simplified since it's now only used to run
the crash reporter client.
The test added to test_crash_service.js covers computing the minidump SHA256
hash (bug 1322611) and of the minidump analyzer itself (bug 1280477).
MozReview-Commit-ID: LO5w839NHev
This function is arguably nicer than calling NS_ProcessNextEvent
manually, is slightly more efficient, and will enable better auditing
for NS_ProcessNextEvent when we do Quantum DOM scheduling changes.
// When non empty all non-localhost DNS queries (including IP addresses)
// resolve to this value. The value can be a name or an IP address.
// domains mapped to localhost with localDomains stay localhost.
pref("network.dns.forceResolve", "");
Testing is the primary use case here - replay captive data on a 'fake
server' by directing all traffic to it at the DNS level. Chrome has
something similar.
MozReview-Commit-ID: 7AOgQZpZKec
--HG--
extra : rebase_source : ad2648a701fffecaae47cbfae17e7aa6badd50ee
Serializing and sending IPC messages takes a lot of time, and it gets in the way of image loading. Making this functionality async gets out of the way of image loading (among other things).
The test has been changed to pump the main thread after calling predictor.learn so the multiprocess version can actually run to completion. This isn't strictly necessary in the single process version, but it makes the code changes (which are already pretty invasive) simpler.
MozReview-Commit-ID: 7jvhomlygbf
--HG--
extra : rebase_source : a779a498f83a2b02d2d634eff63d15f483793046
This implements a plaintext reading of RFC 6797, which says to only consider the
first, however it slightly conflicts with RFC 7230, which says that sending
multiple headers which can't be merged is illegal (except for a specific
whitelist which HSTS isn't in). Chrome also implements HSTS using RFC 6797's
description of the parsing algorithm.
r=mcmanus,keeler
MozReview-Commit-ID: E06uIk2IcEK
--HG--
extra : rebase_source : 4a67f067d2953d4b30c1019a61bbfc7073e55b3d