Chromium Code Reviews| Index: chrome/browser/resources/google_now/unit_test/background_globals.js |
| diff --git a/chrome/browser/resources/google_now/unit_test/background_globals.js b/chrome/browser/resources/google_now/unit_test/background_globals.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a8fe423e63a79cdaa4e7823fa59c7a25931de189 |
| --- /dev/null |
| +++ b/chrome/browser/resources/google_now/unit_test/background_globals.js |
| @@ -0,0 +1,23 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// Mocks for globals needed for loading background.js. |
| + |
| +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
|
| +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.
|
| +var instrumentApiFunction = EMPTY; |
| +var buildAttemptManager = EMPTY; |
| +var EMPTY_LISTENER = {addListener: EMPTY}; |
| +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
|
| +chrome['notifications'] = { |
| + onButtonClicked: EMPTY_LISTENER, |
| + onClicked: EMPTY_LISTENER, |
| + onClosed: EMPTY_LISTENER |
| +}; |
| +chrome['omnibox'] = {onInputEntered: EMPTY_LISTENER}; |
| +chrome['runtime'] = { |
| + onInstalled: EMPTY_LISTENER, |
| + onStartup: EMPTY_LISTENER |
| +}; |
| +storage = {}; |
|
arv (Not doing code reviews)
2013/06/18 17:47:10
missing var?
vadimt
2013/06/18 23:12:25
Done.
|