зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1366710 set webrequest type to xmlhttprequest for fetch requests, r=aswan
MozReview-Commit-ID: GkhojDrmWC5 --HG-- extra : rebase_source : d1ff3031beb0a630b5eb2b090c38937ca09a9107
This commit is contained in:
Родитель
652a4154b9
Коммит
3a09428334
|
@ -82,6 +82,7 @@ add_task(async function test_webRequest_background_events() {
|
|||
eventNames.delete(name);
|
||||
|
||||
if (eventNames.size === 0) {
|
||||
browser.test.assertEq("xmlhttprequest", details.type, "correct type for fetch [bug 1366710]");
|
||||
browser.test.assertEq(0, eventNames.size, "messages recieved");
|
||||
browser.test.sendMessage("done");
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ add_task(async function test_webRequest_filter_background() {
|
|||
status: 404,
|
||||
events: ["onBeforeRequest", "onBeforeSendHeaders", "onSendHeaders", "onHeadersReceived", "onResponseStarted"],
|
||||
optional_events: ["onCompleted", "onErrorOccurred"],
|
||||
type: "other",
|
||||
type: "xmlhttprequest",
|
||||
origin: SimpleTest.getTestFileURL("webrequest_worker.js?test2"),
|
||||
},
|
||||
};
|
||||
|
|
|
@ -24,6 +24,8 @@ var WebRequestCommon = {
|
|||
case Ci.nsIContentPolicy.TYPE_OBJECT: return "object";
|
||||
case Ci.nsIContentPolicy.TYPE_OBJECT_SUBREQUEST: return "object_subrequest";
|
||||
case Ci.nsIContentPolicy.TYPE_XMLHTTPREQUEST: return "xmlhttprequest";
|
||||
// TYPE_FETCH returns xmlhttprequest for cross-browser compatibility.
|
||||
case Ci.nsIContentPolicy.TYPE_FETCH: return "xmlhttprequest";
|
||||
case Ci.nsIContentPolicy.TYPE_XBL: return "xbl";
|
||||
case Ci.nsIContentPolicy.TYPE_XSLT: return "xslt";
|
||||
case Ci.nsIContentPolicy.TYPE_PING: return "ping";
|
||||
|
|
Загрузка…
Ссылка в новой задаче