Commit 420512c4 authored by dgozman's avatar dgozman Committed by Commit bot

[DevTools] Protocol version 1.2.

Moving most of Schema, Runtime, Debugger, Profiler and Emulation out of experimental.

BUG=635947

Review-Url: https://codereview.chromium.org/2272503002
Cr-Commit-Position: refs/heads/master@{#414241}
parent bb26b236
...@@ -7,8 +7,10 @@ var fail = chrome.test.callbackFail; ...@@ -7,8 +7,10 @@ var fail = chrome.test.callbackFail;
var tabId; var tabId;
var debuggee; var debuggee;
var protocolVersion = "1.1"; var protocolVersion = "1.2";
var protocolPreviousVersion = "1.0"; var protocolPreviousVersion = "1.1";
var unsupportedMinorProtocolVersion = "1.5";
var unsupportedMajorProtocolVersion = "100.0";
var SILENT_FLAG_REQUIRED = "Cannot attach to this target unless " + var SILENT_FLAG_REQUIRED = "Cannot attach to this target unless " +
"'silent-debugger-extension-api' flag is enabled."; "'silent-debugger-extension-api' flag is enabled.";
...@@ -24,15 +26,17 @@ chrome.test.runTests([ ...@@ -24,15 +26,17 @@ chrome.test.runTests([
function attachUnsupportedMinorVersion() { function attachUnsupportedMinorVersion() {
chrome.tabs.getSelected(null, function(tab) { chrome.tabs.getSelected(null, function(tab) {
chrome.debugger.attach({tabId: tab.id}, "1.5", chrome.debugger.attach({tabId: tab.id}, unsupportedMinorProtocolVersion,
fail("Requested protocol version is not supported: 1.5.")); fail("Requested protocol version is not supported: " +
unsupportedMinorProtocolVersion + "."));
}); });
}, },
function attachUnsupportedVersion() { function attachUnsupportedVersion() {
chrome.tabs.getSelected(null, function(tab) { chrome.tabs.getSelected(null, function(tab) {
chrome.debugger.attach({tabId: tab.id}, "100.0", chrome.debugger.attach({tabId: tab.id}, unsupportedMajorProtocolVersion,
fail("Requested protocol version is not supported: 100.0.")); fail("Requested protocol version is not supported: " +
unsupportedMajorProtocolVersion + "."));
}); });
}, },
......
...@@ -6,7 +6,7 @@ var pass = chrome.test.callbackPass; ...@@ -6,7 +6,7 @@ var pass = chrome.test.callbackPass;
var fail = chrome.test.callbackFail; var fail = chrome.test.callbackFail;
var debuggee; var debuggee;
var protocolVersion = "1.1"; var protocolVersion = "1.2";
chrome.test.runTests([ chrome.test.runTests([
......
...@@ -18,7 +18,7 @@ SchemaHandler::~SchemaHandler() { ...@@ -18,7 +18,7 @@ SchemaHandler::~SchemaHandler() {
Response SchemaHandler::GetDomains( Response SchemaHandler::GetDomains(
std::vector<scoped_refptr<Domain>>* domains) { std::vector<scoped_refptr<Domain>>* domains) {
static const char kVersion[] = "1.1"; static const char kVersion[] = "1.2";
static const char* kDomains[] = { static const char* kDomains[] = {
"Inspector", "Memory", "Page", "Rendering", "Emulation", "Security", "Inspector", "Memory", "Page", "Rendering", "Emulation", "Security",
"Network", "Database", "IndexedDB", "CacheStorage", "DOMStorage", "CSS", "Network", "Database", "IndexedDB", "CacheStorage", "DOMStorage", "CSS",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"version": { "major": "1", "minor": "1" }, "version": { "major": "1", "minor": "2" },
"domains": [{ "domains": [{
"domain": "Inspector", "domain": "Inspector",
"experimental": true, "experimental": true,
...@@ -447,7 +447,6 @@ ...@@ -447,7 +447,6 @@
{ "name": "accept", "type": "boolean", "description": "Whether to accept or dismiss the dialog." }, { "name": "accept", "type": "boolean", "description": "Whether to accept or dismiss the dialog." },
{ "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog." } { "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog." }
], ],
"experimental": true,
"handlers": ["browser"] "handlers": ["browser"]
}, },
{ {
...@@ -588,16 +587,14 @@ ...@@ -588,16 +587,14 @@
"parameters": [ "parameters": [
{ "name": "message", "type": "string", "description": "Message that will be displayed by the dialog." }, { "name": "message", "type": "string", "description": "Message that will be displayed by the dialog." },
{ "name": "type", "$ref": "DialogType", "description": "Dialog type." } { "name": "type", "$ref": "DialogType", "description": "Dialog type." }
], ]
"experimental": true
}, },
{ {
"name": "javascriptDialogClosed", "name": "javascriptDialogClosed",
"description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.", "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.",
"parameters": [ "parameters": [
{ "name": "result", "type": "boolean", "description": "Whether dialog was confirmed." } { "name": "result", "type": "boolean", "description": "Whether dialog was confirmed." }
], ]
"experimental": true
}, },
{ {
"name": "screencastFrame", "name": "screencastFrame",
...@@ -631,13 +628,11 @@ ...@@ -631,13 +628,11 @@
{ {
"name": "interstitialShown", "name": "interstitialShown",
"description": "Fired when interstitial page was shown", "description": "Fired when interstitial page was shown",
"experimental": true,
"handlers": ["browser"] "handlers": ["browser"]
}, },
{ {
"name": "interstitialHidden", "name": "interstitialHidden",
"description": "Fired when interstitial page was hidden", "description": "Fired when interstitial page was hidden",
"experimental": true,
"handlers": ["browser"] "handlers": ["browser"]
}, },
{ {
...@@ -698,7 +693,6 @@ ...@@ -698,7 +693,6 @@
{ {
"domain": "Emulation", "domain": "Emulation",
"description": "This domain emulates different environments for the page.", "description": "This domain emulates different environments for the page.",
"experimental": true,
"types": [ "types": [
{ {
"id": "ScreenOrientation", "id": "ScreenOrientation",
...@@ -717,6 +711,7 @@ ...@@ -717,6 +711,7 @@
"pause", "pause",
"pauseIfNetworkFetchesPending" "pauseIfNetworkFetchesPending"
], ],
"experimental": true,
"description": "advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to allow the next delayed task (if any) to run; pause: The virtual time base may not advance; pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending resource fetches." "description": "advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to allow the next delayed task (if any) to run; pause: The virtual time base may not advance; pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending resource fetches."
} }
], ],
...@@ -730,13 +725,13 @@ ...@@ -730,13 +725,13 @@
{ "name": "deviceScaleFactor", "type": "number", "description": "Overriding device scale factor value. 0 disables the override." }, { "name": "deviceScaleFactor", "type": "number", "description": "Overriding device scale factor value. 0 disables the override." },
{ "name": "mobile", "type": "boolean", "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more." }, { "name": "mobile", "type": "boolean", "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more." },
{ "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." }, { "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." },
{ "name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image. Ignored in |fitWindow| mode." }, { "name": "scale", "type": "number", "optional": true, "experimental": true, "description": "Scale to apply to resulting view image. Ignored in |fitWindow| mode." },
{ "name": "offsetX", "type": "number", "optional": true, "description": "X offset to shift resulting view image by. Ignored in |fitWindow| mode." }, { "name": "offsetX", "type": "number", "optional": true, "experimental": true, "description": "X offset to shift resulting view image by. Ignored in |fitWindow| mode." },
{ "name": "offsetY", "type": "number", "optional": true, "description": "Y offset to shift resulting view image by. Ignored in |fitWindow| mode." }, { "name": "offsetY", "type": "number", "optional": true, "experimental": true, "description": "Y offset to shift resulting view image by. Ignored in |fitWindow| mode." },
{ "name": "screenWidth", "type": "integer", "optional": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, { "name": "screenWidth", "type": "integer", "optional": true, "experimental": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
{ "name": "screenHeight", "type": "integer", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, { "name": "screenHeight", "type": "integer", "optional": true, "experimental": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
{ "name": "positionX", "type": "integer", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, { "name": "positionX", "type": "integer", "optional": true, "experimental": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
{ "name": "positionY", "type": "integer", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, { "name": "positionY", "type": "integer", "optional": true, "experimental": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." },
{ "name": "screenOrientation", "$ref": "ScreenOrientation", "optional": true, "description": "Screen orientation override." } { "name": "screenOrientation", "$ref": "ScreenOrientation", "optional": true, "description": "Screen orientation override." }
], ],
"handlers": ["browser"] "handlers": ["browser"]
...@@ -748,11 +743,13 @@ ...@@ -748,11 +743,13 @@
}, },
{ {
"name": "resetPageScaleFactor", "name": "resetPageScaleFactor",
"experimental": true,
"description": "Requests that page scale factor is reset to initial values." "description": "Requests that page scale factor is reset to initial values."
}, },
{ {
"name": "setPageScaleFactor", "name": "setPageScaleFactor",
"description": "Sets a specified page scale factor.", "description": "Sets a specified page scale factor.",
"experimental": true,
"parameters": [ "parameters": [
{ "name": "pageScaleFactor", "type": "number", "description": "Page scale factor." } { "name": "pageScaleFactor", "type": "number", "description": "Page scale factor." }
] ]
...@@ -769,6 +766,7 @@ ...@@ -769,6 +766,7 @@
{ {
"name": "setScriptExecutionDisabled", "name": "setScriptExecutionDisabled",
"description": "Switches script execution in the page.", "description": "Switches script execution in the page.",
"experimental": true,
"parameters": [ "parameters": [
{ "name": "value", "type": "boolean", "description": "Whether script execution should be disabled in the page." } { "name": "value", "type": "boolean", "description": "Whether script execution should be disabled in the page." }
] ]
...@@ -776,6 +774,7 @@ ...@@ -776,6 +774,7 @@
{ {
"name": "setGeolocationOverride", "name": "setGeolocationOverride",
"description": "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.", "description": "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.",
"experimental": true,
"parameters": [ "parameters": [
{ "name": "latitude", "type": "number", "optional": true, "description": "Mock latitude"}, { "name": "latitude", "type": "number", "optional": true, "description": "Mock latitude"},
{ "name": "longitude", "type": "number", "optional": true, "description": "Mock longitude"}, { "name": "longitude", "type": "number", "optional": true, "description": "Mock longitude"},
...@@ -786,6 +785,7 @@ ...@@ -786,6 +785,7 @@
{ {
"name": "clearGeolocationOverride", "name": "clearGeolocationOverride",
"description": "Clears the overriden Geolocation Position and Error.", "description": "Clears the overriden Geolocation Position and Error.",
"experimental": true,
"handlers": ["browser"] "handlers": ["browser"]
}, },
{ {
...@@ -809,6 +809,7 @@ ...@@ -809,6 +809,7 @@
"parameters": [ "parameters": [
{ "name": "rate", "type": "number", "description": "Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc)." } { "name": "rate", "type": "number", "description": "Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc)." }
], ],
"experimental": true,
"description": "Enables CPU throttling to emulate slow CPUs." "description": "Enables CPU throttling to emulate slow CPUs."
}, },
{ {
...@@ -817,6 +818,7 @@ ...@@ -817,6 +818,7 @@
"returns": [ "returns": [
{ "name": "result", "type": "boolean", "description": "True if emulation is supported." } { "name": "result", "type": "boolean", "description": "True if emulation is supported." }
], ],
"experimental": true,
"handlers": ["browser"] "handlers": ["browser"]
}, },
{ {
...@@ -832,6 +834,7 @@ ...@@ -832,6 +834,7 @@
"events": [ "events": [
{ {
"name": "virtualTimeBudgetExpired", "name": "virtualTimeBudgetExpired",
"experimental": true,
"description": "Notification sent after the virual time budget for the current VirtualTimePolicy has run out." "description": "Notification sent after the virual time budget for the current VirtualTimePolicy has run out."
} }
] ]
...@@ -1295,7 +1298,6 @@ ...@@ -1295,7 +1298,6 @@
{ "name": "uploadThroughput", "type": "number", "description": "Maximal aggregated upload throughput." }, { "name": "uploadThroughput", "type": "number", "description": "Maximal aggregated upload throughput." },
{ "name": "connectionType", "$ref": "ConnectionType", "optional": true, "description": "Connection type if known."} { "name": "connectionType", "$ref": "ConnectionType", "optional": true, "description": "Connection type if known."}
], ],
"experimental": true,
"handlers": ["browser", "renderer"] "handlers": ["browser", "renderer"]
}, },
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment