OLD | NEW |
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 // Mocks for globals needed for loading background.js. | 5 // Mocks for globals needed for loading background.js. |
6 | 6 |
7 function emptyMock() {} | 7 function emptyMock() {} |
| 8 |
8 function buildTaskManager() { | 9 function buildTaskManager() { |
9 return { | 10 return { |
10 debugSetStepName: emptyMock, | 11 debugSetStepName: emptyMock, |
11 instrumentApiFunction: emptyMock, | 12 instrumentApiFunction: emptyMock, |
12 }; | 13 }; |
13 } | 14 } |
| 15 |
| 16 function buildAuthenticationManager() { |
| 17 return { |
| 18 addListener: emptyMock |
| 19 }; |
| 20 } |
| 21 |
14 var instrumentApiFunction = emptyMock; | 22 var instrumentApiFunction = emptyMock; |
15 var buildAttemptManager = emptyMock; | 23 var buildAttemptManager = emptyMock; |
16 var buildCardSet = emptyMock; | 24 var buildCardSet = emptyMock; |
17 var emptyListener = {addListener: emptyMock}; | 25 var emptyListener = {addListener: emptyMock}; |
18 chrome['location'] = {onLocationUpdate: emptyListener}; | 26 chrome['location'] = {onLocationUpdate: emptyListener}; |
19 chrome['notifications'] = { | 27 chrome['notifications'] = { |
20 onButtonClicked: emptyListener, | 28 onButtonClicked: emptyListener, |
21 onClicked: emptyListener, | 29 onClicked: emptyListener, |
22 onClosed: emptyListener | 30 onClosed: emptyListener |
23 }; | 31 }; |
24 chrome['omnibox'] = {onInputEntered: emptyListener}; | 32 chrome['omnibox'] = {onInputEntered: emptyListener}; |
25 chrome['preferencesPrivate'] = { | 33 chrome['preferencesPrivate'] = { |
26 googleGeolocationAccessEnabled: { | 34 googleGeolocationAccessEnabled: { |
27 onChange: emptyListener | 35 onChange: emptyListener |
28 } | 36 } |
29 }; | 37 }; |
30 chrome['runtime'] = { | 38 chrome['runtime'] = { |
31 onInstalled: emptyListener, | 39 onInstalled: emptyListener, |
32 onStartup: emptyListener | 40 onStartup: emptyListener |
33 }; | 41 }; |
34 | 42 |
35 var storage = {}; | 43 var storage = {}; |
OLD | NEW |