| 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 buildAuthenticationManager() { | 9 function buildAuthenticationManager() { |
| 10 return { | 10 return {addListener: emptyMock}; |
| 11 addListener: emptyMock | |
| 12 }; | |
| 13 } | 11 } |
| 14 | 12 |
| 15 var instrumentApiFunction = emptyMock; | 13 var instrumentApiFunction = emptyMock; |
| 16 var buildTaskManager = emptyMock; | 14 var buildTaskManager = emptyMock; |
| 17 var buildAttemptManager = emptyMock; | 15 var buildAttemptManager = emptyMock; |
| 18 var buildCardSet = emptyMock; | 16 var buildCardSet = emptyMock; |
| 19 | 17 |
| 20 var instrumented = {}; | 18 var instrumented = {}; |
| 21 mockChromeEvent(instrumented, 'gcm.onMessage'); | 19 mockChromeEvent(instrumented, 'gcm.onMessage'); |
| 22 mockChromeEvent(instrumented, 'notifications.onButtonClicked'); | 20 mockChromeEvent(instrumented, 'notifications.onButtonClicked'); |
| 23 mockChromeEvent(instrumented, 'notifications.onClicked'); | 21 mockChromeEvent(instrumented, 'notifications.onClicked'); |
| 24 mockChromeEvent(instrumented, 'notifications.onClosed'); | 22 mockChromeEvent(instrumented, 'notifications.onClosed'); |
| 25 mockChromeEvent(instrumented, 'notifications.onPermissionLevelChanged'); | 23 mockChromeEvent(instrumented, 'notifications.onPermissionLevelChanged'); |
| 26 mockChromeEvent(instrumented, 'notifications.onShowSettings'); | 24 mockChromeEvent(instrumented, 'notifications.onShowSettings'); |
| 27 mockChromeEvent(instrumented, 'runtime.onInstalled'); | 25 mockChromeEvent(instrumented, 'runtime.onInstalled'); |
| 28 mockChromeEvent(instrumented, 'runtime.onStartup'); | 26 mockChromeEvent(instrumented, 'runtime.onStartup'); |
| 29 mockChromeEvent(instrumented, 'storage.onChanged'); | 27 mockChromeEvent(instrumented, 'storage.onChanged'); |
| 30 | 28 |
| 31 NOTIFICATION_CARDS_URL = 'https://test/'; | 29 NOTIFICATION_CARDS_URL = 'https://test/'; |
| 32 navigator = {language: 'en-US'}; | 30 navigator = { |
| 31 language: 'en-US' |
| 32 }; |
| OLD | NEW |