Skip to content

Commit

Permalink
🔧 Update protocols as of 2019-08-03
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewvy committed Aug 4, 2019
1 parent b16613c commit 0fd00aa
Show file tree
Hide file tree
Showing 4 changed files with 860 additions and 35 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* [Dependencies] Switch from `Poison` -> `Jason`.
* [Internal] Adds a `mix fetch_cdp_protocol` which updates all protocol files.
* [Protocol] Update `1-3` and `tot` protocols as of `2019-08-03`

### Bug Fixes

Expand Down
2 changes: 1 addition & 1 deletion lib/mix/tasks/fetch_cdp_protocol.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defmodule Mix.Tasks.FetchCdpProtocol do
},
"1-3" => %{
url:
"https://github.com/ChromeDevTools/debugger-protocol-viewer/blob/master/_data/1-3/protocol.json",
"https://raw.githubusercontent.com/ChromeDevTools/debugger-protocol-viewer/master/_data/1-3/protocol.json",
output: "priv/1-3/protocol.json"
},
"tot" => %{
Expand Down
98 changes: 90 additions & 8 deletions priv/1-3/protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -2603,6 +2603,12 @@
"optional": true,
"type": "boolean"
},
{
"name": "fromPrefetchCache",
"description": "Specifies that the request was served from the prefetch cache.",
"optional": true,
"type": "boolean"
},
{
"name": "encodedDataLength",
"description": "Total number of bytes received for this request so far.",
Expand Down Expand Up @@ -3588,6 +3594,7 @@
"dependencies": [
"Debugger",
"DOM",
"IO",
"Network",
"Runtime"
],
Expand Down Expand Up @@ -3626,7 +3633,14 @@
},
{
"name": "url",
"description": "Frame document's URL.",
"description": "Frame document's URL without fragment.",
"type": "string"
},
{
"name": "urlFragment",
"description": "Frame document's URL fragment including the '#'.",
"experimental": true,
"optional": true,
"type": "string"
},
{
Expand All @@ -3641,7 +3655,7 @@
},
{
"name": "unreachableUrl",
"description": "If the frame failed to load, this contains the URL that could not be loaded.",
"description": "If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment.",
"experimental": true,
"optional": true,
"type": "string"
Expand Down Expand Up @@ -4228,13 +4242,31 @@
"description": "Whether or not to prefer page size as defined by css. Defaults to false,\nin which case the content will be scaled to fit the paper size.",
"optional": true,
"type": "boolean"
},
{
"name": "transferMode",
"description": "return as stream",
"experimental": true,
"optional": true,
"type": "string",
"enum": [
"ReturnAsBase64",
"ReturnAsStream"
]
}
],
"returns": [
{
"name": "data",
"description": "Base64-encoded pdf data.",
"description": "Base64-encoded pdf data. Empty if |returnAsStream| is specified.",
"type": "string"
},
{
"name": "stream",
"description": "A handle of the stream that holds resulting PDF data.",
"experimental": true,
"optional": true,
"$ref": "IO.StreamHandle"
}
]
},
Expand Down Expand Up @@ -4297,6 +4329,20 @@
}
]
},
{
"name": "fileChooserOpened",
"description": "Emitted only when `page.interceptFileChooser` is enabled.",
"parameters": [
{
"name": "mode",
"type": "string",
"enum": [
"selectSingle",
"selectMultiple"
]
}
]
},
{
"name": "frameAttached",
"description": "Fired when frame has been attached to its parent.",
Expand Down Expand Up @@ -4641,6 +4687,7 @@
{
"name": "schemeIsCryptographic",
"description": "True if the page was loaded over cryptographic transport such as HTTPS.",
"deprecated": true,
"type": "boolean"
},
{
Expand Down Expand Up @@ -4804,6 +4851,18 @@
"experimental": true,
"optional": true,
"type": "boolean"
},
{
"name": "newWindow",
"description": "Whether to create a new Window or Tab (chrome-only, false by default).",
"optional": true,
"type": "boolean"
},
{
"name": "background",
"description": "Whether to create the target in background or foreground (chrome-only,\nfalse by default).",
"optional": true,
"type": "boolean"
}
],
"returns": [
Expand Down Expand Up @@ -5444,6 +5503,28 @@
}
]
},
{
"name": "setInstrumentationBreakpoint",
"description": "Sets instrumentation breakpoint.",
"parameters": [
{
"name": "instrumentation",
"description": "Instrumentation name.",
"type": "string",
"enum": [
"beforeScriptExecution",
"beforeScriptWithSourceMapExecution"
]
}
],
"returns": [
{
"name": "breakpointId",
"description": "Id of the created breakpoint for further reference.",
"$ref": "BreakpointId"
}
]
},
{
"name": "setBreakpointByUrl",
"description": "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this\ncommand is issued, all existing parsed scripts will have breakpoints resolved and returned in\n`locations` property. Further matching script parsing will result in subsequent\n`breakpointResolved` events issued. This logical breakpoint will survive page reloads.",
Expand Down Expand Up @@ -5678,16 +5759,17 @@
"description": "Pause reason.",
"type": "string",
"enum": [
"XHR",
"ambiguous",
"assert",
"debugCommand",
"DOM",
"EventListener",
"exception",
"assert",
"debugCommand",
"promiseRejection",
"instrumentation",
"OOM",
"other",
"ambiguous"
"promiseRejection",
"XHR"
]
},
{
Expand Down
Loading

0 comments on commit 0fd00aa

Please sign in to comment.