mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
Backed out changeset 5dc08ac77984 (bug 1411725) for causing browser_caching_attributes.js perma failures CLOSED TREE
This commit is contained in:
parent
2a9eb52a31
commit
445a95e5c6
@ -781,7 +781,9 @@ void XMLHttpRequestMainThread::GetResponseURL(nsAString& aUrl) {
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURI> responseUrl;
|
||||
if (NS_FAILED(NS_GetFinalChannelURI(mChannel, getter_AddRefs(responseUrl)))) {
|
||||
mChannel->GetURI(getter_AddRefs(responseUrl));
|
||||
|
||||
if (!responseUrl) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,5 @@ support-files =
|
||||
browser_xhr_onchange_leak.html
|
||||
[browser_blobFromFile.js]
|
||||
[browser_xhr_onchange_leak.js]
|
||||
[browser_xhr_substituted_protocol_responseURL.js]
|
||||
[browser_temporaryFile.js]
|
||||
support-files = temporaryFileBlob.sjs
|
||||
|
@ -1,23 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
// Bug 1411725 - An XHR using a SubstitutingProtocolHandler channel
|
||||
// (web-extension:, resource:, etc) should return the original URL,
|
||||
// not the jar/file it was actually substituted for.
|
||||
|
||||
const TEST_URL = "resource://gre/modules/XPCOMUtils.jsm";
|
||||
|
||||
add_task(async function test() {
|
||||
await new Promise(resolve => {
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.responseType = "text";
|
||||
xhr.open("get", TEST_URL);
|
||||
xhr.addEventListener("loadend", () => {
|
||||
is(xhr.responseURL, TEST_URL, "original URL is given instead of substitution");
|
||||
resolve();
|
||||
});
|
||||
xhr.send();
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user