Skip to content

Commit

Permalink
update chromium revision
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmood committed Aug 3, 2022
1 parent c4873dc commit db6d1d0
Show file tree
Hide file tree
Showing 13 changed files with 329 additions and 22 deletions.
4 changes: 2 additions & 2 deletions lib/launcher/revision.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package launcher

// RevisionDefault for chromium
const RevisionDefault = 1018003
const RevisionDefault = 1030087

// RevisionPlaywright for arm linux
const RevisionPlaywright = 1012
const RevisionPlaywright = 1015
2 changes: 1 addition & 1 deletion lib/launcher/revision/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func has(list []int, i int) bool {
}

func getFromPlaywright() int {
pv := strings.TrimSpace(utils.ExecLine(false, "npm -s show playwright version"))
pv := strings.TrimSpace(utils.ExecLine(false, "npm --no-update-notifier -s show playwright version"))
out := fetch(fmt.Sprintf("https://raw.githubusercontent.com/microsoft/playwright/v%s/packages/playwright-core/browsers.json", pv))
rev, err := strconv.ParseInt(gson.NewFrom(out).Get("browsers.0.revision").Str(), 10, 32)
utils.E(err)
Expand Down
3 changes: 3 additions & 0 deletions lib/proto/accessibility.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,9 @@ type AccessibilityAXNode struct {
// Role (optional) This `Node`'s role, whether explicit or implicit.
Role *AccessibilityAXValue `json:"role,omitempty"`

// ChromeRole (optional) This `Node`'s Chrome raw role.
ChromeRole *AccessibilityAXValue `json:"chromeRole,omitempty"`

// Name (optional) The accessible name for this `Node`.
Name *AccessibilityAXValue `json:"name,omitempty"`

Expand Down
32 changes: 25 additions & 7 deletions lib/proto/audits.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,14 +525,20 @@ const (
// AuditsAttributionReportingIssueTypePermissionPolicyDisabled enum const
AuditsAttributionReportingIssueTypePermissionPolicyDisabled AuditsAttributionReportingIssueType = "PermissionPolicyDisabled"

// AuditsAttributionReportingIssueTypeAttributionSourceUntrustworthyOrigin enum const
AuditsAttributionReportingIssueTypeAttributionSourceUntrustworthyOrigin AuditsAttributionReportingIssueType = "AttributionSourceUntrustworthyOrigin"
// AuditsAttributionReportingIssueTypeUntrustworthyReportingOrigin enum const
AuditsAttributionReportingIssueTypeUntrustworthyReportingOrigin AuditsAttributionReportingIssueType = "UntrustworthyReportingOrigin"

// AuditsAttributionReportingIssueTypeAttributionUntrustworthyOrigin enum const
AuditsAttributionReportingIssueTypeAttributionUntrustworthyOrigin AuditsAttributionReportingIssueType = "AttributionUntrustworthyOrigin"
// AuditsAttributionReportingIssueTypeInsecureContext enum const
AuditsAttributionReportingIssueTypeInsecureContext AuditsAttributionReportingIssueType = "InsecureContext"

// AuditsAttributionReportingIssueTypeInvalidHeader enum const
AuditsAttributionReportingIssueTypeInvalidHeader AuditsAttributionReportingIssueType = "InvalidHeader"

// AuditsAttributionReportingIssueTypeInvalidRegisterTriggerHeader enum const
AuditsAttributionReportingIssueTypeInvalidRegisterTriggerHeader AuditsAttributionReportingIssueType = "InvalidRegisterTriggerHeader"

// AuditsAttributionReportingIssueTypeInvalidEligibleHeader enum const
AuditsAttributionReportingIssueTypeInvalidEligibleHeader AuditsAttributionReportingIssueType = "InvalidEligibleHeader"
)

// AuditsAttributionReportingIssueDetails Details for issues around "Attribution Reporting API" usage.
Expand All @@ -542,9 +548,6 @@ type AuditsAttributionReportingIssueDetails struct {
// ViolationType ...
ViolationType AuditsAttributionReportingIssueType `json:"violationType"`

// Frame (optional) ...
Frame *AuditsAffectedFrame `json:"frame,omitempty"`

// Request (optional) ...
Request *AuditsAffectedRequest `json:"request,omitempty"`

Expand Down Expand Up @@ -647,6 +650,9 @@ const (
// AuditsDeprecationIssueTypeEventPath enum const
AuditsDeprecationIssueTypeEventPath AuditsDeprecationIssueType = "EventPath"

// AuditsDeprecationIssueTypeExpectCTHeader enum const
AuditsDeprecationIssueTypeExpectCTHeader AuditsDeprecationIssueType = "ExpectCTHeader"

// AuditsDeprecationIssueTypeGeolocationInsecureOrigin enum const
AuditsDeprecationIssueTypeGeolocationInsecureOrigin AuditsDeprecationIssueType = "GeolocationInsecureOrigin"

Expand Down Expand Up @@ -677,6 +683,12 @@ const (
// AuditsDeprecationIssueTypeMediaSourceDurationTruncatingBuffered enum const
AuditsDeprecationIssueTypeMediaSourceDurationTruncatingBuffered AuditsDeprecationIssueType = "MediaSourceDurationTruncatingBuffered"

// AuditsDeprecationIssueTypeNavigateEventRestoreScroll enum const
AuditsDeprecationIssueTypeNavigateEventRestoreScroll AuditsDeprecationIssueType = "NavigateEventRestoreScroll"

// AuditsDeprecationIssueTypeNavigateEventTransitionWhile enum const
AuditsDeprecationIssueTypeNavigateEventTransitionWhile AuditsDeprecationIssueType = "NavigateEventTransitionWhile"

// AuditsDeprecationIssueTypeNoSysexWebMIDIWithoutPermission enum const
AuditsDeprecationIssueTypeNoSysexWebMIDIWithoutPermission AuditsDeprecationIssueType = "NoSysexWebMIDIWithoutPermission"

Expand All @@ -692,6 +704,12 @@ const (
// AuditsDeprecationIssueTypeOpenWebDatabaseInsecureContext enum const
AuditsDeprecationIssueTypeOpenWebDatabaseInsecureContext AuditsDeprecationIssueType = "OpenWebDatabaseInsecureContext"

// AuditsDeprecationIssueTypeOverflowVisibleOnReplacedElement enum const
AuditsDeprecationIssueTypeOverflowVisibleOnReplacedElement AuditsDeprecationIssueType = "OverflowVisibleOnReplacedElement"

// AuditsDeprecationIssueTypePersistentQuotaType enum const
AuditsDeprecationIssueTypePersistentQuotaType AuditsDeprecationIssueType = "PersistentQuotaType"

// AuditsDeprecationIssueTypePictureSourceSrc enum const
AuditsDeprecationIssueTypePictureSourceSrc AuditsDeprecationIssueType = "PictureSourceSrc"

Expand Down
32 changes: 32 additions & 0 deletions lib/proto/css.go
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,9 @@ type CSSGetMatchedStylesForNodeResult struct {

// CSSKeyframesRules (optional) A list of CSS keyframed animations matching this node.
CSSKeyframesRules []*CSSCSSKeyframesRule `json:"cssKeyframesRules,omitempty"`

// ParentLayoutNodeID (experimental) (optional) Id of the first parent element that does not have display: contents.
ParentLayoutNodeID DOMNodeID `json:"parentLayoutNodeId,omitempty"`
}

// CSSGetMediaQueries Returns all media queries parsed by the rendering engine.
Expand Down Expand Up @@ -1073,6 +1076,35 @@ type CSSSetSupportsTextResult struct {
Supports *CSSCSSSupports `json:"supports"`
}

// CSSSetScopeText (experimental) Modifies the expression of a scope at-rule.
type CSSSetScopeText struct {

// StyleSheetID ...
StyleSheetID CSSStyleSheetID `json:"styleSheetId"`

// Range ...
Range *CSSSourceRange `json:"range"`

// Text ...
Text string `json:"text"`
}

// ProtoReq name
func (m CSSSetScopeText) ProtoReq() string { return "CSS.setScopeText" }

// Call the request
func (m CSSSetScopeText) Call(c Client) (*CSSSetScopeTextResult, error) {
var res CSSSetScopeTextResult
return &res, call(m.ProtoReq(), m, &res, c)
}

// CSSSetScopeTextResult (experimental) ...
type CSSSetScopeTextResult struct {

// Scope The resulting CSS Scope rule after modification.
Scope *CSSCSSScope `json:"scope"`
}

// CSSSetRuleSelector Modifies the rule selector.
type CSSSetRuleSelector struct {

Expand Down
72 changes: 72 additions & 0 deletions lib/proto/debugger.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,16 @@ type DebuggerBreakLocation struct {
Type DebuggerBreakLocationType `json:"type,omitempty"`
}

// DebuggerWasmDisassemblyChunk (experimental) ...
type DebuggerWasmDisassemblyChunk struct {

// Lines The next chunk of disassembled lines.
Lines []string `json:"lines"`

// BytecodeOffsets The bytecode offsets describing the start of each line.
BytecodeOffsets []int `json:"bytecodeOffsets"`
}

// DebuggerScriptLanguage Enum of possible script languages.
type DebuggerScriptLanguage string

Expand Down Expand Up @@ -403,6 +413,68 @@ type DebuggerGetScriptSourceResult struct {
Bytecode []byte `json:"bytecode,omitempty"`
}

// DebuggerDisassembleWasmModule (experimental) ...
type DebuggerDisassembleWasmModule struct {

// ScriptID Id of the script to disassemble
ScriptID RuntimeScriptID `json:"scriptId"`
}

// ProtoReq name
func (m DebuggerDisassembleWasmModule) ProtoReq() string { return "Debugger.disassembleWasmModule" }

// Call the request
func (m DebuggerDisassembleWasmModule) Call(c Client) (*DebuggerDisassembleWasmModuleResult, error) {
var res DebuggerDisassembleWasmModuleResult
return &res, call(m.ProtoReq(), m, &res, c)
}

// DebuggerDisassembleWasmModuleResult (experimental) ...
type DebuggerDisassembleWasmModuleResult struct {

// StreamID (optional) For large modules, return a stream from which additional chunks of
// disassembly can be read successively.
StreamID string `json:"streamId,omitempty"`

// TotalNumberOfLines The total number of lines in the disassembly text.
TotalNumberOfLines int `json:"totalNumberOfLines"`

// FunctionBodyOffsets The offsets of all function bodies, in the format [start1, end1,
// start2, end2, ...] where all ends are exclusive.
FunctionBodyOffsets []int `json:"functionBodyOffsets"`

// Chunk The first chunk of disassembly.
Chunk *DebuggerWasmDisassemblyChunk `json:"chunk"`
}

// DebuggerNextWasmDisassemblyChunk (experimental) Disassemble the next chunk of lines for the module corresponding to the
// stream. If disassembly is complete, this API will invalidate the streamId
// and return an empty chunk. Any subsequent calls for the now invalid stream
// will return errors.
type DebuggerNextWasmDisassemblyChunk struct {

// StreamID ...
StreamID string `json:"streamId"`
}

// ProtoReq name
func (m DebuggerNextWasmDisassemblyChunk) ProtoReq() string {
return "Debugger.nextWasmDisassemblyChunk"
}

// Call the request
func (m DebuggerNextWasmDisassemblyChunk) Call(c Client) (*DebuggerNextWasmDisassemblyChunkResult, error) {
var res DebuggerNextWasmDisassemblyChunkResult
return &res, call(m.ProtoReq(), m, &res, c)
}

// DebuggerNextWasmDisassemblyChunkResult (experimental) ...
type DebuggerNextWasmDisassemblyChunkResult struct {

// Chunk The next chunk of disassembly.
Chunk *DebuggerWasmDisassemblyChunk `json:"chunk"`
}

// DebuggerGetWasmBytecode (deprecated) This command is deprecated. Use getScriptSource instead.
type DebuggerGetWasmBytecode struct {

Expand Down
11 changes: 11 additions & 0 deletions lib/proto/definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ var types = map[string]reflect.Type{
"CSS.setContainerQueryTextResult": reflect.TypeOf(CSSSetContainerQueryTextResult{}),
"CSS.setSupportsText": reflect.TypeOf(CSSSetSupportsText{}),
"CSS.setSupportsTextResult": reflect.TypeOf(CSSSetSupportsTextResult{}),
"CSS.setScopeText": reflect.TypeOf(CSSSetScopeText{}),
"CSS.setScopeTextResult": reflect.TypeOf(CSSSetScopeTextResult{}),
"CSS.setRuleSelector": reflect.TypeOf(CSSSetRuleSelector{}),
"CSS.setRuleSelectorResult": reflect.TypeOf(CSSSetRuleSelectorResult{}),
"CSS.setStyleSheetText": reflect.TypeOf(CSSSetStyleSheetText{}),
Expand Down Expand Up @@ -853,6 +855,7 @@ var types = map[string]reflect.Type{
"Storage.getStorageKeyForFrame": reflect.TypeOf(StorageGetStorageKeyForFrame{}),
"Storage.getStorageKeyForFrameResult": reflect.TypeOf(StorageGetStorageKeyForFrameResult{}),
"Storage.clearDataForOrigin": reflect.TypeOf(StorageClearDataForOrigin{}),
"Storage.clearDataForStorageKey": reflect.TypeOf(StorageClearDataForStorageKey{}),
"Storage.getCookies": reflect.TypeOf(StorageGetCookies{}),
"Storage.getCookiesResult": reflect.TypeOf(StorageGetCookiesResult{}),
"Storage.setCookies": reflect.TypeOf(StorageSetCookies{}),
Expand All @@ -862,8 +865,10 @@ var types = map[string]reflect.Type{
"Storage.overrideQuotaForOrigin": reflect.TypeOf(StorageOverrideQuotaForOrigin{}),
"Storage.trackCacheStorageForOrigin": reflect.TypeOf(StorageTrackCacheStorageForOrigin{}),
"Storage.trackIndexedDBForOrigin": reflect.TypeOf(StorageTrackIndexedDBForOrigin{}),
"Storage.trackIndexedDBForStorageKey": reflect.TypeOf(StorageTrackIndexedDBForStorageKey{}),
"Storage.untrackCacheStorageForOrigin": reflect.TypeOf(StorageUntrackCacheStorageForOrigin{}),
"Storage.untrackIndexedDBForOrigin": reflect.TypeOf(StorageUntrackIndexedDBForOrigin{}),
"Storage.untrackIndexedDBForStorageKey": reflect.TypeOf(StorageUntrackIndexedDBForStorageKey{}),
"Storage.getTrustTokens": reflect.TypeOf(StorageGetTrustTokens{}),
"Storage.getTrustTokensResult": reflect.TypeOf(StorageGetTrustTokensResult{}),
"Storage.clearTrustTokens": reflect.TypeOf(StorageClearTrustTokens{}),
Expand All @@ -888,6 +893,7 @@ var types = map[string]reflect.Type{
"SystemInfo.getProcessInfo": reflect.TypeOf(SystemInfoGetProcessInfo{}),
"SystemInfo.getProcessInfoResult": reflect.TypeOf(SystemInfoGetProcessInfoResult{}),
"Target.TargetInfo": reflect.TypeOf(TargetTargetInfo{}),
"Target.FilterEntry": reflect.TypeOf(TargetFilterEntry{}),
"Target.RemoteLocation": reflect.TypeOf(TargetRemoteLocation{}),
"Target.activateTarget": reflect.TypeOf(TargetActivateTarget{}),
"Target.attachToTarget": reflect.TypeOf(TargetAttachToTarget{}),
Expand Down Expand Up @@ -1014,6 +1020,7 @@ var types = map[string]reflect.Type{
"Debugger.Scope": reflect.TypeOf(DebuggerScope{}),
"Debugger.SearchMatch": reflect.TypeOf(DebuggerSearchMatch{}),
"Debugger.BreakLocation": reflect.TypeOf(DebuggerBreakLocation{}),
"Debugger.WasmDisassemblyChunk": reflect.TypeOf(DebuggerWasmDisassemblyChunk{}),
"Debugger.DebugSymbols": reflect.TypeOf(DebuggerDebugSymbols{}),
"Debugger.continueToLocation": reflect.TypeOf(DebuggerContinueToLocation{}),
"Debugger.disable": reflect.TypeOf(DebuggerDisable{}),
Expand All @@ -1025,6 +1032,10 @@ var types = map[string]reflect.Type{
"Debugger.getPossibleBreakpointsResult": reflect.TypeOf(DebuggerGetPossibleBreakpointsResult{}),
"Debugger.getScriptSource": reflect.TypeOf(DebuggerGetScriptSource{}),
"Debugger.getScriptSourceResult": reflect.TypeOf(DebuggerGetScriptSourceResult{}),
"Debugger.disassembleWasmModule": reflect.TypeOf(DebuggerDisassembleWasmModule{}),
"Debugger.disassembleWasmModuleResult": reflect.TypeOf(DebuggerDisassembleWasmModuleResult{}),
"Debugger.nextWasmDisassemblyChunk": reflect.TypeOf(DebuggerNextWasmDisassemblyChunk{}),
"Debugger.nextWasmDisassemblyChunkResult": reflect.TypeOf(DebuggerNextWasmDisassemblyChunkResult{}),
"Debugger.getWasmBytecode": reflect.TypeOf(DebuggerGetWasmBytecode{}),
"Debugger.getWasmBytecodeResult": reflect.TypeOf(DebuggerGetWasmBytecodeResult{}),
"Debugger.getStackTrace": reflect.TypeOf(DebuggerGetStackTrace{}),
Expand Down
36 changes: 36 additions & 0 deletions lib/proto/definitions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,12 @@ func (t T) CSSSetSupportsText() {
t.Nil(err)
}

func (t T) CSSSetScopeText() {
c := &Client{}
_, err := proto.CSSSetScopeText{}.Call(c)
t.Nil(err)
}

func (t T) CSSSetRuleSelector() {
c := &Client{}
_, err := proto.CSSSetRuleSelector{}.Call(c)
Expand Down Expand Up @@ -2891,6 +2897,12 @@ func (t T) StorageClearDataForOrigin() {
t.Nil(err)
}

func (t T) StorageClearDataForStorageKey() {
c := &Client{}
err := proto.StorageClearDataForStorageKey{}.Call(c)
t.Nil(err)
}

func (t T) StorageGetCookies() {
c := &Client{}
_, err := proto.StorageGetCookies{}.Call(c)
Expand Down Expand Up @@ -2933,6 +2945,12 @@ func (t T) StorageTrackIndexedDBForOrigin() {
t.Nil(err)
}

func (t T) StorageTrackIndexedDBForStorageKey() {
c := &Client{}
err := proto.StorageTrackIndexedDBForStorageKey{}.Call(c)
t.Nil(err)
}

func (t T) StorageUntrackCacheStorageForOrigin() {
c := &Client{}
err := proto.StorageUntrackCacheStorageForOrigin{}.Call(c)
Expand All @@ -2945,6 +2963,12 @@ func (t T) StorageUntrackIndexedDBForOrigin() {
t.Nil(err)
}

func (t T) StorageUntrackIndexedDBForStorageKey() {
c := &Client{}
err := proto.StorageUntrackIndexedDBForStorageKey{}.Call(c)
t.Nil(err)
}

func (t T) StorageGetTrustTokens() {
c := &Client{}
_, err := proto.StorageGetTrustTokens{}.Call(c)
Expand Down Expand Up @@ -3514,6 +3538,18 @@ func (t T) DebuggerGetScriptSource() {
t.Nil(err)
}

func (t T) DebuggerDisassembleWasmModule() {
c := &Client{}
_, err := proto.DebuggerDisassembleWasmModule{}.Call(c)
t.Nil(err)
}

func (t T) DebuggerNextWasmDisassemblyChunk() {
c := &Client{}
_, err := proto.DebuggerNextWasmDisassemblyChunk{}.Call(c)
t.Nil(err)
}

func (t T) DebuggerGetWasmBytecode() {
c := &Client{}
_, err := proto.DebuggerGetWasmBytecode{}.Call(c)
Expand Down
Loading

0 comments on commit db6d1d0

Please sign in to comment.