| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/scoped_ptr.h" | 6 #include "base/scoped_ptr.h" |
| 7 #include "chrome/browser/background_mode_manager.h" | 7 #include "chrome/browser/background_mode_manager.h" |
| 8 #include "chrome/browser/browser_list.h" | 8 #include "chrome/browser/browser_list.h" |
| 9 #include "chrome/browser/prefs/pref_service.h" | |
| 10 #include "chrome/common/chrome_switches.h" | 9 #include "chrome/common/chrome_switches.h" |
| 11 #include "chrome/test/testing_profile.h" | 10 #include "chrome/test/testing_profile.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 13 |
| 15 using testing::InSequence; | 14 using testing::InSequence; |
| 16 | 15 |
| 17 class BackgroundModeManagerTest : public testing::Test { | 16 class BackgroundModeManagerTest : public testing::Test { |
| 18 public: | 17 public: |
| 19 BackgroundModeManagerTest() {} | 18 BackgroundModeManagerTest() {} |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // and call to AppUninstalled() set chrome to not launch on startup. | 56 // and call to AppUninstalled() set chrome to not launch on startup. |
| 58 EXPECT_CALL(manager, EnableLaunchOnStartup(true)); | 57 EXPECT_CALL(manager, EnableLaunchOnStartup(true)); |
| 59 EXPECT_CALL(manager, CreateStatusTrayIcon()); | 58 EXPECT_CALL(manager, CreateStatusTrayIcon()); |
| 60 EXPECT_CALL(manager, RemoveStatusTrayIcon()); | 59 EXPECT_CALL(manager, RemoveStatusTrayIcon()); |
| 61 EXPECT_CALL(manager, EnableLaunchOnStartup(false)); | 60 EXPECT_CALL(manager, EnableLaunchOnStartup(false)); |
| 62 manager.OnBackgroundAppInstalled(); | 61 manager.OnBackgroundAppInstalled(); |
| 63 manager.OnBackgroundAppLoaded(); | 62 manager.OnBackgroundAppLoaded(); |
| 64 manager.OnBackgroundAppUnloaded(); | 63 manager.OnBackgroundAppUnloaded(); |
| 65 manager.OnBackgroundAppUninstalled(); | 64 manager.OnBackgroundAppUninstalled(); |
| 66 } | 65 } |
| OLD | NEW |