From 23221e42659c016a89d509895ff2e83854bfcd39 Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Mon, 13 Mar 2017 09:29:26 +0700 Subject: [PATCH] Updating to latest protocol.json --- cdp/cdp.go | 12 +- cdp/cdputil/cdputil.go | 8 +- cdp/css/easyjson.go | 40 +-- cdp/css/types.go | 4 +- cdp/debugger/debugger.go | 24 +- cdp/debugger/easyjson.go | 438 +++++++++++++++++++++++---------- cdp/debugger/events.go | 2 + cdp/debugger/types.go | 53 ++++ cdp/network/easyjson.go | 387 +++++++++++++---------------- cdp/network/network.go | 43 +--- cdp/page/easyjson.go | 10 + cdp/page/page.go | 12 +- cdp/profiler/easyjson.go | 40 +-- cdp/profiler/types.go | 8 +- cmd/chromedp-gen/protocol.json | 119 ++++++--- 15 files changed, 727 insertions(+), 473 deletions(-) diff --git a/cdp/cdp.go b/cdp/cdp.go index 351acd6..0b3f415 100644 --- a/cdp/cdp.go +++ b/cdp/cdp.go @@ -147,8 +147,7 @@ const ( CommandNetworkSetUserAgentOverride MethodType = "Network.setUserAgentOverride" CommandNetworkSetExtraHTTPHeaders MethodType = "Network.setExtraHTTPHeaders" CommandNetworkGetResponseBody MethodType = "Network.getResponseBody" - CommandNetworkAddBlockedURL MethodType = "Network.addBlockedURL" - CommandNetworkRemoveBlockedURL MethodType = "Network.removeBlockedURL" + CommandNetworkSetBlockedURLS MethodType = "Network.setBlockedURLs" CommandNetworkReplayXHR MethodType = "Network.replayXHR" CommandNetworkSetMonitoringXHREnabled MethodType = "Network.setMonitoringXHREnabled" CommandNetworkCanClearBrowserCache MethodType = "Network.canClearBrowserCache" @@ -418,6 +417,7 @@ const ( CommandDebuggerStepInto MethodType = "Debugger.stepInto" CommandDebuggerStepOut MethodType = "Debugger.stepOut" CommandDebuggerPause MethodType = "Debugger.pause" + CommandDebuggerScheduleStepIntoAsync MethodType = "Debugger.scheduleStepIntoAsync" CommandDebuggerResume MethodType = "Debugger.resume" CommandDebuggerSearchInContent MethodType = "Debugger.searchInContent" CommandDebuggerSetScriptSource MethodType = "Debugger.setScriptSource" @@ -667,10 +667,8 @@ func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = CommandNetworkSetExtraHTTPHeaders case CommandNetworkGetResponseBody: *t = CommandNetworkGetResponseBody - case CommandNetworkAddBlockedURL: - *t = CommandNetworkAddBlockedURL - case CommandNetworkRemoveBlockedURL: - *t = CommandNetworkRemoveBlockedURL + case CommandNetworkSetBlockedURLS: + *t = CommandNetworkSetBlockedURLS case CommandNetworkReplayXHR: *t = CommandNetworkReplayXHR case CommandNetworkSetMonitoringXHREnabled: @@ -1209,6 +1207,8 @@ func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = CommandDebuggerStepOut case CommandDebuggerPause: *t = CommandDebuggerPause + case CommandDebuggerScheduleStepIntoAsync: + *t = CommandDebuggerScheduleStepIntoAsync case CommandDebuggerResume: *t = CommandDebuggerResume case CommandDebuggerSearchInContent: diff --git a/cdp/cdputil/cdputil.go b/cdp/cdputil/cdputil.go index ad97918..2df2599 100644 --- a/cdp/cdputil/cdputil.go +++ b/cdp/cdputil/cdputil.go @@ -295,10 +295,7 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) { case cdp.CommandNetworkGetResponseBody: v = new(network.GetResponseBodyReturns) - case cdp.CommandNetworkAddBlockedURL: - return emptyVal, nil - - case cdp.CommandNetworkRemoveBlockedURL: + case cdp.CommandNetworkSetBlockedURLS: return emptyVal, nil case cdp.CommandNetworkReplayXHR: @@ -1138,6 +1135,9 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) { case cdp.CommandDebuggerPause: return emptyVal, nil + case cdp.CommandDebuggerScheduleStepIntoAsync: + return emptyVal, nil + case cdp.CommandDebuggerResume: return emptyVal, nil diff --git a/cdp/css/easyjson.go b/cdp/css/easyjson.go index af60acc..796a387 100644 --- a/cdp/css/easyjson.go +++ b/cdp/css/easyjson.go @@ -152,6 +152,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss1(in *jlexer.Lexer, out *St out.StartLine = float64(in.Float64()) case "startColumn": out.StartColumn = float64(in.Float64()) + case "length": + out.Length = float64(in.Float64()) default: in.SkipRecursive() } @@ -262,6 +264,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss1(out *jwriter.Writer, in S out.RawString("\"startColumn\":") out.Float64(float64(in.StartColumn)) } + if in.Length != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"length\":") + out.Float64(float64(in.Length)) + } out.RawByte('}') } @@ -2140,16 +2150,10 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpCss21(in *jlexer.Lexer, out *R switch key { case "styleSheetId": out.StyleSheetID = StyleSheetID(in.String()) - case "range": - if in.IsNull() { - in.Skip() - out.Range = nil - } else { - if out.Range == nil { - out.Range = new(SourceRange) - } - (*out.Range).UnmarshalEasyJSON(in) - } + case "startOffset": + out.StartOffset = float64(in.Float64()) + case "endOffset": + out.EndOffset = float64(in.Float64()) case "used": out.Used = bool(in.Bool()) default: @@ -2174,17 +2178,21 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss21(out *jwriter.Writer, in out.RawString("\"styleSheetId\":") out.String(string(in.StyleSheetID)) } - if in.Range != nil { + if in.StartOffset != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"range\":") - if in.Range == nil { - out.RawString("null") - } else { - (*in.Range).MarshalEasyJSON(out) + out.RawString("\"startOffset\":") + out.Float64(float64(in.StartOffset)) + } + if in.EndOffset != 0 { + if !first { + out.RawByte(',') } + first = false + out.RawString("\"endOffset\":") + out.Float64(float64(in.EndOffset)) } if in.Used { if !first { diff --git a/cdp/css/types.go b/cdp/css/types.go index 7c00299..30f048d 100644 --- a/cdp/css/types.go +++ b/cdp/css/types.go @@ -116,6 +116,7 @@ type StyleSheetHeader struct { IsInline bool `json:"isInline,omitempty"` // Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags. StartLine float64 `json:"startLine,omitempty"` // Line offset of the stylesheet within the resource (zero based). StartColumn float64 `json:"startColumn,omitempty"` // Column offset of the stylesheet within the resource (zero based). + Length float64 `json:"length,omitempty"` // Size of the content (in characters). } // Rule cSS rule representation. @@ -130,7 +131,8 @@ type Rule struct { // RuleUsage cSS rule usage information. type RuleUsage struct { StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from. - Range *SourceRange `json:"range,omitempty"` // Style declaration range in the enclosing stylesheet (if available). + StartOffset float64 `json:"startOffset,omitempty"` // Offset of the start of the rule (including selector) from the beginning of the stylesheet. + EndOffset float64 `json:"endOffset,omitempty"` // Offset of the end of the rule body from the beginning of the stylesheet. Used bool `json:"used,omitempty"` // Indicates whether the rule was actually used by some element in the page. } diff --git a/cdp/debugger/debugger.go b/cdp/debugger/debugger.go index c32e3f1..22c988b 100644 --- a/cdp/debugger/debugger.go +++ b/cdp/debugger/debugger.go @@ -274,7 +274,7 @@ func (p GetPossibleBreakpointsParams) WithRestrictToFunction(restrictToFunction // GetPossibleBreakpointsReturns return values. type GetPossibleBreakpointsReturns struct { - Locations []*Location `json:"locations,omitempty"` // List of the possible breakpoint locations. + Locations []*BreakLocation `json:"locations,omitempty"` // List of the possible breakpoint locations. } // Do executes Debugger.getPossibleBreakpoints against the provided context and @@ -282,7 +282,7 @@ type GetPossibleBreakpointsReturns struct { // // returns: // locations - List of the possible breakpoint locations. -func (p *GetPossibleBreakpointsParams) Do(ctxt context.Context, h cdp.Handler) (locations []*Location, err error) { +func (p *GetPossibleBreakpointsParams) Do(ctxt context.Context, h cdp.Handler) (locations []*BreakLocation, err error) { // execute var res GetPossibleBreakpointsReturns err = h.Execute(ctxt, cdp.CommandDebuggerGetPossibleBreakpoints, p, &res) @@ -371,6 +371,26 @@ func (p *PauseParams) Do(ctxt context.Context, h cdp.Handler) (err error) { return h.Execute(ctxt, cdp.CommandDebuggerPause, nil, nil) } +// ScheduleStepIntoAsyncParams steps into next scheduled async task if any is +// scheduled before next pause. Returns success when async task is actually +// scheduled, returns error if no task were scheduled or another +// scheduleStepIntoAsync was called. +type ScheduleStepIntoAsyncParams struct{} + +// ScheduleStepIntoAsync steps into next scheduled async task if any is +// scheduled before next pause. Returns success when async task is actually +// scheduled, returns error if no task were scheduled or another +// scheduleStepIntoAsync was called. +func ScheduleStepIntoAsync() *ScheduleStepIntoAsyncParams { + return &ScheduleStepIntoAsyncParams{} +} + +// Do executes Debugger.scheduleStepIntoAsync against the provided context and +// target handler. +func (p *ScheduleStepIntoAsyncParams) Do(ctxt context.Context, h cdp.Handler) (err error) { + return h.Execute(ctxt, cdp.CommandDebuggerScheduleStepIntoAsync, nil, nil) +} + // ResumeParams resumes JavaScript execution. type ResumeParams struct{} diff --git a/cdp/debugger/easyjson.go b/cdp/debugger/easyjson.go index 1a61a43..3405aa6 100644 --- a/cdp/debugger/easyjson.go +++ b/cdp/debugger/easyjson.go @@ -1957,7 +1957,7 @@ func (v *Scope) UnmarshalJSON(data []byte) error { func (v *Scope) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger20(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger21(in *jlexer.Lexer, out *ResumeParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger21(in *jlexer.Lexer, out *ScheduleStepIntoAsyncParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1986,7 +1986,66 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger21(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger21(out *jwriter.Writer, in ResumeParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger21(out *jwriter.Writer, in ScheduleStepIntoAsyncParams) { + out.RawByte('{') + first := true + _ = first + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ScheduleStepIntoAsyncParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger21(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ScheduleStepIntoAsyncParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger21(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ScheduleStepIntoAsyncParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger21(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ScheduleStepIntoAsyncParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger21(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger22(in *jlexer.Lexer, out *ResumeParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger22(out *jwriter.Writer, in ResumeParams) { out.RawByte('{') first := true _ = first @@ -1996,27 +2055,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger21(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v ResumeParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger21(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger22(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ResumeParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger21(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger22(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ResumeParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger21(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger22(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ResumeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger21(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger22(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger22(in *jlexer.Lexer, out *RestartFrameReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger23(in *jlexer.Lexer, out *RestartFrameReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2086,7 +2145,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger22(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger22(out *jwriter.Writer, in RestartFrameReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger23(out *jwriter.Writer, in RestartFrameReturns) { out.RawByte('{') first := true _ = first @@ -2131,27 +2190,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger22(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v RestartFrameReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger22(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger23(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v RestartFrameReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger22(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger23(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *RestartFrameReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger22(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger23(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *RestartFrameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger22(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger23(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger23(in *jlexer.Lexer, out *RestartFrameParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger24(in *jlexer.Lexer, out *RestartFrameParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2182,7 +2241,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger23(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger23(out *jwriter.Writer, in RestartFrameParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger24(out *jwriter.Writer, in RestartFrameParams) { out.RawByte('{') first := true _ = first @@ -2198,27 +2257,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger23(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v RestartFrameParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger23(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger24(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v RestartFrameParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger23(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger24(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *RestartFrameParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger23(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger24(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *RestartFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger23(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger24(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger24(in *jlexer.Lexer, out *RemoveBreakpointParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger25(in *jlexer.Lexer, out *RemoveBreakpointParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2249,7 +2308,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger24(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger24(out *jwriter.Writer, in RemoveBreakpointParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger25(out *jwriter.Writer, in RemoveBreakpointParams) { out.RawByte('{') first := true _ = first @@ -2265,27 +2324,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger24(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v RemoveBreakpointParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger24(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger25(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v RemoveBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger24(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger25(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *RemoveBreakpointParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger24(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger25(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *RemoveBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger24(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger25(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger25(in *jlexer.Lexer, out *PauseParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger26(in *jlexer.Lexer, out *PauseParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2314,7 +2373,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger25(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger25(out *jwriter.Writer, in PauseParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger26(out *jwriter.Writer, in PauseParams) { out.RawByte('{') first := true _ = first @@ -2324,27 +2383,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger25(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v PauseParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger25(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger26(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v PauseParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger25(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger26(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *PauseParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger25(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger26(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *PauseParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger25(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger26(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger26(in *jlexer.Lexer, out *Location) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger27(in *jlexer.Lexer, out *Location) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2379,7 +2438,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger26(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger26(out *jwriter.Writer, in Location) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger27(out *jwriter.Writer, in Location) { out.RawByte('{') first := true _ = first @@ -2413,27 +2472,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger26(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v Location) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger26(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger27(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Location) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger26(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger27(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Location) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger26(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger27(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Location) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger26(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger27(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger27(in *jlexer.Lexer, out *GetScriptSourceReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger28(in *jlexer.Lexer, out *GetScriptSourceReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2464,7 +2523,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger27(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger27(out *jwriter.Writer, in GetScriptSourceReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger28(out *jwriter.Writer, in GetScriptSourceReturns) { out.RawByte('{') first := true _ = first @@ -2482,27 +2541,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger27(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v GetScriptSourceReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger27(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger28(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetScriptSourceReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger27(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger28(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetScriptSourceReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger27(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger28(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetScriptSourceReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger27(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger28(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger28(in *jlexer.Lexer, out *GetScriptSourceParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger29(in *jlexer.Lexer, out *GetScriptSourceParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2533,7 +2592,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger28(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger28(out *jwriter.Writer, in GetScriptSourceParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger29(out *jwriter.Writer, in GetScriptSourceParams) { out.RawByte('{') first := true _ = first @@ -2549,27 +2608,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger28(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v GetScriptSourceParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger28(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger29(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetScriptSourceParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger28(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger29(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetScriptSourceParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger28(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger29(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetScriptSourceParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger28(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger29(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger29(in *jlexer.Lexer, out *GetPossibleBreakpointsReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger30(in *jlexer.Lexer, out *GetPossibleBreakpointsReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2596,21 +2655,21 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger29(in *jlexer.Lexer, o in.Delim('[') if out.Locations == nil { if !in.IsDelim(']') { - out.Locations = make([]*Location, 0, 8) + out.Locations = make([]*BreakLocation, 0, 8) } else { - out.Locations = []*Location{} + out.Locations = []*BreakLocation{} } } else { out.Locations = (out.Locations)[:0] } for !in.IsDelim(']') { - var v19 *Location + var v19 *BreakLocation if in.IsNull() { in.Skip() v19 = nil } else { if v19 == nil { - v19 = new(Location) + v19 = new(BreakLocation) } (*v19).UnmarshalEasyJSON(in) } @@ -2629,7 +2688,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger29(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger29(out *jwriter.Writer, in GetPossibleBreakpointsReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger30(out *jwriter.Writer, in GetPossibleBreakpointsReturns) { out.RawByte('{') first := true _ = first @@ -2662,27 +2721,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger29(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v GetPossibleBreakpointsReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger29(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger30(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetPossibleBreakpointsReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger29(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger30(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetPossibleBreakpointsReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger29(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger30(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetPossibleBreakpointsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger29(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger30(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger30(in *jlexer.Lexer, out *GetPossibleBreakpointsParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger31(in *jlexer.Lexer, out *GetPossibleBreakpointsParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2733,7 +2792,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger30(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger30(out *jwriter.Writer, in GetPossibleBreakpointsParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger31(out *jwriter.Writer, in GetPossibleBreakpointsParams) { out.RawByte('{') first := true _ = first @@ -2773,27 +2832,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger30(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v GetPossibleBreakpointsParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger30(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger31(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v GetPossibleBreakpointsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger30(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger31(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *GetPossibleBreakpointsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger30(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger31(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *GetPossibleBreakpointsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger30(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger31(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger31(in *jlexer.Lexer, out *EventScriptParsed) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger32(in *jlexer.Lexer, out *EventScriptParsed) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2838,6 +2897,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger31(in *jlexer.Lexer, o out.HasSourceURL = bool(in.Bool()) case "isModule": out.IsModule = bool(in.Bool()) + case "length": + out.Length = int64(in.Int64()) default: in.SkipRecursive() } @@ -2848,7 +2909,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger31(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger31(out *jwriter.Writer, in EventScriptParsed) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger32(out *jwriter.Writer, in EventScriptParsed) { out.RawByte('{') first := true _ = first @@ -2956,33 +3017,41 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger31(out *jwriter.Writer out.RawString("\"isModule\":") out.Bool(bool(in.IsModule)) } + if in.Length != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"length\":") + out.Int64(int64(in.Length)) + } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v EventScriptParsed) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger31(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger32(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventScriptParsed) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger31(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger32(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventScriptParsed) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger31(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger32(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventScriptParsed) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger31(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger32(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger32(in *jlexer.Lexer, out *EventScriptFailedToParse) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger33(in *jlexer.Lexer, out *EventScriptFailedToParse) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3025,6 +3094,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger32(in *jlexer.Lexer, o out.HasSourceURL = bool(in.Bool()) case "isModule": out.IsModule = bool(in.Bool()) + case "length": + out.Length = int64(in.Int64()) default: in.SkipRecursive() } @@ -3035,7 +3106,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger32(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger32(out *jwriter.Writer, in EventScriptFailedToParse) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger33(out *jwriter.Writer, in EventScriptFailedToParse) { out.RawByte('{') first := true _ = first @@ -3135,33 +3206,41 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger32(out *jwriter.Writer out.RawString("\"isModule\":") out.Bool(bool(in.IsModule)) } + if in.Length != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"length\":") + out.Int64(int64(in.Length)) + } out.RawByte('}') } // MarshalJSON supports json.Marshaler interface func (v EventScriptFailedToParse) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger32(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger33(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventScriptFailedToParse) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger32(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger33(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventScriptFailedToParse) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger32(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger33(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventScriptFailedToParse) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger32(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger33(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger33(in *jlexer.Lexer, out *EventResumed) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger34(in *jlexer.Lexer, out *EventResumed) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3190,7 +3269,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger33(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger33(out *jwriter.Writer, in EventResumed) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger34(out *jwriter.Writer, in EventResumed) { out.RawByte('{') first := true _ = first @@ -3200,27 +3279,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger33(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v EventResumed) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger33(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger34(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventResumed) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger33(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger34(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventResumed) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger33(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger34(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventResumed) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger33(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger34(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger34(in *jlexer.Lexer, out *EventPaused) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger35(in *jlexer.Lexer, out *EventPaused) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3317,7 +3396,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger34(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger34(out *jwriter.Writer, in EventPaused) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger35(out *jwriter.Writer, in EventPaused) { out.RawByte('{') first := true _ = first @@ -3397,27 +3476,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger34(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v EventPaused) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger34(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger35(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventPaused) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger34(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger35(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventPaused) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger34(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger35(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventPaused) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger34(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger35(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger35(in *jlexer.Lexer, out *EventBreakpointResolved) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger36(in *jlexer.Lexer, out *EventBreakpointResolved) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3458,7 +3537,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger35(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger35(out *jwriter.Writer, in EventBreakpointResolved) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(out *jwriter.Writer, in EventBreakpointResolved) { out.RawByte('{') first := true _ = first @@ -3488,27 +3567,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger35(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v EventBreakpointResolved) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger35(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventBreakpointResolved) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger35(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventBreakpointResolved) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger35(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger36(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventBreakpointResolved) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger35(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger36(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger36(in *jlexer.Lexer, out *EvaluateOnCallFrameReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger37(in *jlexer.Lexer, out *EvaluateOnCallFrameReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3557,7 +3636,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger36(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(out *jwriter.Writer, in EvaluateOnCallFrameReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger37(out *jwriter.Writer, in EvaluateOnCallFrameReturns) { out.RawByte('{') first := true _ = first @@ -3591,27 +3670,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v EvaluateOnCallFrameReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger37(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EvaluateOnCallFrameReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger37(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EvaluateOnCallFrameReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger36(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger37(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EvaluateOnCallFrameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger36(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger37(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger37(in *jlexer.Lexer, out *EvaluateOnCallFrameParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger38(in *jlexer.Lexer, out *EvaluateOnCallFrameParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3656,7 +3735,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger37(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger37(out *jwriter.Writer, in EvaluateOnCallFrameParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger38(out *jwriter.Writer, in EvaluateOnCallFrameParams) { out.RawByte('{') first := true _ = first @@ -3726,27 +3805,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger37(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v EvaluateOnCallFrameParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger37(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger38(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EvaluateOnCallFrameParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger37(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger38(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EvaluateOnCallFrameParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger37(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger38(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EvaluateOnCallFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger37(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger38(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger38(in *jlexer.Lexer, out *EnableParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger39(in *jlexer.Lexer, out *EnableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3775,7 +3854,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger38(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger38(out *jwriter.Writer, in EnableParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger39(out *jwriter.Writer, in EnableParams) { out.RawByte('{') first := true _ = first @@ -3785,27 +3864,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger38(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v EnableParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger38(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger39(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger38(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger39(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EnableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger38(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger39(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger38(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger39(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger39(in *jlexer.Lexer, out *DisableParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger40(in *jlexer.Lexer, out *DisableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3834,7 +3913,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger39(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger39(out *jwriter.Writer, in DisableParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger40(out *jwriter.Writer, in DisableParams) { out.RawByte('{') first := true _ = first @@ -3844,27 +3923,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger39(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v DisableParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger39(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger40(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger39(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger40(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *DisableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger39(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger40(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger39(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger40(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger40(in *jlexer.Lexer, out *ContinueToLocationParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger41(in *jlexer.Lexer, out *ContinueToLocationParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3903,7 +3982,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger40(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger40(out *jwriter.Writer, in ContinueToLocationParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger41(out *jwriter.Writer, in ContinueToLocationParams) { out.RawByte('{') first := true _ = first @@ -3923,27 +4002,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger40(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v ContinueToLocationParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger40(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger41(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ContinueToLocationParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger40(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger41(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ContinueToLocationParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger40(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger41(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ContinueToLocationParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger40(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger41(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger41(in *jlexer.Lexer, out *CallFrame) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger42(in *jlexer.Lexer, out *CallFrame) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4047,7 +4126,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger41(in *jlexer.Lexer, o in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger41(out *jwriter.Writer, in CallFrame) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger42(out *jwriter.Writer, in CallFrame) { out.RawByte('{') first := true _ = first @@ -4144,23 +4223,122 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger41(out *jwriter.Writer // MarshalJSON supports json.Marshaler interface func (v CallFrame) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger41(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger42(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CallFrame) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger41(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger42(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CallFrame) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger41(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger42(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CallFrame) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger41(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger42(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger43(in *jlexer.Lexer, out *BreakLocation) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "scriptId": + out.ScriptID = runtime.ScriptID(in.String()) + case "lineNumber": + out.LineNumber = int64(in.Int64()) + case "columnNumber": + out.ColumnNumber = int64(in.Int64()) + case "type": + (out.Type).UnmarshalEasyJSON(in) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger43(out *jwriter.Writer, in BreakLocation) { + out.RawByte('{') + first := true + _ = first + if in.ScriptID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"scriptId\":") + out.String(string(in.ScriptID)) + } + if in.LineNumber != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"lineNumber\":") + out.Int64(int64(in.LineNumber)) + } + if in.ColumnNumber != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"columnNumber\":") + out.Int64(int64(in.ColumnNumber)) + } + if in.Type != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"type\":") + (in.Type).MarshalEasyJSON(out) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v BreakLocation) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger43(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v BreakLocation) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger43(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *BreakLocation) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger43(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *BreakLocation) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDebugger43(l, v) } diff --git a/cdp/debugger/events.go b/cdp/debugger/events.go index ff4e16d..08c6883 100644 --- a/cdp/debugger/events.go +++ b/cdp/debugger/events.go @@ -24,6 +24,7 @@ type EventScriptParsed struct { SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with script (if any). HasSourceURL bool `json:"hasSourceURL,omitempty"` // True, if this script has sourceURL. IsModule bool `json:"isModule,omitempty"` // True, if this script is ES6 module. + Length int64 `json:"length,omitempty"` // This script length. } // EventScriptFailedToParse fired when virtual machine fails to parse the @@ -41,6 +42,7 @@ type EventScriptFailedToParse struct { SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with script (if any). HasSourceURL bool `json:"hasSourceURL,omitempty"` // True, if this script has sourceURL. IsModule bool `json:"isModule,omitempty"` // True, if this script is ES6 module. + Length int64 `json:"length,omitempty"` // This script length. } // EventBreakpointResolved fired when breakpoint is resolved to an actual diff --git a/cdp/debugger/types.go b/cdp/debugger/types.go index a03d4c3..4720fbf 100644 --- a/cdp/debugger/types.go +++ b/cdp/debugger/types.go @@ -66,6 +66,14 @@ type SearchMatch struct { LineContent string `json:"lineContent,omitempty"` // Line with match content. } +// BreakLocation [no description]. +type BreakLocation struct { + ScriptID runtime.ScriptID `json:"scriptId,omitempty"` // Script identifier as reported in the Debugger.scriptParsed. + LineNumber int64 `json:"lineNumber,omitempty"` // Line number in the script (0-based). + ColumnNumber int64 `json:"columnNumber,omitempty"` // Column number in the script (0-based). + Type BreakLocationType `json:"type,omitempty"` +} + // ScopeType scope type. type ScopeType string @@ -129,6 +137,51 @@ func (t *ScopeType) UnmarshalJSON(buf []byte) error { return easyjson.Unmarshal(buf, t) } +// BreakLocationType [no description]. +type BreakLocationType string + +// String returns the BreakLocationType as string value. +func (t BreakLocationType) String() string { + return string(t) +} + +// BreakLocationType values. +const ( + BreakLocationTypeDebuggerStatement BreakLocationType = "debuggerStatement" + BreakLocationTypeCall BreakLocationType = "call" + BreakLocationTypeReturn BreakLocationType = "return" +) + +// MarshalEasyJSON satisfies easyjson.Marshaler. +func (t BreakLocationType) MarshalEasyJSON(out *jwriter.Writer) { + out.String(string(t)) +} + +// MarshalJSON satisfies json.Marshaler. +func (t BreakLocationType) MarshalJSON() ([]byte, error) { + return easyjson.Marshal(t) +} + +// UnmarshalEasyJSON satisfies easyjson.Unmarshaler. +func (t *BreakLocationType) UnmarshalEasyJSON(in *jlexer.Lexer) { + switch BreakLocationType(in.String()) { + case BreakLocationTypeDebuggerStatement: + *t = BreakLocationTypeDebuggerStatement + case BreakLocationTypeCall: + *t = BreakLocationTypeCall + case BreakLocationTypeReturn: + *t = BreakLocationTypeReturn + + default: + in.AddError(errors.New("unknown BreakLocationType value")) + } +} + +// UnmarshalJSON satisfies json.Unmarshaler. +func (t *BreakLocationType) UnmarshalJSON(buf []byte) error { + return easyjson.Unmarshal(buf, t) +} + // PausedReason pause reason. type PausedReason string diff --git a/cdp/network/easyjson.go b/cdp/network/easyjson.go index ee92881..515642c 100644 --- a/cdp/network/easyjson.go +++ b/cdp/network/easyjson.go @@ -1106,7 +1106,106 @@ func (v *SetBypassServiceWorkerParams) UnmarshalJSON(data []byte) error { func (v *SetBypassServiceWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork11(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork12(in *jlexer.Lexer, out *SecurityDetails) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork12(in *jlexer.Lexer, out *SetBlockedURLSParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "urls": + if in.IsNull() { + in.Skip() + out.Urls = nil + } else { + in.Delim('[') + if out.Urls == nil { + if !in.IsDelim(']') { + out.Urls = make([]string, 0, 4) + } else { + out.Urls = []string{} + } + } else { + out.Urls = (out.Urls)[:0] + } + for !in.IsDelim(']') { + var v1 string + v1 = string(in.String()) + out.Urls = append(out.Urls, v1) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork12(out *jwriter.Writer, in SetBlockedURLSParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"urls\":") + if in.Urls == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + out.RawString("null") + } else { + out.RawByte('[') + for v2, v3 := range in.Urls { + if v2 > 0 { + out.RawByte(',') + } + out.String(string(v3)) + } + out.RawByte(']') + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v SetBlockedURLSParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork12(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v SetBlockedURLSParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork12(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *SetBlockedURLSParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork12(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *SetBlockedURLSParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork12(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork13(in *jlexer.Lexer, out *SecurityDetails) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1155,9 +1254,9 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork12(in *jlexer.Lexer, ou out.SanList = (out.SanList)[:0] } for !in.IsDelim(']') { - var v1 string - v1 = string(in.String()) - out.SanList = append(out.SanList, v1) + var v4 string + v4 = string(in.String()) + out.SanList = append(out.SanList, v4) in.WantComma() } in.Delim(']') @@ -1184,17 +1283,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork12(in *jlexer.Lexer, ou out.SignedCertificateTimestampList = (out.SignedCertificateTimestampList)[:0] } for !in.IsDelim(']') { - var v2 *SignedCertificateTimestamp + var v5 *SignedCertificateTimestamp if in.IsNull() { in.Skip() - v2 = nil + v5 = nil } else { - if v2 == nil { - v2 = new(SignedCertificateTimestamp) + if v5 == nil { + v5 = new(SignedCertificateTimestamp) } - (*v2).UnmarshalEasyJSON(in) + (*v5).UnmarshalEasyJSON(in) } - out.SignedCertificateTimestampList = append(out.SignedCertificateTimestampList, v2) + out.SignedCertificateTimestampList = append(out.SignedCertificateTimestampList, v5) in.WantComma() } in.Delim(']') @@ -1209,7 +1308,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork12(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork12(out *jwriter.Writer, in SecurityDetails) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork13(out *jwriter.Writer, in SecurityDetails) { out.RawByte('{') first := true _ = first @@ -1279,11 +1378,11 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork12(out *jwriter.Writer, out.RawString("null") } else { out.RawByte('[') - for v3, v4 := range in.SanList { - if v3 > 0 { + for v6, v7 := range in.SanList { + if v6 > 0 { out.RawByte(',') } - out.String(string(v4)) + out.String(string(v7)) } out.RawByte(']') } @@ -1322,14 +1421,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork12(out *jwriter.Writer, out.RawString("null") } else { out.RawByte('[') - for v5, v6 := range in.SignedCertificateTimestampList { - if v5 > 0 { + for v8, v9 := range in.SignedCertificateTimestampList { + if v8 > 0 { out.RawByte(',') } - if v6 == nil { + if v9 == nil { out.RawString("null") } else { - (*v6).MarshalEasyJSON(out) + (*v9).MarshalEasyJSON(out) } } out.RawByte(']') @@ -1341,27 +1440,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork12(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v SecurityDetails) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork12(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork13(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v SecurityDetails) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork12(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork13(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *SecurityDetails) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork12(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork13(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SecurityDetails) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork12(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork13(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork13(in *jlexer.Lexer, out *Response) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork14(in *jlexer.Lexer, out *Response) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1460,7 +1559,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork13(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork13(out *jwriter.Writer, in Response) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork14(out *jwriter.Writer, in Response) { out.RawByte('{') first := true _ = first @@ -1638,27 +1737,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork13(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v Response) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork13(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork14(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Response) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork13(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork14(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Response) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork13(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork14(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Response) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork13(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork14(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork14(in *jlexer.Lexer, out *ResourceTiming) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork15(in *jlexer.Lexer, out *ResourceTiming) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1719,7 +1818,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork14(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork14(out *jwriter.Writer, in ResourceTiming) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork15(out *jwriter.Writer, in ResourceTiming) { out.RawByte('{') first := true _ = first @@ -1857,27 +1956,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork14(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v ResourceTiming) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork14(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork15(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ResourceTiming) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork14(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork15(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ResourceTiming) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork14(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork15(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ResourceTiming) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork14(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork15(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork15(in *jlexer.Lexer, out *Request) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork16(in *jlexer.Lexer, out *Request) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1928,7 +2027,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork15(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork15(out *jwriter.Writer, in Request) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork16(out *jwriter.Writer, in Request) { out.RawByte('{') first := true _ = first @@ -1998,27 +2097,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork15(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v Request) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork15(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork16(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Request) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork15(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork16(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Request) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork15(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork16(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Request) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork15(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork16(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork16(in *jlexer.Lexer, out *ReplayXHRParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork17(in *jlexer.Lexer, out *ReplayXHRParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2049,7 +2148,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork16(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork16(out *jwriter.Writer, in ReplayXHRParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork17(out *jwriter.Writer, in ReplayXHRParams) { out.RawByte('{') first := true _ = first @@ -2064,92 +2163,25 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork16(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v ReplayXHRParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork16(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ReplayXHRParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork16(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ReplayXHRParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork16(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ReplayXHRParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork16(l, v) -} -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork17(in *jlexer.Lexer, out *RemoveBlockedURLParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "url": - out.URL = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork17(out *jwriter.Writer, in RemoveBlockedURLParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RemoveBlockedURLParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork17(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface -func (v RemoveBlockedURLParams) MarshalEasyJSON(w *jwriter.Writer) { +func (v ReplayXHRParams) MarshalEasyJSON(w *jwriter.Writer) { easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork17(w, v) } // UnmarshalJSON supports json.Unmarshaler interface -func (v *RemoveBlockedURLParams) UnmarshalJSON(data []byte) error { +func (v *ReplayXHRParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork17(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RemoveBlockedURLParams) UnmarshalEasyJSON(l *jlexer.Lexer) { +func (v *ReplayXHRParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork17(l, v) } func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork18(in *jlexer.Lexer, out *Initiator) { @@ -2503,17 +2535,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork22(in *jlexer.Lexer, ou out.Cookies = (out.Cookies)[:0] } for !in.IsDelim(']') { - var v7 *Cookie + var v10 *Cookie if in.IsNull() { in.Skip() - v7 = nil + v10 = nil } else { - if v7 == nil { - v7 = new(Cookie) + if v10 == nil { + v10 = new(Cookie) } - (*v7).UnmarshalEasyJSON(in) + (*v10).UnmarshalEasyJSON(in) } - out.Cookies = append(out.Cookies, v7) + out.Cookies = append(out.Cookies, v10) in.WantComma() } in.Delim(']') @@ -2542,14 +2574,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork22(out *jwriter.Writer, out.RawString("null") } else { out.RawByte('[') - for v8, v9 := range in.Cookies { - if v8 > 0 { + for v11, v12 := range in.Cookies { + if v11 > 0 { out.RawByte(',') } - if v9 == nil { + if v12 == nil { out.RawString("null") } else { - (*v9).MarshalEasyJSON(out) + (*v12).MarshalEasyJSON(out) } } out.RawByte(']') @@ -2616,9 +2648,9 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork23(in *jlexer.Lexer, ou out.Urls = (out.Urls)[:0] } for !in.IsDelim(']') { - var v10 string - v10 = string(in.String()) - out.Urls = append(out.Urls, v10) + var v13 string + v13 = string(in.String()) + out.Urls = append(out.Urls, v13) in.WantComma() } in.Delim(']') @@ -2647,11 +2679,11 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork23(out *jwriter.Writer, out.RawString("null") } else { out.RawByte('[') - for v11, v12 := range in.Urls { - if v11 > 0 { + for v14, v15 := range in.Urls { + if v14 > 0 { out.RawByte(',') } - out.String(string(v12)) + out.String(string(v15)) } out.RawByte(']') } @@ -2717,9 +2749,9 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork24(in *jlexer.Lexer, ou out.TableNames = (out.TableNames)[:0] } for !in.IsDelim(']') { - var v13 string - v13 = string(in.String()) - out.TableNames = append(out.TableNames, v13) + var v16 string + v16 = string(in.String()) + out.TableNames = append(out.TableNames, v16) in.WantComma() } in.Delim(']') @@ -2748,11 +2780,11 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork24(out *jwriter.Writer, out.RawString("null") } else { out.RawByte('[') - for v14, v15 := range in.TableNames { - if v14 > 0 { + for v17, v18 := range in.TableNames { + if v17 > 0 { out.RawByte(',') } - out.String(string(v15)) + out.String(string(v18)) } out.RawByte(']') } @@ -2885,17 +2917,17 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork26(in *jlexer.Lexer, ou out.Cookies = (out.Cookies)[:0] } for !in.IsDelim(']') { - var v16 *Cookie + var v19 *Cookie if in.IsNull() { in.Skip() - v16 = nil + v19 = nil } else { - if v16 == nil { - v16 = new(Cookie) + if v19 == nil { + v19 = new(Cookie) } - (*v16).UnmarshalEasyJSON(in) + (*v19).UnmarshalEasyJSON(in) } - out.Cookies = append(out.Cookies, v16) + out.Cookies = append(out.Cookies, v19) in.WantComma() } in.Delim(']') @@ -2924,14 +2956,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork26(out *jwriter.Writer, out.RawString("null") } else { out.RawByte('[') - for v17, v18 := range in.Cookies { - if v17 > 0 { + for v20, v21 := range in.Cookies { + if v20 > 0 { out.RawByte(',') } - if v18 == nil { + if v21 == nil { out.RawString("null") } else { - (*v18).MarshalEasyJSON(out) + (*v21).MarshalEasyJSON(out) } } out.RawByte(']') @@ -5691,70 +5723,3 @@ func (v *CachedResource) UnmarshalJSON(data []byte) error { func (v *CachedResource) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork56(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork57(in *jlexer.Lexer, out *AddBlockedURLParams) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "url": - out.URL = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork57(out *jwriter.Writer, in AddBlockedURLParams) { - out.RawByte('{') - first := true - _ = first - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"url\":") - out.String(string(in.URL)) - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v AddBlockedURLParams) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork57(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v AddBlockedURLParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork57(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *AddBlockedURLParams) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork57(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AddBlockedURLParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork57(l, v) -} diff --git a/cdp/network/network.go b/cdp/network/network.go index abe0783..a6a5ad3 100644 --- a/cdp/network/network.go +++ b/cdp/network/network.go @@ -160,46 +160,25 @@ func (p *GetResponseBodyParams) Do(ctxt context.Context, h cdp.Handler) (body [] return dec, nil } -// AddBlockedURLParams blocks specific URL from loading. -type AddBlockedURLParams struct { - URL string `json:"url"` // URL to block. +// SetBlockedURLSParams blocks specific URL from loading. +type SetBlockedURLSParams struct { + Urls []string `json:"urls"` // URLs to block. } -// AddBlockedURL blocks specific URL from loading. +// SetBlockedURLS blocks specific URL from loading. // // parameters: -// url - URL to block. -func AddBlockedURL(url string) *AddBlockedURLParams { - return &AddBlockedURLParams{ - URL: url, +// urls - URLs to block. +func SetBlockedURLS(urls []string) *SetBlockedURLSParams { + return &SetBlockedURLSParams{ + Urls: urls, } } -// Do executes Network.addBlockedURL against the provided context and +// Do executes Network.setBlockedURLs against the provided context and // target handler. -func (p *AddBlockedURLParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - return h.Execute(ctxt, cdp.CommandNetworkAddBlockedURL, p, nil) -} - -// RemoveBlockedURLParams cancels blocking of a specific URL from loading. -type RemoveBlockedURLParams struct { - URL string `json:"url"` // URL to stop blocking. -} - -// RemoveBlockedURL cancels blocking of a specific URL from loading. -// -// parameters: -// url - URL to stop blocking. -func RemoveBlockedURL(url string) *RemoveBlockedURLParams { - return &RemoveBlockedURLParams{ - URL: url, - } -} - -// Do executes Network.removeBlockedURL against the provided context and -// target handler. -func (p *RemoveBlockedURLParams) Do(ctxt context.Context, h cdp.Handler) (err error) { - return h.Execute(ctxt, cdp.CommandNetworkRemoveBlockedURL, p, nil) +func (p *SetBlockedURLSParams) Do(ctxt context.Context, h cdp.Handler) (err error) { + return h.Execute(ctxt, cdp.CommandNetworkSetBlockedURLS, p, nil) } // ReplayXHRParams this method sends a new XMLHttpRequest which is identical diff --git a/cdp/page/easyjson.go b/cdp/page/easyjson.go index 6a3171e..69a8646 100644 --- a/cdp/page/easyjson.go +++ b/cdp/page/easyjson.go @@ -4737,6 +4737,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpPage58(in *jlexer.Lexer, out * (out.Format).UnmarshalEasyJSON(in) case "quality": out.Quality = int64(in.Int64()) + case "fromSurface": + out.FromSurface = bool(in.Bool()) default: in.SkipRecursive() } @@ -4767,6 +4769,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage58(out *jwriter.Writer, in out.RawString("\"quality\":") out.Int64(int64(in.Quality)) } + if in.FromSurface { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"fromSurface\":") + out.Bool(bool(in.FromSurface)) + } out.RawByte('}') } diff --git a/cdp/page/page.go b/cdp/page/page.go index d63c142..6f519cc 100644 --- a/cdp/page/page.go +++ b/cdp/page/page.go @@ -433,8 +433,9 @@ func (p *SetDocumentContentParams) Do(ctxt context.Context, h cdp.Handler) (err // CaptureScreenshotParams capture page screenshot. type CaptureScreenshotParams struct { - Format CaptureScreenshotFormat `json:"format,omitempty"` // Image compression format (defaults to png). - Quality int64 `json:"quality,omitempty"` // Compression quality from range [0..100] (jpeg only). + Format CaptureScreenshotFormat `json:"format,omitempty"` // Image compression format (defaults to png). + Quality int64 `json:"quality,omitempty"` // Compression quality from range [0..100] (jpeg only). + FromSurface bool `json:"fromSurface,omitempty"` // Capture the screenshot from the surface, rather than the view. Defaults to false. } // CaptureScreenshot capture page screenshot. @@ -456,6 +457,13 @@ func (p CaptureScreenshotParams) WithQuality(quality int64) *CaptureScreenshotPa return &p } +// WithFromSurface capture the screenshot from the surface, rather than the +// view. Defaults to false. +func (p CaptureScreenshotParams) WithFromSurface(fromSurface bool) *CaptureScreenshotParams { + p.FromSurface = fromSurface + return &p +} + // CaptureScreenshotReturns return values. type CaptureScreenshotReturns struct { Data string `json:"data,omitempty"` // Base64-encoded image data. diff --git a/cdp/profiler/easyjson.go b/cdp/profiler/easyjson.go index 818a566..d376273 100644 --- a/cdp/profiler/easyjson.go +++ b/cdp/profiler/easyjson.go @@ -1867,14 +1867,10 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpProfiler19(in *jlexer.Lexer, o continue } switch key { - case "startLineNumber": - out.StartLineNumber = int64(in.Int64()) - case "startColumnNumber": - out.StartColumnNumber = int64(in.Int64()) - case "endLineNumber": - out.EndLineNumber = int64(in.Int64()) - case "endColumnNumber": - out.EndColumnNumber = int64(in.Int64()) + case "startOffset": + out.StartOffset = int64(in.Int64()) + case "endOffset": + out.EndOffset = int64(in.Int64()) case "count": out.Count = int64(in.Int64()) default: @@ -1891,37 +1887,21 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler19(out *jwriter.Writer out.RawByte('{') first := true _ = first - if in.StartLineNumber != 0 { + if in.StartOffset != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"startLineNumber\":") - out.Int64(int64(in.StartLineNumber)) + out.RawString("\"startOffset\":") + out.Int64(int64(in.StartOffset)) } - if in.StartColumnNumber != 0 { + if in.EndOffset != 0 { if !first { out.RawByte(',') } first = false - out.RawString("\"startColumnNumber\":") - out.Int64(int64(in.StartColumnNumber)) - } - if in.EndLineNumber != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"endLineNumber\":") - out.Int64(int64(in.EndLineNumber)) - } - if in.EndColumnNumber != 0 { - if !first { - out.RawByte(',') - } - first = false - out.RawString("\"endColumnNumber\":") - out.Int64(int64(in.EndColumnNumber)) + out.RawString("\"endOffset\":") + out.Int64(int64(in.EndOffset)) } if in.Count != 0 { if !first { diff --git a/cdp/profiler/types.go b/cdp/profiler/types.go index 9a9de51..65a0dff 100644 --- a/cdp/profiler/types.go +++ b/cdp/profiler/types.go @@ -33,11 +33,9 @@ type PositionTickInfo struct { // CoverageRange coverage data for a source range. type CoverageRange struct { - StartLineNumber int64 `json:"startLineNumber,omitempty"` // JavaScript script line number (0-based) for the range start. - StartColumnNumber int64 `json:"startColumnNumber,omitempty"` // JavaScript script column number (0-based) for the range start. - EndLineNumber int64 `json:"endLineNumber,omitempty"` // JavaScript script line number (0-based) for the range end. - EndColumnNumber int64 `json:"endColumnNumber,omitempty"` // JavaScript script column number (0-based) for the range end. - Count int64 `json:"count,omitempty"` // Collected execution count of the source range. + StartOffset int64 `json:"startOffset,omitempty"` // JavaScript script source offset for the range start. + EndOffset int64 `json:"endOffset,omitempty"` // JavaScript script source offset for the range end. + Count int64 `json:"count,omitempty"` // Collected execution count of the source range. } // FunctionCoverage coverage data for a JavaScript function. diff --git a/cmd/chromedp-gen/protocol.json b/cmd/chromedp-gen/protocol.json index 5cd61da..b79479e 100644 --- a/cmd/chromedp-gen/protocol.json +++ b/cmd/chromedp-gen/protocol.json @@ -902,6 +902,13 @@ "type": "integer", "optional": true, "description": "Compression quality from range [0..100] (jpeg only)." + }, + { + "name": "fromSurface", + "type": "boolean", + "optional": true, + "description": "Capture the screenshot from the surface, rather than the view. Defaults to false.", + "experimental": true } ], "returns": [ @@ -2601,25 +2608,16 @@ ] }, { - "name": "addBlockedURL", + "name": "setBlockedURLs", "description": "Blocks specific URL from loading.", "parameters": [ { - "name": "url", - "type": "string", - "description": "URL to block." - } - ], - "experimental": true - }, - { - "name": "removeBlockedURL", - "description": "Cancels blocking of a specific URL from loading.", - "parameters": [ - { - "name": "url", - "type": "string", - "description": "URL to stop blocking." + "name": "urls", + "type": "array", + "items": { + "type": "string" + }, + "description": "URLs to block." } ], "experimental": true @@ -6055,6 +6053,12 @@ "name": "startColumn", "type": "number", "description": "Column offset of the stylesheet within the resource (zero based)." + }, + { + "name": "length", + "type": "number", + "description": "Size of the content (in characters).", + "experimental": true } ], "description": "CSS stylesheet metainformation." @@ -6106,9 +6110,14 @@ "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from." }, { - "name": "range", - "$ref": "SourceRange", - "description": "Style declaration range in the enclosing stylesheet (if available)." + "name": "startOffset", + "type": "number", + "description": "Offset of the start of the rule (including selector) from the beginning of the stylesheet." + }, + { + "name": "endOffset", + "type": "number", + "description": "Offset of the end of the rule body from the beginning of the stylesheet." }, { "name": "used", @@ -11407,6 +11416,39 @@ } ], "experimental": true + }, + { + "id": "BreakLocation", + "type": "object", + "properties": [ + { + "name": "scriptId", + "$ref": "Runtime.ScriptId", + "description": "Script identifier as reported in the Debugger.scriptParsed." + }, + { + "name": "lineNumber", + "type": "integer", + "description": "Line number in the script (0-based)." + }, + { + "name": "columnNumber", + "type": "integer", + "optional": true, + "description": "Column number in the script (0-based)." + }, + { + "name": "type", + "type": "string", + "enum": [ + "debuggerStatement", + "call", + "return" + ], + "optional": true + } + ], + "experimental": true } ], "commands": [ @@ -11555,7 +11597,7 @@ "name": "locations", "type": "array", "items": { - "$ref": "Location" + "$ref": "BreakLocation" }, "description": "List of the possible breakpoint locations." } @@ -11590,6 +11632,11 @@ "name": "pause", "description": "Stops on the next JavaScript statement." }, + { + "name": "scheduleStepIntoAsync", + "description": "Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.", + "experimental": true + }, { "name": "resume", "description": "Resumes JavaScript execution." @@ -11960,6 +12007,13 @@ "optional": true, "description": "True, if this script is ES6 module.", "experimental": true + }, + { + "name": "length", + "type": "integer", + "optional": true, + "description": "This script length.", + "experimental": true } ], "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger." @@ -12032,6 +12086,13 @@ "optional": true, "description": "True, if this script is ES6 module.", "experimental": true + }, + { + "name": "length", + "type": "integer", + "optional": true, + "description": "This script length.", + "experimental": true } ], "description": "Fired when virtual machine fails to parse the script." @@ -12330,24 +12391,14 @@ "description": "Coverage data for a source range.", "properties": [ { - "name": "startLineNumber", + "name": "startOffset", "type": "integer", - "description": "JavaScript script line number (0-based) for the range start." + "description": "JavaScript script source offset for the range start." }, { - "name": "startColumnNumber", + "name": "endOffset", "type": "integer", - "description": "JavaScript script column number (0-based) for the range start." - }, - { - "name": "endLineNumber", - "type": "integer", - "description": "JavaScript script line number (0-based) for the range end." - }, - { - "name": "endColumnNumber", - "type": "integer", - "description": "JavaScript script column number (0-based) for the range end." + "description": "JavaScript script source offset for the range end." }, { "name": "count",