mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
browser(firefox): expose internal request cause along with external one (#2383)
This commit is contained in:
parent
3f97a9fb69
commit
0ed052f9e9
@ -1 +1 @@
|
||||
1097
|
||||
1098
|
||||
|
||||
@ -1466,10 +1466,10 @@ index 0000000000000000000000000000000000000000..2b1fe7fa712ae210af3ebbccda084041
|
||||
+
|
||||
diff --git a/juggler/NetworkObserver.js b/juggler/NetworkObserver.js
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..f803071bea317e4d3ce7341573622f6bddaaf547
|
||||
index 0000000000000000000000000000000000000000..5a9c3232769729fc127c43b24e88713042e577c3
|
||||
--- /dev/null
|
||||
+++ b/juggler/NetworkObserver.js
|
||||
@@ -0,0 +1,794 @@
|
||||
@@ -0,0 +1,796 @@
|
||||
+"use strict";
|
||||
+
|
||||
+const {EventEmitter} = ChromeUtils.import('resource://gre/modules/EventEmitter.jsm');
|
||||
@ -1843,6 +1843,7 @@ index 0000000000000000000000000000000000000000..f803071bea317e4d3ce7341573622f6b
|
||||
+ if (!pageNetwork)
|
||||
+ return;
|
||||
+ const causeType = httpChannel.loadInfo ? httpChannel.loadInfo.externalContentPolicyType : Ci.nsIContentPolicy.TYPE_OTHER;
|
||||
+ const internalCauseType = httpChannel.loadInfo ? httpChannel.loadInfo.internalContentPolicyType : Ci.nsIContentPolicy.TYPE_OTHER;
|
||||
+ const requestId = this._requestId(httpChannel);
|
||||
+ const redirectedFrom = this._redirectMap.get(requestId);
|
||||
+ this._redirectMap.delete(requestId);
|
||||
@ -1856,6 +1857,7 @@ index 0000000000000000000000000000000000000000..f803071bea317e4d3ce7341573622f6b
|
||||
+ method: httpChannel.requestMethod,
|
||||
+ navigationId: httpChannel.isMainDocumentChannel ? this._requestIdBeforeAuthentication(httpChannel) || this._requestId(httpChannel) : undefined,
|
||||
+ cause: causeTypeToString(causeType),
|
||||
+ internalCause: causeTypeToString(internalCauseType),
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
@ -6822,10 +6824,10 @@ index 0000000000000000000000000000000000000000..78b6601b91d0b7fcda61114e6846aa07
|
||||
+this.EXPORTED_SYMBOLS = ['t', 'checkScheme'];
|
||||
diff --git a/juggler/protocol/Protocol.js b/juggler/protocol/Protocol.js
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..e6bb9a8d5b553531a2ee22e27e693dd0569bda22
|
||||
index 0000000000000000000000000000000000000000..71649c3462f82d8b327b5913570612a3d99495b8
|
||||
--- /dev/null
|
||||
+++ b/juggler/protocol/Protocol.js
|
||||
@@ -0,0 +1,845 @@
|
||||
@@ -0,0 +1,846 @@
|
||||
+const {t, checkScheme} = ChromeUtils.import('chrome://juggler/content/protocol/PrimitiveTypes.js');
|
||||
+
|
||||
+// Protocol-specific types.
|
||||
@ -7231,6 +7233,7 @@ index 0000000000000000000000000000000000000000..e6bb9a8d5b553531a2ee22e27e693dd0
|
||||
+ method: t.String,
|
||||
+ navigationId: t.Optional(t.String),
|
||||
+ cause: t.String,
|
||||
+ internalCause: t.String,
|
||||
+ },
|
||||
+ 'responseReceived': {
|
||||
+ securityDetails: t.Nullable(networkTypes.SecurityDetails),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user