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

Side by Side Diff: remoting/webapp/js_proto/chrome_mocks.js

Issue 2346683004: Update chrome.metricsPrivate externs and make closure fixes (Closed)
Patch Set: fix file manager test 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This file contains various mock objects for the chrome platform to make 5 // This file contains various mock objects for the chrome platform to make
6 // unit testing easier. 6 // unit testing easier.
7 7
8 var chromeMocks = {}; 8 var chromeMocks = {};
9 9
10 (function(){ 10 (function(){
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 chromeMocks.Identity.prototype.mock$clearToken = function() { 242 chromeMocks.Identity.prototype.mock$clearToken = function() {
243 this.token_ = undefined; 243 this.token_ = undefined;
244 }; 244 };
245 245
246 /** @type {chromeMocks.Identity} */ 246 /** @type {chromeMocks.Identity} */
247 chromeMocks.identity; 247 chromeMocks.identity;
248 248
249 /** @constructor */ 249 /** @constructor */
250 chromeMocks.MetricsPrivate = function() {}; 250 chromeMocks.MetricsPrivate = function() {};
251 251
252 chromeMocks.MetricsPrivate.prototype.MetricTypeType = {
253 HISTOGRAM_LOG: 'histogram-log',
254 HISTOGRAM_LINEAR: 'histogram-linear',
255 };
256
252 chromeMocks.MetricsPrivate.prototype.recordValue = function() {}; 257 chromeMocks.MetricsPrivate.prototype.recordValue = function() {};
253 258
254 /** @type {chromeMocks.MetricsPrivate} */ 259 /** @type {chromeMocks.MetricsPrivate} */
255 chromeMocks.metricsPrivate; 260 chromeMocks.metricsPrivate;
256 261
257 /** @constructor */ 262 /** @constructor */
258 chromeMocks.I18n = function() {}; 263 chromeMocks.I18n = function() {};
259 264
260 /** 265 /**
261 * @param {string} messageName 266 * @param {string} messageName
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 throw new Error('You must call activate() before restore().'); 319 throw new Error('You must call activate() before restore().');
315 } 320 }
316 for (var components in originals_) { 321 for (var components in originals_) {
317 chrome[components] = originals_[components]; 322 chrome[components] = originals_[components];
318 } 323 }
319 originals_ = null; 324 originals_ = null;
320 nativePorts = null; 325 nativePorts = null;
321 }; 326 };
322 327
323 })(); 328 })();
OLDNEW
« no previous file with comments | « remoting/webapp/base/js/client_session.js ('k') | third_party/closure_compiler/externs/metrics_private.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698