devtools-protocol 0.0.1517051 → 0.0.1518305

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16537,6 +16537,57 @@
16537
16537
  "zstd"
16538
16538
  ]
16539
16539
  },
16540
+ {
16541
+ "id": "NetworkConditions",
16542
+ "experimental": true,
16543
+ "type": "object",
16544
+ "properties": [
16545
+ {
16546
+ "name": "urlPattern",
16547
+ "description": "Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string\nsyntax (https://urlpattern.spec.whatwg.org/). If the pattern is empty, all requests are matched (including p2p\nconnections).",
16548
+ "type": "string"
16549
+ },
16550
+ {
16551
+ "name": "latency",
16552
+ "description": "Minimum latency from request sent to response headers received (ms).",
16553
+ "type": "number"
16554
+ },
16555
+ {
16556
+ "name": "downloadThroughput",
16557
+ "description": "Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.",
16558
+ "type": "number"
16559
+ },
16560
+ {
16561
+ "name": "uploadThroughput",
16562
+ "description": "Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.",
16563
+ "type": "number"
16564
+ },
16565
+ {
16566
+ "name": "connectionType",
16567
+ "description": "Connection type if known.",
16568
+ "optional": true,
16569
+ "$ref": "ConnectionType"
16570
+ },
16571
+ {
16572
+ "name": "packetLoss",
16573
+ "description": "WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.",
16574
+ "optional": true,
16575
+ "type": "number"
16576
+ },
16577
+ {
16578
+ "name": "packetQueueLength",
16579
+ "description": "WebRTC packet queue length (packet). 0 removes any queue length limitations.",
16580
+ "optional": true,
16581
+ "type": "integer"
16582
+ },
16583
+ {
16584
+ "name": "packetReordering",
16585
+ "description": "WebRTC packetReordering feature.",
16586
+ "optional": true,
16587
+ "type": "boolean"
16588
+ }
16589
+ ]
16590
+ },
16540
16591
  {
16541
16592
  "id": "DirectSocketDnsQueryType",
16542
16593
  "experimental": true,
@@ -17159,7 +17210,8 @@
17159
17210
  },
17160
17211
  {
17161
17212
  "name": "emulateNetworkConditions",
17162
- "description": "Activates emulation of network conditions.",
17213
+ "description": "Activates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule\nand overrideNetworkState commands, which can be used together to the same effect.",
17214
+ "deprecated": true,
17163
17215
  "parameters": [
17164
17216
  {
17165
17217
  "name": "offline",
@@ -17210,6 +17262,69 @@
17210
17262
  }
17211
17263
  ]
17212
17264
  },
17265
+ {
17266
+ "name": "emulateNetworkConditionsByRule",
17267
+ "description": "Activates emulation of network conditions for individual requests using URL match patterns.",
17268
+ "experimental": true,
17269
+ "parameters": [
17270
+ {
17271
+ "name": "offline",
17272
+ "description": "True to emulate internet disconnection.",
17273
+ "type": "boolean"
17274
+ },
17275
+ {
17276
+ "name": "matchedNetworkConditions",
17277
+ "description": "Configure conditions for matching requests. If multiple entries match a request, the first entry wins. Global\nconditions can be configured by leaving the urlPattern for the conditions empty. These global conditions are\nalso applied for throttling of p2p connections.",
17278
+ "type": "array",
17279
+ "items": {
17280
+ "$ref": "NetworkConditions"
17281
+ }
17282
+ }
17283
+ ],
17284
+ "returns": [
17285
+ {
17286
+ "name": "ruleIds",
17287
+ "description": "An id for each entry in matchedNetworkConditions. The id will be included in the requestWillBeSentExtraInfo for\nrequests affected by a rule.",
17288
+ "type": "array",
17289
+ "items": {
17290
+ "type": "string"
17291
+ }
17292
+ }
17293
+ ]
17294
+ },
17295
+ {
17296
+ "name": "overrideNetworkState",
17297
+ "description": "Override the state of navigator.onLine and navigator.connection.",
17298
+ "experimental": true,
17299
+ "parameters": [
17300
+ {
17301
+ "name": "offline",
17302
+ "description": "True to emulate internet disconnection.",
17303
+ "type": "boolean"
17304
+ },
17305
+ {
17306
+ "name": "latency",
17307
+ "description": "Minimum latency from request sent to response headers received (ms).",
17308
+ "type": "number"
17309
+ },
17310
+ {
17311
+ "name": "downloadThroughput",
17312
+ "description": "Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.",
17313
+ "type": "number"
17314
+ },
17315
+ {
17316
+ "name": "uploadThroughput",
17317
+ "description": "Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.",
17318
+ "type": "number"
17319
+ },
17320
+ {
17321
+ "name": "connectionType",
17322
+ "description": "Connection type if known.",
17323
+ "optional": true,
17324
+ "$ref": "ConnectionType"
17325
+ }
17326
+ ]
17327
+ },
17213
17328
  {
17214
17329
  "name": "enable",
17215
17330
  "description": "Enables network tracking, network events will now be delivered to the client.",
@@ -18654,6 +18769,12 @@
18654
18769
  "description": "Whether the site has partitioned cookies stored in a partition different than the current one.",
18655
18770
  "optional": true,
18656
18771
  "type": "boolean"
18772
+ },
18773
+ {
18774
+ "name": "appliedNetworkConditionsId",
18775
+ "description": "The network conditions id if this request was affected by network conditions configured via\nemulateNetworkConditionsByRule.",
18776
+ "optional": true,
18777
+ "type": "string"
18657
18778
  }
