Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(523)

Unified Diff: third_party/WebKit/Source/devtools/front_end/emulation/EmulatedDevices.js

Issue 2300403003: DevTools: patch browser's Chrome version into Chrome user agents for emulation (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/emulation/EmulatedDevices.js
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/EmulatedDevices.js b/third_party/WebKit/Source/devtools/front_end/emulation/EmulatedDevices.js
index aca67d2cf0d885387277664521cf4ac2ef6a78da..5a83efdf10f09cdd67842dc310a47d44486494b2 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/EmulatedDevices.js
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/EmulatedDevices.js
@@ -140,6 +140,7 @@ WebInspector.EmulatedDevice.fromJSONV1 = function(json)
result.title = /** @type {string} */ (parseValue(json, "title", "string"));
result.type = /** @type {string} */ (parseValue(json, "type", "string"));
result.userAgent = /** @type {string} */ (parseValue(json, "user-agent", "string"));
+ result.userAgent = WebInspector.BrowserVersionInfo.patchUserAgentWithCurrentVersion(result.userAgent, "Chrome");
var capabilities = parseValue(json, "capabilities", "object", []);
if (!Array.isArray(capabilities))

Powered by Google App Engine
This is Rietveld 408576698