OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "chrome/browser/background/background_mode_manager.h" | 7 #include "chrome/browser/background/background_mode_manager.h" |
8 #include "chrome/browser/ui/browser_list.h" | 8 #include "chrome/browser/ui/browser_list.h" |
9 #include "chrome/common/chrome_switches.h" | 9 #include "chrome/common/chrome_switches.h" |
10 #include "chrome/test/testing_browser_process.h" | 10 #include "chrome/test/base/testing_browser_process.h" |
11 #include "chrome/test/testing_browser_process_test.h" | 11 #include "chrome/test/base/testing_browser_process_test.h" |
12 #include "chrome/test/base/testing_profile.h" | 12 #include "chrome/test/base/testing_profile.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 class BackgroundModeManagerTest : public TestingBrowserProcessTest { | 15 class BackgroundModeManagerTest : public TestingBrowserProcessTest { |
16 public: | 16 public: |
17 BackgroundModeManagerTest() {} | 17 BackgroundModeManagerTest() {} |
18 ~BackgroundModeManagerTest() {} | 18 ~BackgroundModeManagerTest() {} |
19 void SetUp() { | 19 void SetUp() { |
20 command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM)); | 20 command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM)); |
21 } | 21 } |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 | 175 |
176 manager.SetBackgroundAppCount(1); | 176 manager.SetBackgroundAppCount(1); |
177 manager.OnApplicationListChanged(&profile2); | 177 manager.OnApplicationListChanged(&profile2); |
178 // There is still one background app alive | 178 // There is still one background app alive |
179 AssertBackgroundModeActive(manager); | 179 AssertBackgroundModeActive(manager); |
180 | 180 |
181 manager.SetBackgroundAppCount(0); | 181 manager.SetBackgroundAppCount(0); |
182 manager.OnApplicationListChanged(&profile1); | 182 manager.OnApplicationListChanged(&profile1); |
183 AssertBackgroundModeInactive(manager); | 183 AssertBackgroundModeInactive(manager); |
184 } | 184 } |
OLD | NEW |