| Index: third_party/WebKit/Source/devtools/front_end/network/NetworkConfigView.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkConfigView.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkConfigView.js
|
| index ba8ae54c2da314b2ed33d4272cd45e6245b9bf31..5f4509b9f3ed7053439acb8e5d56389a93b2414c 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/network/NetworkConfigView.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkConfigView.js
|
| @@ -97,8 +97,8 @@ WebInspector.NetworkConfigView.createUserAgentSelectAndInput = function()
|
| const customOverride = {title: WebInspector.UIString("Custom..."), value: "custom"};
|
| userAgentSelectElement.appendChild(new Option(customOverride.title, customOverride.value));
|
|
|
| - var groups = WebInspector.NetworkConfigView._userAgentGroups;
|
| - for (var userAgentDescriptor of WebInspector.NetworkConfigView._userAgentGroups) {
|
| + var groups = WebInspector.NetworkConfigView.UserAgentGroups();
|
| + for (var userAgentDescriptor of WebInspector.NetworkConfigView.UserAgentGroups()) {
|
| var groupElement = userAgentSelectElement.createChild("optgroup");
|
| groupElement.label = userAgentDescriptor.title;
|
| for (var userAgentVersion of userAgentDescriptor.values)
|
| @@ -159,6 +159,27 @@ WebInspector.NetworkConfigView.createUserAgentSelectAndInput = function()
|
| return { select: userAgentSelectElement, input: otherUserAgentElement };
|
| }
|
|
|
| +/**
|
| + * @return {!Array.<{title: string, values: !Array.<{title: string, value: string}>}>}
|
| + */
|
| +WebInspector.NetworkConfigView.UserAgentGroups = function()
|
| +{
|
| + return WebInspector.NetworkConfigView._userAgentGroups.map(patchGroups);
|
| +
|
| + /**
|
| + * @param {!Object.<string, !Array.<{title: string, value: string}>>} group
|
| + * @return {!Object.<string, !Array.<{title: string, value: string}>>}
|
| + */
|
| + function patchGroups(group)
|
| + {
|
| + if (group.title !== "Chrome")
|
| + return group;
|
| +
|
| + for (var i = 0; i < group.values.length; i++)
|
| + group.values[i].value = WebInspector.BrowserVersionInfo.patchUserAgentWithCurrentVersion(group.values[i].value, "Chrome");
|
| + return group;
|
| + }
|
| +}
|
|
|
| /** @type {!Array.<{title: string, values: !Array.<{title: string, value: string}>}>} */
|
| WebInspector.NetworkConfigView._userAgentGroups = [
|
| @@ -180,12 +201,12 @@ WebInspector.NetworkConfigView._userAgentGroups = [
|
| {
|
| title: "Chrome",
|
| values: [
|
| - {title: "Chrome 52 \u2014 Android Mobile", value: "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2725.0 Mobile Safari/537.36"},
|
| - {title: "Chrome 52 \u2014 Android Tablet", value: "Mozilla/5.0 (Linux; Android 4.3; Nexus 7 Build/JSS15Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2725.0 Safari/537.36"},
|
| - {title: "Chrome 52 \u2014 iPhone", value: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/52.0.2725.0 Mobile/13B143 Safari/601.1.46"},
|
| - {title: "Chrome 52 \u2014 iPad", value: "Mozilla/5.0 (iPad; CPU OS 9_1 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/52.0.2725.0 Mobile/13B143 Safari/601.1.46"},
|
| - {title: "Chrome 52 \u2014 Mac", value: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2725.0 Safari/537.36"},
|
| - {title: "Chrome 52 \u2014 Windows", value: "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2725.0 Safari/537.36"}
|
| + {title: "Chrome \u2014 Android Mobile", value: "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36"},
|
| + {title: "Chrome \u2014 Android Tablet", value: "Mozilla/5.0 (Linux; Android 4.3; Nexus 7 Build/JSS15Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36"},
|
| + {title: "Chrome \u2014 iPhone", value: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/%s Mobile/13B143 Safari/601.1.46"},
|
| + {title: "Chrome \u2014 iPad", value: "Mozilla/5.0 (iPad; CPU OS 9_1 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/%s Mobile/13B143 Safari/601.1.46"},
|
| + {title: "Chrome \u2014 Mac", value: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36"},
|
| + {title: "Chrome \u2014 Windows", value: "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36"}
|
| ]
|
| },
|
| {
|
|
|