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" | 9 #include "chrome/browser/prefs/pref_service.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
11 #include "chrome/common/pref_names.h" | |
12 #include "chrome/test/testing_profile.h" | 11 #include "chrome/test/testing_profile.h" |
13 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
15 | 14 |
16 using testing::InSequence; | 15 using testing::InSequence; |
17 | 16 |
18 class BackgroundModeManagerTest : public testing::Test { | 17 class BackgroundModeManagerTest : public testing::Test { |
19 public: | 18 public: |
20 BackgroundModeManagerTest() {} | 19 BackgroundModeManagerTest() {} |
21 ~BackgroundModeManagerTest() {} | 20 ~BackgroundModeManagerTest() {} |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // and call to AppUninstalled() set chrome to not launch on startup. | 57 // and call to AppUninstalled() set chrome to not launch on startup. |
59 EXPECT_CALL(manager, EnableLaunchOnStartup(true)); | 58 EXPECT_CALL(manager, EnableLaunchOnStartup(true)); |
60 EXPECT_CALL(manager, CreateStatusTrayIcon()); | 59 EXPECT_CALL(manager, CreateStatusTrayIcon()); |
61 EXPECT_CALL(manager, RemoveStatusTrayIcon()); | 60 EXPECT_CALL(manager, RemoveStatusTrayIcon()); |
62 EXPECT_CALL(manager, EnableLaunchOnStartup(false)); | 61 EXPECT_CALL(manager, EnableLaunchOnStartup(false)); |
63 manager.OnBackgroundAppInstalled(); | 62 manager.OnBackgroundAppInstalled(); |
64 manager.OnBackgroundAppLoaded(); | 63 manager.OnBackgroundAppLoaded(); |
65 manager.OnBackgroundAppUnloaded(); | 64 manager.OnBackgroundAppUnloaded(); |
66 manager.OnBackgroundAppUninstalled(); | 65 manager.OnBackgroundAppUninstalled(); |
67 } | 66 } |
OLD | NEW |