18658
18779
  ]
18659
18780
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devtools-protocol",
3
- "version": "0.0.1517051",
3
+ "version": "0.0.1518305",
4
4
  "description": "The Chrome DevTools Protocol JSON",
5
5
  "repository": "https://github.com/ChromeDevTools/devtools-protocol",
6
6
  "author": "The Chromium Authors",
@@ -1087,8 +1087,30 @@ domain Network
1087
1087
  # Disables network tracking, prevents network events from being sent to the client.
1088
1088
  command disable
1089
1089
 
1090
- # Activates emulation of network conditions.
1091
- command emulateNetworkConditions
1090
+ experimental type NetworkConditions extends object
1091
+ properties
1092
+ # Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string
1093
+ # syntax (https://urlpattern.spec.whatwg.org/). If the pattern is empty, all requests are matched (including p2p
1094
+ # connections).
1095
+ string urlPattern
1096
+ # Minimum latency from request sent to response headers received (ms).
1097
+ number latency
1098
+ # Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
1099
+ number downloadThroughput
1100
+ # Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
1101
+ number uploadThroughput
1102
+ # Connection type if known.
1103
+ optional ConnectionType connectionType
1104
+ # WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
1105
+ optional number packetLoss
1106
+ # WebRTC packet queue length (packet). 0 removes any queue length limitations.
1107
+ optional integer packetQueueLength
1108
+ # WebRTC packetReordering feature.
1109
+ optional boolean packetReordering
1110
+
1111
+ # Activates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule
1112
+ # and overrideNetworkState commands, which can be used together to the same effect.
1113
+ deprecated command emulateNetworkConditions
1092
1114
  parameters
1093
1115
  # True to emulate internet disconnection.
1094
1116
  boolean offline
@@ -1107,6 +1129,34 @@ domain Network
1107
1129
  # WebRTC packetReordering feature.
1108
1130
  experimental optional boolean packetReordering
1109
1131
 
1132
+ # Activates emulation of network conditions for individual requests using URL match patterns.
1133
+ experimental command emulateNetworkConditionsByRule
1134
+ parameters
1135
+ # True to emulate internet disconnection.
1136
+ boolean offline
1137
+ # Configure conditions for matching requests. If multiple entries match a request, the first entry wins. Global
1138
+ # conditions can be configured by leaving the urlPattern for the conditions empty. These global conditions are
1139
+ # also applied for throttling of p2p connections.
1140
+ array of NetworkConditions matchedNetworkConditions
1141
+ returns
1142
+ # An id for each entry in matchedNetworkConditions. The id will be included in the requestWillBeSentExtraInfo for
1143
+ # requests affected by a rule.
1144
+ array of string ruleIds
1145
+
1146
+ # Override the state of navigator.onLine and navigator.connection.
1147
+ experimental command overrideNetworkState
1148
+ parameters
1149
+ # True to emulate internet disconnection.
1150
+ boolean offline
1151
+ # Minimum latency from request sent to response headers received (ms).
1152
+ number latency
1153
+ # Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
1154
+ number downloadThroughput
1155
+ # Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
1156
+ number uploadThroughput
1157
+ # Connection type if known.
1158
+ optional ConnectionType connectionType
1159
+
1110
1160
  # Enables network tracking, network events will now be delivered to the client.
