зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1808688 - [bidi] Remove before request sent map spec assert r=jdescottes,webdriver-reviewers
Removed the "before request sent map" spec assert which is now unneeded as to document invariants in the implementation. Also updated WPT test expectations. Differential Revision: https://phabricator.services.mozilla.com/D170335
This commit is contained in:
Родитель
2726e94cab
Коммит
ff90131cd0
|
@ -7,7 +7,6 @@ import { Module } from "chrome://remote/content/shared/messagehandler/Module.sys
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
error: "chrome://remote/content/shared/webdriver/Errors.sys.mjs",
|
||||
NetworkListener:
|
||||
"chrome://remote/content/shared/listeners/NetworkListener.sys.mjs",
|
||||
TabManager: "chrome://remote/content/shared/TabManager.sys.mjs",
|
||||
|
@ -157,19 +156,12 @@ const InitiatorType = {
|
|||
*/
|
||||
|
||||
class NetworkModule extends Module {
|
||||
#beforeRequestSentMap;
|
||||
#networkListener;
|
||||
#subscribedEvents;
|
||||
|
||||
constructor(messageHandler) {
|
||||
super(messageHandler);
|
||||
|
||||
// Map of request ids to redirect counts. A WebDriver BiDi request id is
|
||||
// identical for redirects of a given request, this map allows to know if we
|
||||
// already emitted a beforeRequestSent event for a given request with a
|
||||
// specific redirectCount.
|
||||
this.#beforeRequestSentMap = new Map();
|
||||
|
||||
// Set of event names which have active subscriptions
|
||||
this.#subscribedEvents = new Set();
|
||||
|
||||
|
@ -184,7 +176,6 @@ class NetworkModule extends Module {
|
|||
this.#networkListener.off("response-completed", this.#onResponseEvent);
|
||||
this.#networkListener.off("response-started", this.#onResponseEvent);
|
||||
|
||||
this.#beforeRequestSentMap = null;
|
||||
this.#subscribedEvents = null;
|
||||
}
|
||||
|
||||
|
@ -199,7 +190,6 @@ class NetworkModule extends Module {
|
|||
const { contextId, requestData, timestamp, redirectCount } = data;
|
||||
|
||||
const isRedirect = redirectCount > 0;
|
||||
this.#beforeRequestSentMap.set(requestData.requestId, redirectCount);
|
||||
|
||||
// Bug 1805479: Handle the initiator, including stacktrace details.
|
||||
const initiator = {
|
||||
|
@ -240,13 +230,6 @@ class NetworkModule extends Module {
|
|||
|
||||
const isRedirect = redirectCount > 0;
|
||||
|
||||
const requestId = requestData.requestId;
|
||||
if (this.#beforeRequestSentMap.get(requestId) != redirectCount) {
|
||||
throw new lazy.error.UnknownError(
|
||||
`Redirect count of the request ${requestId} does not match the before request sent map`
|
||||
);
|
||||
}
|
||||
|
||||
const baseParameters = {
|
||||
context: contextId,
|
||||
isRedirect,
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[response_completed_tentative.py]
|
||||
[test_redirect]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1809210
|
||||
expected: FAIL
|
Загрузка…
Ссылка в новой задаче