Skip to content

Commit e252e56

Browse files
pythagoraskittyDevtools-frontend LUCI CQ
authored andcommitted
Update Protocol
Bug: chromium:401011862 Change-Id: I3c0032666c3b1cee1e5c6169878cb7cb214c95e7 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6395222 Commit-Queue: Jack Franklin <[email protected]> Auto-Submit: Cammie Smith Barnes <[email protected]> Reviewed-by: Jack Franklin <[email protected]> Reviewed-by: Danil Somsikov <[email protected]>
1 parent 5d269b1 commit e252e56

File tree

13 files changed

+307
-149
lines changed

13 files changed

+307
-149
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ vars = {
2424
'inspector_protocol_revision': '940abfc668be2591483f7132145593c6a047f3cf',
2525

2626
# Keeping track of the last time we rollerd the browser protocol files.
27-
'chromium_browser_protocol_revision' : '3cc1e9e375a238e10503d896e2b516f4b72fe143',
27+
'chromium_browser_protocol_revision' : 'f48cf88d48c0fe95eb1ac055befdfc9cbecd5a4c',
2828

2929
'clang_format_url': 'https://chromium.googlesource.com/external/github.com/llvm/llvm-project/clang/tools/clang-format.git',
3030
'clang_format_revision': '37f6e68a107df43b7d7e044fd36a13cbae3413f2',

front_end/generated/InspectorBackendCommands.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

front_end/generated/protocol.ts

Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14886,30 +14886,34 @@ export namespace Storage {
1488614886
}
1488714887

1488814888
/**
14889-
* Enum of shared storage access types.
14890-
*/
14891-
export const enum SharedStorageAccessType {
14892-
DocumentAddModule = 'documentAddModule',
14893-
DocumentSelectURL = 'documentSelectURL',
14894-
DocumentRun = 'documentRun',
14895-
DocumentSet = 'documentSet',
14896-
DocumentAppend = 'documentAppend',
14897-
DocumentDelete = 'documentDelete',
14898-
DocumentClear = 'documentClear',
14899-
DocumentGet = 'documentGet',
14900-
WorkletSet = 'workletSet',
14901-
WorkletAppend = 'workletAppend',
14902-
WorkletDelete = 'workletDelete',
14903-
WorkletClear = 'workletClear',
14904-
WorkletGet = 'workletGet',
14905-
WorkletKeys = 'workletKeys',
14906-
WorkletEntries = 'workletEntries',
14907-
WorkletLength = 'workletLength',
14908-
WorkletRemainingBudget = 'workletRemainingBudget',
14909-
HeaderSet = 'headerSet',
14910-
HeaderAppend = 'headerAppend',
14911-
HeaderDelete = 'headerDelete',
14912-
HeaderClear = 'headerClear',
14889+
* Enum of shared storage access scopes.
14890+
*/
14891+
export const enum SharedStorageAccessScope {
14892+
Window = 'window',
14893+
SharedStorageWorklet = 'sharedStorageWorklet',
14894+
ProtectedAudienceWorklet = 'protectedAudienceWorklet',
14895+
Header = 'header',
14896+
}
14897+
14898+
/**
14899+
* Enum of shared storage access methods.
14900+
*/
14901+
export const enum SharedStorageAccessMethod {
14902+
AddModule = 'addModule',
14903+
CreateWorklet = 'createWorklet',
14904+
SelectURL = 'selectURL',
14905+
Run = 'run',
14906+
BatchUpdate = 'batchUpdate',
14907+
Set = 'set',
14908+
Append = 'append',
14909+
Delete = 'delete',
14910+
Clear = 'clear',
14911+
Get = 'get',
14912+
Keys = 'keys',
14913+
Values = 'values',
14914+
Entries = 'entries',
14915+
Length = 'length',
14916+
RemainingBudget = 'remainingBudget',
1491314917
}
1491414918

1491514919
/**
@@ -15748,18 +15752,26 @@ export namespace Storage {
1574815752
* Time of the access.
1574915753
*/
1575015754
accessTime: Network.TimeSinceEpoch;
15755+
/**
15756+
* Enum value indicating the access scope.
15757+
*/
15758+
scope: SharedStorageAccessScope;
1575115759
/**
1575215760
* Enum value indicating the Shared Storage API method invoked.
1575315761
*/
15754-
type: SharedStorageAccessType;
15762+
method: SharedStorageAccessMethod;
1575515763
/**
1575615764
* DevTools Frame Token for the primary frame tree's root.
1575715765
*/
1575815766
mainFrameId: Page.FrameId;
1575915767
/**
15760-
* Serialized origin for the context that invoked the Shared Storage API.
15768+
* Serialization of the origin owning the Shared Storage data.
1576115769
*/
1576215770
ownerOrigin: string;
15771+
/**
15772+
* Serialization of the site owning the Shared Storage data.
15773+
*/
15774+
ownerSite: string;
1576315775
/**
1576415776
* The sub-parameters wrapped by `params` are all optional and their
1576515777
* presence/absence depends on `type`.

front_end/panels/application/ApplicationPanelSidebar.test.ts

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ describeWithMockConnection('ApplicationPanelSidebar', () => {
5656
let target: SDK.Target.Target;
5757

5858
const TEST_ORIGIN_A = 'http://www.example.com/';
59+
const TEST_SITE_A = 'http://example.com';
5960
const TEST_ORIGIN_B = 'http://www.example.org/';
6061
const TEST_ORIGIN_C = 'http://www.example.net/';
62+
const TEST_SITE_C = 'http://example.net';
6163

6264
const TEST_EXTENSION_NAME = 'Test Extension';
6365

@@ -66,45 +68,57 @@ describeWithMockConnection('ApplicationPanelSidebar', () => {
6668
const EVENTS = [
6769
{
6870
accessTime: 0,
69-
type: Protocol.Storage.SharedStorageAccessType.DocumentAppend,
71+
method: Protocol.Storage.SharedStorageAccessMethod.Append,
7072
mainFrameId: ID,
7173
ownerOrigin: TEST_ORIGIN_A,
74+
ownerSite: TEST_SITE_A,
7275
params: {key: 'key0', value: 'value0'} as Protocol.Storage.SharedStorageAccessParams,
76+
scope: Protocol.Storage.SharedStorageAccessScope.Window,
7377
},
7478
{
7579
accessTime: 10,
76-
type: Protocol.Storage.SharedStorageAccessType.WorkletGet,
80+
method: Protocol.Storage.SharedStorageAccessMethod.Get,
7781
mainFrameId: ID,
7882
ownerOrigin: TEST_ORIGIN_A,
83+
ownerSite: TEST_SITE_A,
7984
params: {key: 'key0'} as Protocol.Storage.SharedStorageAccessParams,
85+
scope: Protocol.Storage.SharedStorageAccessScope.SharedStorageWorklet,
8086
},
8187
{
8288
accessTime: 15,
83-
type: Protocol.Storage.SharedStorageAccessType.WorkletLength,
89+
method: Protocol.Storage.SharedStorageAccessMethod.Length,
8490
mainFrameId: ID,
8591
ownerOrigin: TEST_ORIGIN_A,
92+
ownerSite: TEST_SITE_A,
8693
params: {} as Protocol.Storage.SharedStorageAccessParams,
94+
scope: Protocol.Storage.SharedStorageAccessScope.SharedStorageWorklet,
8795
},
8896
{
8997
accessTime: 20,
90-
type: Protocol.Storage.SharedStorageAccessType.DocumentClear,
98+
method: Protocol.Storage.SharedStorageAccessMethod.Clear,
9199
mainFrameId: ID,
92100
ownerOrigin: TEST_ORIGIN_C,
101+
ownerSite: TEST_SITE_C,
93102
params: {} as Protocol.Storage.SharedStorageAccessParams,
103+
scope: Protocol.Storage.SharedStorageAccessScope.Window,
94104
},
95105
{
96106
accessTime: 100,
97-
type: Protocol.Storage.SharedStorageAccessType.WorkletSet,
107+
method: Protocol.Storage.SharedStorageAccessMethod.Set,
98108
mainFrameId: ID,
99109
ownerOrigin: TEST_ORIGIN_C,
110+
ownerSite: TEST_SITE_C,
100111
params: {key: 'key0', value: 'value1', ignoreIfPresent: true} as Protocol.Storage.SharedStorageAccessParams,
112+
scope: Protocol.Storage.SharedStorageAccessScope.SharedStorageWorklet,
101113
},
102114
{
103115
accessTime: 150,
104-
type: Protocol.Storage.SharedStorageAccessType.WorkletRemainingBudget,
116+
method: Protocol.Storage.SharedStorageAccessMethod.RemainingBudget,
105117
mainFrameId: ID,
106118
ownerOrigin: TEST_ORIGIN_C,
119+
ownerSite: TEST_SITE_C,
107120
params: {} as Protocol.Storage.SharedStorageAccessParams,
121+
scope: Protocol.Storage.SharedStorageAccessScope.SharedStorageWorklet,
108122
},
109123
];
110124

front_end/panels/application/SharedStorageEventsView.test.ts

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ import View = Resources.SharedStorageEventsView;
1212

1313
describeWithMockConnection('SharedStorageEventsView', () => {
1414
const TEST_ORIGIN_A = 'http://a.test';
15+
const TEST_SITE_A = TEST_ORIGIN_A;
1516
const TEST_ORIGIN_B = 'http://b.test';
17+
const TEST_SITE_B = TEST_ORIGIN_B;
1618
const TEST_ORIGIN_C = 'http://c.test';
19+
const TEST_SITE_C = TEST_ORIGIN_C;
1720

1821
const ID_A = 'AA' as Protocol.Page.FrameId;
1922
const ID_B = 'BB' as Protocol.Page.FrameId;
@@ -22,107 +25,135 @@ describeWithMockConnection('SharedStorageEventsView', () => {
2225
const EVENTS = [
2326
{
2427
accessTime: 0,
25-
type: Protocol.Storage.SharedStorageAccessType.DocumentAppend,
28+
method: Protocol.Storage.SharedStorageAccessMethod.Append,
2629
mainFrameId: ID_A,
2730
ownerOrigin: TEST_ORIGIN_A,
31+
ownerSite: TEST_SITE_A,
2832
params: {key: 'key0', value: 'value0'} as Protocol.Storage.SharedStorageAccessParams,
33+
scope: Protocol.Storage.SharedStorageAccessScope.Window,
2934
},
3035
{
3136
accessTime: 10,
32-
type: Protocol.Storage.SharedStorageAccessType.WorkletGet,
37+
method: Protocol.Storage.SharedStorageAccessMethod.Get,
3338
mainFrameId: ID_A,
3439
ownerOrigin: TEST_ORIGIN_A,
40+
ownerSite: TEST_SITE_A,
3541
params: {key: 'key0'} as Protocol.Storage.SharedStorageAccessParams,
42+
scope: Protocol.Storage.SharedStorageAccessScope.SharedStorageWorklet,
3643
},
3744
{
3845
accessTime: 15,
39-
type: Protocol.Storage.SharedStorageAccessType.WorkletLength,
46+
method: Protocol.Storage.SharedStorageAccessMethod.Length,
4047
mainFrameId: ID_A,
4148
ownerOrigin: TEST_ORIGIN_B,
49+
ownerSite: TEST_SITE_B,
4250
params: {} as Protocol.Storage.SharedStorageAccessParams,
51+
scope: Protocol.Storage.SharedStorageAccessScope.SharedStorageWorklet,
4352
},
4453
{
4554
accessTime: 20,
46-
type: Protocol.Storage.SharedStorageAccessType.DocumentClear,
55+
method: Protocol.Storage.SharedStorageAccessMethod.Clear,
4756
mainFrameId: ID_A,
4857
ownerOrigin: TEST_ORIGIN_B,
58+
ownerSite: TEST_SITE_B,
4959
params: {} as Protocol.Storage.SharedStorageAccessParams,
60+
scope: Protocol.Storage.SharedStorageAccessScope.Window,
5061
},
5162
{
5263
accessTime: 100,
53-
type: Protocol.Storage.SharedStorageAccessType.WorkletSet,
64+
method: Protocol.Storage.SharedStorageAccessMethod.Set,
5465
mainFrameId: ID_A,
5566
ownerOrigin: TEST_ORIGIN_C,
67+
ownerSite: TEST_SITE_C,
5668
params: {key: 'key0', value: 'value1', ignoreIfPresent: true} as Protocol.Storage.SharedStorageAccessParams,
69+
scope: Protocol.Storage.SharedStorageAccessScope.SharedStorageWorklet,
5770
},
5871
{
5972
accessTime: 150,
60-
type: Protocol.Storage.SharedStorageAccessType.WorkletRemainingBudget,
73+
method: Protocol.Storage.SharedStorageAccessMethod.RemainingBudget,
6174
mainFrameId: ID_A,
6275
ownerOrigin: TEST_ORIGIN_C,
76+
ownerSite: TEST_SITE_C,
6377
params: {} as Protocol.Storage.SharedStorageAccessParams,
78+
scope: Protocol.Storage.SharedStorageAccessScope.SharedStorageWorklet,
6479
},
6580
];
6681

6782
const MULTI_PAGE_EVENTS = [
6883
{
6984
accessTime: 0,
70-
type: Protocol.Storage.SharedStorageAccessType.DocumentAppend,
85+
method: Protocol.Storage.SharedStorageAccessMethod.Append,
7186
mainFrameId: ID_A,
7287
ownerOrigin: TEST_ORIGIN_A,
88+
ownerSite: TEST_SITE_A,
7389
params: {key: 'key0', value: 'value0'} as Protocol.Storage.SharedStorageAccessParams,
90+
scope: Protocol.Storage.SharedStorageAccessScope.Window,
7491
},
7592
{
7693
accessTime: 10,
77-
type: Protocol.Storage.SharedStorageAccessType.WorkletGet,
94+
method: Protocol.Storage.SharedStorageAccessMethod.Get,
7895
mainFrameId: ID_B,
7996
ownerOrigin: TEST_ORIGIN_A,
97+
ownerSite: TEST_SITE_A,
8098
params: {key: 'key0'} as Protocol.Storage.SharedStorageAccessParams,
99+
scope: Protocol.Storage.SharedStorageAccessScope.SharedStorageWorklet,
81100
},
82101
{
83102
accessTime: 15,
84-
type: Protocol.Storage.SharedStorageAccessType.WorkletLength,
103+
method: Protocol.Storage.SharedStorageAccessMethod.Length,
85104
mainFrameId: ID_A,
86105
ownerOrigin: TEST_ORIGIN_B,
106+
ownerSite: TEST_SITE_B,
87107
params: {} as Protocol.Storage.SharedStorageAccessParams,
108+
scope: Protocol.Storage.SharedStorageAccessScope.SharedStorageWorklet,
88109
},
89110
{
90111
accessTime: 20,
91-
type: Protocol.Storage.SharedStorageAccessType.DocumentClear,
112+
method: Protocol.Storage.SharedStorageAccessMethod.Clear,
92113
mainFrameId: EMPTY_ID,
93114
ownerOrigin: TEST_ORIGIN_B,
115+
ownerSite: TEST_SITE_B,
94116
params: {} as Protocol.Storage.SharedStorageAccessParams,
117+
scope: Protocol.Storage.SharedStorageAccessScope.Window,
95118
},
96119
{
97120
accessTime: 100,
98-
type: Protocol.Storage.SharedStorageAccessType.WorkletSet,
121+
method: Protocol.Storage.SharedStorageAccessMethod.Set,
99122
mainFrameId: EMPTY_ID,
100123
ownerOrigin: TEST_ORIGIN_C,
124+
ownerSite: TEST_SITE_C,
101125
params: {key: 'key0', value: 'value1', ignoreIfPresent: true} as Protocol.Storage.SharedStorageAccessParams,
126+
scope: Protocol.Storage.SharedStorageAccessScope.SharedStorageWorklet,
102127
},
103128
{
104129
accessTime: 150,
105-
type: Protocol.Storage.SharedStorageAccessType.WorkletRemainingBudget,
130+
method: Protocol.Storage.SharedStorageAccessMethod.RemainingBudget,
106131
mainFrameId: ID_B,
107132
ownerOrigin: TEST_ORIGIN_C,
133+
ownerSite: TEST_SITE_C,
108134
params: {} as Protocol.Storage.SharedStorageAccessParams,
135+
scope: Protocol.Storage.SharedStorageAccessScope.SharedStorageWorklet,
109136
},
110137
];
111138

112139
const PAGE_A_EVENTS = [
113140
{
114141
accessTime: 0,
115-
type: Protocol.Storage.SharedStorageAccessType.DocumentAppend,
142+
method: Protocol.Storage.SharedStorageAccessMethod.Append,
116143
mainFrameId: ID_A,
117144
ownerOrigin: TEST_ORIGIN_A,
145+
ownerSite: TEST_SITE_A,
118146
params: {key: 'key0', value: 'value0'} as Protocol.Storage.SharedStorageAccessParams,
147+
scope: Protocol.Storage.SharedStorageAccessScope.Window,
119148
},
120149
{
121150
accessTime: 15,
122-
type: Protocol.Storage.SharedStorageAccessType.WorkletLength,
151+
method: Protocol.Storage.SharedStorageAccessMethod.Length,
123152
mainFrameId: ID_A,
124153
ownerOrigin: TEST_ORIGIN_B,
154+
ownerSite: TEST_SITE_B,
125155
params: {} as Protocol.Storage.SharedStorageAccessParams,
156+
scope: Protocol.Storage.SharedStorageAccessScope.SharedStorageWorklet,
126157
},
127158
];
128159

0 commit comments

Comments
 (0)