1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 // Bug 1411725 - An XHR using a SubstitutingProtocolHandler channel
7 // (web-extension:, resource:, etc) should return the original URL,
8 // not the jar/file it was actually substituted for.
10 const TEST_URL = "resource://gre/modules/XPCOMUtils.sys.mjs";
12 add_task(async function test() {
13 await new Promise(resolve => {
14 const xhr = new XMLHttpRequest();
15 xhr.responseType = "text";
16 xhr.open("get", TEST_URL);
17 xhr.addEventListener("loadend", () => {
21 "original URL is given instead of substitution"