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

Side by Side Diff: chrome/browser/resources/google_now/unit_test/background_globals.js

Issue 17125003: First unit test for Google Now extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jyasskin@ comment Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Mocks for globals needed for loading background.js.
6
7 function EMPTY() {}
arv (Not doing code reviews) 2013/06/18 17:47:10 WHY ALL CAPS?
arv (Not doing code reviews) 2013/06/18 17:47:10 Do we need this to be a global?
vadimt 2013/06/18 23:12:25 DONE
vadimt 2013/06/18 23:12:25 I assume you are asking about emptyMock only. buil
8 function buildTaskManager() { return {instrumentApiFunction: EMPTY}; }
arv (Not doing code reviews) 2013/06/18 17:47:10 line break after {
vadimt 2013/06/18 23:12:25 Done.
9 var instrumentApiFunction = EMPTY;
10 var buildAttemptManager = EMPTY;
11 var EMPTY_LISTENER = {addListener: EMPTY};
12 chrome['location'] = {onLocationUpdate: EMPTY_LISTENER};
arv (Not doing code reviews) 2013/06/18 17:47:10 Why not chrome.location?
vadimt 2013/06/18 23:12:25 This was causing presubmit check failures: line
13 chrome['notifications'] = {
14 onButtonClicked: EMPTY_LISTENER,
15 onClicked: EMPTY_LISTENER,
16 onClosed: EMPTY_LISTENER
17 };
18 chrome['omnibox'] = {onInputEntered: EMPTY_LISTENER};
19 chrome['runtime'] = {
20 onInstalled: EMPTY_LISTENER,
21 onStartup: EMPTY_LISTENER
22 };
23 storage = {};
arv (Not doing code reviews) 2013/06/18 17:47:10 missing var?
vadimt 2013/06/18 23:12:25 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698