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

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

Issue 2180623002: Roll closure compiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix newly uncovered compilation error. Created 4 years, 4 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/closure_compiler/README.chromium » ('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 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 chromeMocks.runtime.connectNative = function(application) { 106 chromeMocks.runtime.connectNative = function(application) {
107 var port = nativePorts[application]; 107 var port = nativePorts[application];
108 if (port === undefined) { 108 if (port === undefined) {
109 port = new chromeMocks.runtime.Port(); 109 port = new chromeMocks.runtime.Port();
110 port.name = application; 110 port.name = application;
111 nativePorts[application] = port; 111 nativePorts[application] = port;
112 } 112 }
113 return port; 113 return port;
114 }; 114 };
115 115
116 /** @const {Object<!chromeMocks.runtime.Port>} */ 116 /** @type {Object<!chromeMocks.runtime.Port>} */
117 var nativePorts = null; 117 var nativePorts = null;
118 118
119 /** @type {string} */ 119 /** @type {string} */
120 chromeMocks.runtime.id = 'extensionId'; 120 chromeMocks.runtime.id = 'extensionId';
121 121
122 /** @type {Object} */ 122 /** @type {Object} */
123 chromeMocks.runtime.lastError = { 123 chromeMocks.runtime.lastError = {
124 /** @type {string|undefined} */ 124 /** @type {string|undefined} */
125 message: undefined 125 message: undefined
126 }; 126 };
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 throw new Error('You must call activate() before restore().'); 314 throw new Error('You must call activate() before restore().');
315 } 315 }
316 for (var components in originals_) { 316 for (var components in originals_) {
317 chrome[components] = originals_[components]; 317 chrome[components] = originals_[components];
318 } 318 }
319 originals_ = null; 319 originals_ = null;
320 nativePorts = null; 320 nativePorts = null;
321 }; 321 };
322 322
323 })(); 323 })();
OLDNEW
« no previous file with comments | « no previous file | third_party/closure_compiler/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698