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 var wrapper = {instrumentChromeApiFunction: emptyMock}; | 7 var wrapper = {instrumentChromeApiFunction: emptyMock}; |
8 | 8 |
9 function buildTaskManager() { | |
10 return {debugSetStepName: emptyMock}; | |
11 } | |
12 | |
13 function buildAuthenticationManager() { | 9 function buildAuthenticationManager() { |
14 return { | 10 return { |
15 addListener: emptyMock | 11 addListener: emptyMock |
16 }; | 12 }; |
17 } | 13 } |
18 | 14 |
19 var instrumentApiFunction = emptyMock; | 15 var instrumentApiFunction = emptyMock; |
| 16 var buildTaskManager = emptyMock; |
20 var buildAttemptManager = emptyMock; | 17 var buildAttemptManager = emptyMock; |
21 var buildCardSet = emptyMock; | 18 var buildCardSet = emptyMock; |
22 | 19 |
23 var instrumented = {}; | 20 var instrumented = {}; |
24 mockChromeEvent(instrumented, 'location.onLocationUpdate'); | 21 mockChromeEvent(instrumented, 'location.onLocationUpdate'); |
25 mockChromeEvent(instrumented, 'notifications.onButtonClicked'); | 22 mockChromeEvent(instrumented, 'notifications.onButtonClicked'); |
26 mockChromeEvent(instrumented, 'notifications.onClicked'); | 23 mockChromeEvent(instrumented, 'notifications.onClicked'); |
27 mockChromeEvent(instrumented, 'notifications.onClosed'); | 24 mockChromeEvent(instrumented, 'notifications.onClosed'); |
28 mockChromeEvent(instrumented, 'omnibox.onInputEntered'); | 25 mockChromeEvent(instrumented, 'omnibox.onInputEntered'); |
29 mockChromeEvent( | 26 mockChromeEvent( |
30 instrumented, 'preferencesPrivate.googleGeolocationAccessEnabled.onChange'); | 27 instrumented, 'preferencesPrivate.googleGeolocationAccessEnabled.onChange'); |
31 mockChromeEvent(instrumented, 'runtime.onInstalled'); | 28 mockChromeEvent(instrumented, 'runtime.onInstalled'); |
32 mockChromeEvent(instrumented, 'runtime.onStartup'); | 29 mockChromeEvent(instrumented, 'runtime.onStartup'); |
OLD | NEW |