Updating to latest protocol.json

This commit is contained in:
Kenneth Shaw 2017-04-04 15:44:57 +07:00
parent eb9de08765
commit 2c07a7f49c
6 changed files with 39 additions and 6 deletions

View File

@ -2017,6 +2017,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork16(in *jlexer.Lexer, ou
(out.InitialPriority).UnmarshalEasyJSON(in) (out.InitialPriority).UnmarshalEasyJSON(in)
case "referrerPolicy": case "referrerPolicy":
(out.ReferrerPolicy).UnmarshalEasyJSON(in) (out.ReferrerPolicy).UnmarshalEasyJSON(in)
case "isLinkPreload":
out.IsLinkPreload = bool(in.Bool())
default: default:
in.SkipRecursive() in.SkipRecursive()
} }
@ -2091,6 +2093,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork16(out *jwriter.Writer,
out.RawString("\"referrerPolicy\":") out.RawString("\"referrerPolicy\":")
(in.ReferrerPolicy).MarshalEasyJSON(out) (in.ReferrerPolicy).MarshalEasyJSON(out)
} }
if in.IsLinkPreload {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"isLinkPreload\":")
out.Bool(bool(in.IsLinkPreload))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -160,15 +160,15 @@ func (p *GetResponseBodyParams) Do(ctxt context.Context, h cdp.Handler) (body []
return dec, nil return dec, nil
} }
// SetBlockedURLSParams blocks specific URL from loading. // SetBlockedURLSParams blocks URLs from loading.
type SetBlockedURLSParams struct { type SetBlockedURLSParams struct {
Urls []string `json:"urls"` // URLs to block. Urls []string `json:"urls"` // URL patterns to block. Wildcards ('*') are allowed.
} }
// SetBlockedURLS blocks specific URL from loading. // SetBlockedURLS blocks URLs from loading.
// //
// parameters: // parameters:
// urls - URLs to block. // urls - URL patterns to block. Wildcards ('*') are allowed.
func SetBlockedURLS(urls []string) *SetBlockedURLSParams { func SetBlockedURLS(urls []string) *SetBlockedURLSParams {
return &SetBlockedURLSParams{ return &SetBlockedURLSParams{
Urls: urls, Urls: urls,

View File

@ -211,6 +211,7 @@ type Request struct {
MixedContentType MixedContentType `json:"mixedContentType,omitempty"` // The mixed content status of the request, as defined in http://www.w3.org/TR/mixed-content/ MixedContentType MixedContentType `json:"mixedContentType,omitempty"` // The mixed content status of the request, as defined in http://www.w3.org/TR/mixed-content/
InitialPriority ResourcePriority `json:"initialPriority,omitempty"` // Priority of the resource request at the time request is sent. InitialPriority ResourcePriority `json:"initialPriority,omitempty"` // Priority of the resource request at the time request is sent.
ReferrerPolicy ReferrerPolicy `json:"referrerPolicy,omitempty"` // The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/ ReferrerPolicy ReferrerPolicy `json:"referrerPolicy,omitempty"` // The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/
IsLinkPreload bool `json:"isLinkPreload,omitempty"` // Whether is loaded via link preload.
} }
// SignedCertificateTimestamp details of a signed certificate timestamp // SignedCertificateTimestamp details of a signed certificate timestamp

View File

@ -265,6 +265,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity3(in *jlexer.Lexer, ou
out.RanMixedContent = bool(in.Bool()) out.RanMixedContent = bool(in.Bool())
case "displayedMixedContent": case "displayedMixedContent":
out.DisplayedMixedContent = bool(in.Bool()) out.DisplayedMixedContent = bool(in.Bool())
case "containedMixedForm":
out.ContainedMixedForm = bool(in.Bool())
case "ranContentWithCertErrors": case "ranContentWithCertErrors":
out.RanContentWithCertErrors = bool(in.Bool()) out.RanContentWithCertErrors = bool(in.Bool())
case "displayedContentWithCertErrors": case "displayedContentWithCertErrors":
@ -303,6 +305,14 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(out *jwriter.Writer,
out.RawString("\"displayedMixedContent\":") out.RawString("\"displayedMixedContent\":")
out.Bool(bool(in.DisplayedMixedContent)) out.Bool(bool(in.DisplayedMixedContent))
} }
if in.ContainedMixedForm {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"containedMixedForm\":")
out.Bool(bool(in.ContainedMixedForm))
}
if in.RanContentWithCertErrors { if in.RanContentWithCertErrors {
if !first { if !first {
out.RawByte(',') out.RawByte(',')

View File

@ -85,6 +85,7 @@ type StateExplanation struct {
type InsecureContentStatus struct { type InsecureContentStatus struct {
RanMixedContent bool `json:"ranMixedContent,omitempty"` // True if the page was loaded over HTTPS and ran mixed (HTTP) content such as scripts. RanMixedContent bool `json:"ranMixedContent,omitempty"` // True if the page was loaded over HTTPS and ran mixed (HTTP) content such as scripts.
DisplayedMixedContent bool `json:"displayedMixedContent,omitempty"` // True if the page was loaded over HTTPS and displayed mixed (HTTP) content such as images. DisplayedMixedContent bool `json:"displayedMixedContent,omitempty"` // True if the page was loaded over HTTPS and displayed mixed (HTTP) content such as images.
ContainedMixedForm bool `json:"containedMixedForm,omitempty"` // True if the page was loaded over HTTPS and contained a form targeting an insecure url.
RanContentWithCertErrors bool `json:"ranContentWithCertErrors,omitempty"` // True if the page was loaded over HTTPS without certificate errors, and ran content such as scripts that were loaded with certificate errors. RanContentWithCertErrors bool `json:"ranContentWithCertErrors,omitempty"` // True if the page was loaded over HTTPS without certificate errors, and ran content such as scripts that were loaded with certificate errors.
DisplayedContentWithCertErrors bool `json:"displayedContentWithCertErrors,omitempty"` // True if the page was loaded over HTTPS without certificate errors, and displayed content such as images that were loaded with certificate errors. DisplayedContentWithCertErrors bool `json:"displayedContentWithCertErrors,omitempty"` // True if the page was loaded over HTTPS without certificate errors, and displayed content such as images that were loaded with certificate errors.
RanInsecureContentStyle State `json:"ranInsecureContentStyle,omitempty"` // Security state representing a page that ran insecure content. RanInsecureContentStyle State `json:"ranInsecureContentStyle,omitempty"` // Security state representing a page that ran insecure content.

View File

@ -1803,6 +1803,11 @@
"type": "boolean", "type": "boolean",
"description": "True if the page was loaded over HTTPS and displayed mixed (HTTP) content such as images." "description": "True if the page was loaded over HTTPS and displayed mixed (HTTP) content such as images."
}, },
{
"name": "containedMixedForm",
"type": "boolean",
"description": "True if the page was loaded over HTTPS and contained a form targeting an insecure url."
},
{ {
"name": "ranContentWithCertErrors", "name": "ranContentWithCertErrors",
"type": "boolean", "type": "boolean",
@ -2146,6 +2151,12 @@
"no-referrer-when-downgrade-origin-when-cross-origin" "no-referrer-when-downgrade-origin-when-cross-origin"
], ],
"description": "The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/" "description": "The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/"
},
{
"name": "isLinkPreload",
"type": "boolean",
"optional": true,
"description": "Whether is loaded via link preload."
} }
] ]
}, },
@ -2673,7 +2684,7 @@
}, },
{ {
"name": "setBlockedURLs", "name": "setBlockedURLs",
"description": "Blocks specific URL from loading.", "description": "Blocks URLs from loading.",
"parameters": [ "parameters": [
{ {
"name": "urls", "name": "urls",
@ -2681,7 +2692,7 @@
"items": { "items": {
"type": "string" "type": "string"
}, },
"description": "URLs to block." "description": "URL patterns to block. Wildcards ('*') are allowed."
} }
], ],
"experimental": true "experimental": true