Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Side by Side Diff: chrome/browser/apps/app_browsertest.cc

Issue 49773003: ChromeOS: Remove MockDBusThreadManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed tests. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "apps/launcher.h" 5 #include "apps/launcher.h"
6 #include "apps/shell_window.h" 6 #include "apps/shell_window.h"
7 #include "apps/shell_window_registry.h" 7 #include "apps/shell_window_registry.h"
8 #include "apps/ui/native_app_window.h" 8 #include "apps/ui/native_app_window.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 : power_manager_client_(NULL), 1221 : power_manager_client_(NULL),
1222 mock_user_manager_(NULL) {} 1222 mock_user_manager_(NULL) {}
1223 virtual ~RestartDeviceTest() {} 1223 virtual ~RestartDeviceTest() {}
1224 1224
1225 // PlatformAppBrowserTest overrides 1225 // PlatformAppBrowserTest overrides
1226 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 1226 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
1227 PlatformAppBrowserTest::SetUpInProcessBrowserTestFixture(); 1227 PlatformAppBrowserTest::SetUpInProcessBrowserTestFixture();
1228 1228
1229 chromeos::FakeDBusThreadManager* dbus_manager = 1229 chromeos::FakeDBusThreadManager* dbus_manager =
1230 new chromeos::FakeDBusThreadManager; 1230 new chromeos::FakeDBusThreadManager;
1231 dbus_manager->SetFakeClients();
1232 power_manager_client_ = new chromeos::FakePowerManagerClient;
1233 dbus_manager->SetPowerManagerClient(
1234 scoped_ptr<chromeos::PowerManagerClient>(power_manager_client_));
1231 chromeos::DBusThreadManager::InitializeForTesting(dbus_manager); 1235 chromeos::DBusThreadManager::InitializeForTesting(dbus_manager);
1232 power_manager_client_ = dbus_manager->fake_power_manager_client();
1233 } 1236 }
1234 1237
1235 virtual void SetUpOnMainThread() OVERRIDE { 1238 virtual void SetUpOnMainThread() OVERRIDE {
1236 PlatformAppBrowserTest::SetUpOnMainThread(); 1239 PlatformAppBrowserTest::SetUpOnMainThread();
1237 1240
1238 mock_user_manager_ = new chromeos::MockUserManager; 1241 mock_user_manager_ = new chromeos::MockUserManager;
1239 user_manager_enabler_.reset( 1242 user_manager_enabler_.reset(
1240 new chromeos::ScopedUserManagerEnabler(mock_user_manager_)); 1243 new chromeos::ScopedUserManagerEnabler(mock_user_manager_));
1241 1244
1242 EXPECT_CALL(*mock_user_manager_, IsUserLoggedIn()) 1245 EXPECT_CALL(*mock_user_manager_, IsUserLoggedIn())
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 false); 1285 false);
1283 ASSERT_TRUE(restart_requested_listener.WaitUntilSatisfied()); 1286 ASSERT_TRUE(restart_requested_listener.WaitUntilSatisfied());
1284 1287
1285 EXPECT_EQ(1, request_restart_call_count()); 1288 EXPECT_EQ(1, request_restart_call_count());
1286 } 1289 }
1287 1290
1288 #endif // defined(OS_CHROMEOS) 1291 #endif // defined(OS_CHROMEOS)
1289 1292
1290 1293
1291 } // namespace extensions 1294 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698