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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/NetworkConditionsSelector.js

Issue 1872693002: [DevTools] Fix bad unicode symbols in network conditions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 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 * @param {function(!Array<!WebInspector.NetworkConditionsGroup>):!Array<?WebIns pector.NetworkManager.Conditions>} populateCallback 7 * @param {function(!Array<!WebInspector.NetworkConditionsGroup>):!Array<?WebIns pector.NetworkManager.Conditions>} populateCallback
8 * @param {function(number)} selectCallback 8 * @param {function(number)} selectCallback
9 */ 9 */
10 WebInspector.NetworkConditionsSelector = function(populateCallback, selectCallba ck) 10 WebInspector.NetworkConditionsSelector = function(populateCallback, selectCallba ck)
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 options = []; 140 options = [];
141 for (var i = 0; i < groups.length; ++i) { 141 for (var i = 0; i < groups.length; ++i) {
142 var group = groups[i]; 142 var group = groups[i];
143 var groupElement = selectElement.createChild("optgroup"); 143 var groupElement = selectElement.createChild("optgroup");
144 groupElement.label = group.title; 144 groupElement.label = group.title;
145 if (!i) { 145 if (!i) {
146 groupElement.appendChild(new Option(WebInspector.UIString("Add\u 2026"), WebInspector.UIString("Add\u2026"))); 146 groupElement.appendChild(new Option(WebInspector.UIString("Add\u 2026"), WebInspector.UIString("Add\u2026")));
147 options.push(null); 147 options.push(null);
148 } 148 }
149 for (var conditions of group.items) { 149 for (var conditions of group.items) {
150 var title = WebInspector.NetworkConditionsSelector._conditionsTi tle(conditions); 150 var title = WebInspector.NetworkConditionsSelector._conditionsTi tle(conditions, true);
151 var option = new Option(title.text, title.text); 151 var option = new Option(title.text, title.text);
152 option.title = title.title; 152 option.title = title.title;
153 groupElement.appendChild(option); 153 groupElement.appendChild(option);
154 options.push(conditions); 154 options.push(conditions);
155 } 155 }
156 } 156 }
157 return options; 157 return options;
158 } 158 }
159 159
160 function optionSelected() 160 function optionSelected()
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 WebInspector.multitargetNetworkManager.setNetworkConditions(WebInspe ctor.NetworkManager.NoThrottlingConditions); 460 WebInspector.multitargetNetworkManager.setNetworkConditions(WebInspe ctor.NetworkManager.NoThrottlingConditions);
461 return true; 461 return true;
462 } 462 }
463 if (actionId === "components.network-offline") { 463 if (actionId === "components.network-offline") {
464 WebInspector.multitargetNetworkManager.setNetworkConditions(WebInspe ctor.NetworkManager.OfflineConditions); 464 WebInspector.multitargetNetworkManager.setNetworkConditions(WebInspe ctor.NetworkManager.OfflineConditions);
465 return true; 465 return true;
466 } 466 }
467 return false; 467 return false;
468 } 468 }
469 } 469 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698