1111
1161
  command enable
1112
1162
  parameters
@@ -1776,6 +1826,9 @@ domain Network
1776
1826
  optional ClientSecurityState clientSecurityState
1777
1827
  # Whether the site has partitioned cookies stored in a partition different than the current one.
1778
1828
  optional boolean siteHasCookieInOtherPartition
1829
+ # The network conditions id if this request was affected by network conditions configured via
1830
+ # emulateNetworkConditionsByRule.
1831
+ optional string appliedNetworkConditionsId
1779
1832
 
1780
1833
  # Fired when additional information about a responseReceived event is available from the network
1781
1834
  # stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for
@@ -4164,12 +4164,30 @@ export namespace ProtocolMapping {
4164
4164
  returnType: void;
4165
4165
  };
4166
4166
  /**
4167
- * Activates emulation of network conditions.
4167
+ * Activates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule
4168
+ * and overrideNetworkState commands, which can be used together to the same effect.
4169
+ * @deprecated
4168
4170
  */
4169
4171
  'Network.emulateNetworkConditions': {
4170
4172
  paramsType: [Protocol.Network.EmulateNetworkConditionsRequest];
4171
4173
  returnType: void;
4172
4174
  };
4175
+ /**
4176
+ * Activates emulation of network conditions for individual requests using URL match patterns.
4177
+ * @experimental
4178
+ */
4179
+ 'Network.emulateNetworkConditionsByRule': {
4180
+ paramsType: [Protocol.Network.EmulateNetworkConditionsByRuleRequest];
4181
+ returnType: Protocol.Network.EmulateNetworkConditionsByRuleResponse;
4182
+ };
4183
+ /**
4184
+ * Override the state of navigator.onLine and navigator.connection.
4185
+ * @experimental
4186
+ */
4187
+ 'Network.overrideNetworkState': {
4188
+ paramsType: [Protocol.Network.OverrideNetworkStateRequest];
4189
+ returnType: void;
4190
+ };
4173
4191
  /**
4174
4192
  * Enables network tracking, network events will now be delivered to the client.
4175
4193
  */
