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

Side by Side Diff: chrome/browser/resources/google_now/common_test_util.js

Issue 917093003: Shorten Closure template notation from Array.<*> to Array<*>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove cvox Created 5 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // Common test utilities. 5 // Common test utilities.
6 6
7 /** 7 /**
8 * Allows console.log output. 8 * Allows console.log output.
9 */ 9 */
10 var showConsoleLogOutput = false; 10 var showConsoleLogOutput = false;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 addListener: function(callback) { 53 addListener: function(callback) {
54 mockEventContainer[eventName].push(callback); 54 mockEventContainer[eventName].push(callback);
55 } 55 }
56 }; 56 };
57 } 57 }
58 58
59 /** 59 /**
60 * Gets the array of event handlers added by a mocked 'addListener' function. 60 * Gets the array of event handlers added by a mocked 'addListener' function.
61 * @param {string} eventIdentifier Event identifier, such as 61 * @param {string} eventIdentifier Event identifier, such as
62 * 'runtime.onSuspend'. 62 * 'runtime.onSuspend'.
63 * @return {Array.<Function>} Array of handlers. 63 * @return {Array<Function>} Array of handlers.
64 */ 64 */
65 function getMockHandlerContainer(eventIdentifier) { 65 function getMockHandlerContainer(eventIdentifier) {
66 var eventIdentifierParts = eventIdentifier.split('.'); 66 var eventIdentifierParts = eventIdentifier.split('.');
67 var mockEventContainer = mockEventHandlers; 67 var mockEventContainer = mockEventHandlers;
68 eventIdentifierParts.forEach(function(fragment) { 68 eventIdentifierParts.forEach(function(fragment) {
69 mockEventContainer = mockEventContainer[fragment]; 69 mockEventContainer = mockEventContainer[fragment];
70 }); 70 });
71 71
72 return mockEventContainer; 72 return mockEventContainer;
73 } 73 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 if (opt_AllowRejection === undefined) { 196 if (opt_AllowRejection === undefined) {
197 fixture.mockApis.expects(once()). 197 fixture.mockApis.expects(once()).
198 fillFromChromeLocalStorage(eqJSON(defaultObject)). 198 fillFromChromeLocalStorage(eqJSON(defaultObject)).
199 will(returnValue(Promise.resolve(result))); 199 will(returnValue(Promise.resolve(result)));
200 } else { 200 } else {
201 fixture.mockApis.expects(once()). 201 fixture.mockApis.expects(once()).
202 fillFromChromeLocalStorage(eqJSON(defaultObject), opt_AllowRejection). 202 fillFromChromeLocalStorage(eqJSON(defaultObject), opt_AllowRejection).
203 will(returnValue(Promise.resolve(result))); 203 will(returnValue(Promise.resolve(result)));
204 } 204 }
205 } 205 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/google_now/cards.js ('k') | chrome/browser/resources/google_now/utility.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698