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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkConfigView.js

Issue 2023483003: DevTools: empty user agent validation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated string from feedback Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/networkConfigView.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.VBox} 7 * @extends {WebInspector.VBox}
8 */ 8 */
9 WebInspector.NetworkConfigView = function() 9 WebInspector.NetworkConfigView = function()
10 { 10 {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 for (var userAgentVersion of userAgentDescriptor.values) 104 for (var userAgentVersion of userAgentDescriptor.values)
105 groupElement.appendChild(new Option(userAgentVersion.title, userAgen tVersion.value)); 105 groupElement.appendChild(new Option(userAgentVersion.title, userAgen tVersion.value));
106 } 106 }
107 107
108 userAgentSelectElement.selectedIndex = 0; 108 userAgentSelectElement.selectedIndex = 0;
109 109
110 var otherUserAgentElement = createElement("input"); 110 var otherUserAgentElement = createElement("input");
111 otherUserAgentElement.type = "text"; 111 otherUserAgentElement.type = "text";
112 otherUserAgentElement.value = userAgentSetting.get(); 112 otherUserAgentElement.value = userAgentSetting.get();
113 otherUserAgentElement.title = userAgentSetting.get(); 113 otherUserAgentElement.title = userAgentSetting.get();
114 otherUserAgentElement.placeholder = WebInspector.UIString("Enter a custom us er agent");
115 otherUserAgentElement.required = true;
114 116
115 settingChanged(); 117 settingChanged();
116 userAgentSelectElement.addEventListener("change", userAgentSelected, false); 118 userAgentSelectElement.addEventListener("change", userAgentSelected, false);
117 otherUserAgentElement.addEventListener("input", textChanged, false); 119 otherUserAgentElement.addEventListener("input", textChanged, false);
118 120
119 function userAgentSelected() 121 function userAgentSelected()
120 { 122 {
121 var value = userAgentSelectElement.options[userAgentSelectElement.select edIndex].value; 123 var value = userAgentSelectElement.options[userAgentSelectElement.select edIndex].value;
122 if (value !== customOverride.value) { 124 if (value !== customOverride.value) {
123 userAgentSetting.set(value); 125 userAgentSetting.set(value);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 * @param {!WebInspector.Context} context 259 * @param {!WebInspector.Context} context
258 * @param {string} actionId 260 * @param {string} actionId
259 * @return {boolean} 261 * @return {boolean}
260 */ 262 */
261 handleAction: function(context, actionId) 263 handleAction: function(context, actionId)
262 { 264 {
263 WebInspector.inspectorView.showViewInDrawer("network.config"); 265 WebInspector.inspectorView.showViewInDrawer("network.config");
264 return true; 266 return true;
265 } 267 }
266 } 268 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/networkConfigView.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698