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 utility.js. | 5 // Mocks for globals needed for loading utility.js. |
6 | 6 |
7 var localStorage = {}; | 7 var localStorage = {}; |
8 | 8 |
9 chrome['alarms'] = { | 9 chrome['alarms'] = { |
10 get: emptyMock | 10 get: emptyMock |
11 }; | 11 }; |
12 chrome['identity'] = { | 12 chrome['identity'] = { |
13 getAuthToken: emptyMock, | 13 getAuthToken: emptyMock, |
14 removeCachedAuthToken: emptyMock | 14 removeCachedAuthToken: emptyMock |
15 }; | 15 }; |
| 16 chrome['storage'] = { |
| 17 local: { |
| 18 get: emptyMock |
| 19 } |
| 20 }; |
16 chrome['webstorePrivate'] = { | 21 chrome['webstorePrivate'] = { |
17 getBrowserLogin: emptyMock | 22 getBrowserLogin: emptyMock |
18 }; | 23 }; |
19 | 24 |
20 mockChromeEvent(chrome, 'alarms.onAlarm'); | 25 mockChromeEvent(chrome, 'alarms.onAlarm'); |
21 mockChromeEvent(chrome, 'identity.onSignInChanged'); | 26 mockChromeEvent(chrome, 'identity.onSignInChanged'); |
22 mockChromeEvent(chrome, 'runtime.onSuspend'); | 27 mockChromeEvent(chrome, 'runtime.onSuspend'); |
OLD | NEW |