@@ -3030,10 +3030,24 @@ export namespace ProtocolProxyApi {
3030
3030
  disable(): Promise<void>;
3031
3031
 
3032
3032
  /**
3033
- * Activates emulation of network conditions.
3033
+ * Activates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule
3034
+ * and overrideNetworkState commands, which can be used together to the same effect.
3035
+ * @deprecated
3034
3036
  */
3035
3037
  emulateNetworkConditions(params: Protocol.Network.EmulateNetworkConditionsRequest): Promise<void>;
3036
3038
 
3039
+ /**
3040
+ * Activates emulation of network conditions for individual requests using URL match patterns.
3041
+ * @experimental
3042
+ */
3043
+ emulateNetworkConditionsByRule(params: Protocol.Network.EmulateNetworkConditionsByRuleRequest): Promise<Protocol.Network.EmulateNetworkConditionsByRuleResponse>;
3044
+
3045
+ /**
3046
+ * Override the state of navigator.onLine and navigator.connection.
3047
+ * @experimental
3048
+ */
3049
+ overrideNetworkState(params: Protocol.Network.OverrideNetworkStateRequest): Promise<void>;
3050
+
3037
3051
  /**
3038
3052
  * Enables network tracking, network events will now be delivered to the client.
3039
3053
  */
@@ -3198,10 +3198,24 @@ export namespace ProtocolTestsProxyApi {
3198
3198
  disable(): Promise<{id: number, result: void, sessionId: string}>;
3199
3199
 
3200
3200
  /**
3201
- * Activates emulation of network conditions.
3201
+ * Activates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule
3202
+ * and overrideNetworkState commands, which can be used together to the same effect.
3203
+ * @deprecated
3202
3204
  */
3203
3205
  emulateNetworkConditions(params: Protocol.Network.EmulateNetworkConditionsRequest): Promise<{id: number, result: void, sessionId: string}>;
3204
3206
 
3207
+ /**
3208
+ * Activates emulation of network conditions for individual requests using URL match patterns.
3209
+ * @experimental
3210
+ */
3211
+ emulateNetworkConditionsByRule(params: Protocol.Network.EmulateNetworkConditionsByRuleRequest): Promise<{id: number, result: Protocol.Network.EmulateNetworkConditionsByRuleResponse, sessionId: string}>;
3212
+
3213
+ /**
3214
+ * Override the state of navigator.onLine and navigator.connection.
3215
+ * @experimental
3216
+ */
3217
+ overrideNetworkState(params: Protocol.Network.OverrideNetworkStateRequest): Promise<{id: number, result: void, sessionId: string}>;
3218
+
3205
3219
  /**
3206
3220
  * Enables network tracking, network events will now be delivered to the client.
3207
3221
  */
@@ -13182,6 +13182,46 @@ export namespace Protocol {
13182
13182
  */
13183
13183
  export type ContentEncoding = ('deflate' | 'gzip' | 'br' | 'zstd');
13184
13184
 
13185
+ /**
13186
+ * @experimental
13187
+ */
13188
+ export interface NetworkConditions {
13189
+ /**
13190
+ * Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string
13191
+ * syntax (https://urlpattern.spec.whatwg.org/). If the pattern is empty, all requests are matched (including p2p
13192
+ * connections).
13193
+ */
13194
+ urlPattern: string;
13195
+ /**
13196
+ * Minimum latency from request sent to response headers received (ms).
13197
+ */
13198
+ latency: number;
13199
+ /**
13200
+ * Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
13201
+ */
13202
+ downloadThroughput: number;
13203
+ /**
13204
+ * Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
13205
+ */
13206
+ uploadThroughput: number;
13207
+ /**
13208
+ * Connection type if known.
13209
+ */
13210
+ connectionType?: ConnectionType;
13211
+ /**
13212
+ * WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
13213
+ */
13214
+ packetLoss?: number;
13215
+ /**
13216
+ * WebRTC packet queue length (packet). 0 removes any queue length limitations.
13217
+ */
13218
+ packetQueueLength?: integer;
13219
+ /**
13220
+ * WebRTC packetReordering feature.
13221
+ */
13222
+ packetReordering?: boolean;
13223
+ }
13224
+
13185
13225
  /**
13186
13226
  * @experimental
13187
13227
  */
@@ -13570,6 +13610,50 @@ export namespace Protocol {
13570
13610
  packetReordering?: boolean;
13571
13611
  }
13572
13612
 
13613
+ export interface EmulateNetworkConditionsByRuleRequest {
13614
+ /**
13615
+ * True to emulate internet disconnection.
13616
+ */
13617
+ offline: boolean;
13618
+ /**
13619
+ * Configure conditions for matching requests. If multiple entries match a request, the first entry wins. Global
13620
+ * conditions can be configured by leaving the urlPattern for the conditions empty. These global conditions are
13621
+ * also applied for throttling of p2p connections.
13622
+ */
13623
+ matchedNetworkConditions: NetworkConditions[];
13624
+ }
13625
+
13626
+ export interface EmulateNetworkConditionsByRuleResponse {
13627
+ /**
13628
+ * An id for each entry in matchedNetworkConditions. The id will be included in the requestWillBeSentExtraInfo for
13629
+ * requests affected by a rule.
13630
+ */
13631
+ ruleIds: string[];
13632
+ }
13633
+
13634
+ export interface OverrideNetworkStateRequest {
13635
+ /**
13636
+ * True to emulate internet disconnection.
13637
+ */
13638
+ offline: boolean;
13639
+ /**
13640
+ * Minimum latency from request sent to response headers received (ms).
13641
+ */
13642
+ latency: number;
13643
+ /**
13644
+ * Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
13645
+ */
13646
+ downloadThroughput: number;
13647
+ /**
13648
+ * Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
13649
+ */
13650
+ uploadThroughput: number;
13651
+ /**
13652
+ * Connection type if known.
13653
+ */
13654
+ connectionType?: ConnectionType;
13655
+ }
13656
+
13573
13657
  export interface EnableRequest {
13574
13658
  /**
13575
13659
  * Buffer size in bytes to use when preserving network payloads (XHRs, etc).
@@ -14594,6 +14678,11 @@ export namespace Protocol {
14594
14678
  * Whether the site has partitioned cookies stored in a partition different than the current one.
14595
14679
  */
14596
14680
  siteHasCookieInOtherPartition?: boolean;
14681
+ /**
14682
+ * The network conditions id if this request was affected by network conditions configured via
14683
+ * emulateNetworkConditionsByRule.
14684
+ */
14685
+ appliedNetworkConditionsId?: string;
14597
14686
  }
14598
14687
 
14599
14688
  /**