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

Side by Side Diff: chrome/browser/chromeos/drive/drive_integration_service_unittest.cc

Issue 817063006: Update {virtual,override,final} to follow C++11 style in chrome/browser/chromeos/drive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/drive/drive_integration_service.h" 5 #include "chrome/browser/chromeos/drive/drive_integration_service.h"
6 6
7 #include "chrome/browser/chromeos/drive/dummy_file_system.h" 7 #include "chrome/browser/chromeos/drive/dummy_file_system.h"
8 #include "chrome/browser/drive/dummy_drive_service.h" 8 #include "chrome/browser/drive/dummy_drive_service.h"
9 #include "chrome/test/base/testing_browser_process.h" 9 #include "chrome/test/base/testing_browser_process.h"
10 #include "chrome/test/base/testing_profile.h" 10 #include "chrome/test/base/testing_profile.h"
11 #include "chrome/test/base/testing_profile_manager.h" 11 #include "chrome/test/base/testing_profile_manager.h"
12 #include "content/public/test/test_browser_thread_bundle.h" 12 #include "content/public/test/test_browser_thread_bundle.h"
13 #include "content/public/test/test_utils.h" 13 #include "content/public/test/test_utils.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace drive { 16 namespace drive {
17 17
18 namespace{ 18 namespace{
19 const char kTestProfileName[] = "test-profile"; 19 const char kTestProfileName[] = "test-profile";
20 } 20 }
21 21
22 class DriveIntegrationServiceTest : public testing::Test { 22 class DriveIntegrationServiceTest : public testing::Test {
23 public: 23 public:
24 DriveIntegrationServiceTest() 24 DriveIntegrationServiceTest()
25 : profile_manager_(TestingBrowserProcess::GetGlobal()) {} 25 : profile_manager_(TestingBrowserProcess::GetGlobal()) {}
26 26
27 virtual void SetUp() override { 27 void SetUp() override { ASSERT_TRUE(profile_manager_.SetUp()); }
hashimoto 2015/01/21 04:50:12 nit: I think ASSERT_TRUE should be better placed i
28 ASSERT_TRUE(profile_manager_.SetUp());
29 }
30 28
31 protected: 29 protected:
32 content::TestBrowserThreadBundle thread_bundle_; 30 content::TestBrowserThreadBundle thread_bundle_;
33 // DriveIntegrationService depends on DriveNotificationManager which depends 31 // DriveIntegrationService depends on DriveNotificationManager which depends
34 // on InvalidationService. On Chrome OS, the InvalidationServiceFactory 32 // on InvalidationService. On Chrome OS, the InvalidationServiceFactory
35 // uses chromeos::ProfileHelper, which needs the ProfileManager or a 33 // uses chromeos::ProfileHelper, which needs the ProfileManager or a
36 // TestProfileManager to be running. 34 // TestProfileManager to be running.
37 TestingProfileManager profile_manager_; 35 TestingProfileManager profile_manager_;
38 }; 36 };
39 37
(...skipping 22 matching lines...) Expand all
62 EXPECT_EQ(DriveIntegrationServiceFactory::GetForProfile(user1), 60 EXPECT_EQ(DriveIntegrationServiceFactory::GetForProfile(user1),
63 DriveIntegrationServiceFactory::GetForProfile(user1_incognito)); 61 DriveIntegrationServiceFactory::GetForProfile(user1_incognito));
64 62
65 // For different profiles, different services are running. 63 // For different profiles, different services are running.
66 TestingProfile* user2 = profile_manager_.CreateTestingProfile("user2"); 64 TestingProfile* user2 = profile_manager_.CreateTestingProfile("user2");
67 EXPECT_NE(DriveIntegrationServiceFactory::GetForProfile(user1), 65 EXPECT_NE(DriveIntegrationServiceFactory::GetForProfile(user1),
68 DriveIntegrationServiceFactory::GetForProfile(user2)); 66 DriveIntegrationServiceFactory::GetForProfile(user2));
69 } 67 }
70 68
71 } // namespace drive 69 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698