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

Side by Side Diff: chrome/browser/google/google_update_settings_unittest.cc

Issue 684613002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/test/scoped_path_override.h" 9 #include "base/test/scoped_path_override.h"
10 #include "chrome/browser/google/google_brand.h" 10 #include "chrome/browser/google/google_brand.h"
11 #include "chrome/common/chrome_paths.h" 11 #include "chrome/common/chrome_paths.h"
12 #include "chrome/installer/util/google_update_settings.h" 12 #include "chrome/installer/util/google_update_settings.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "testing/platform_test.h" 14 #include "testing/platform_test.h"
15 15
16 class GoogleUpdateTest : public PlatformTest { 16 class GoogleUpdateTest : public PlatformTest {
17 protected: 17 protected:
18 GoogleUpdateTest() : user_data_dir_override_(chrome::DIR_USER_DATA) {} 18 GoogleUpdateTest() : user_data_dir_override_(chrome::DIR_USER_DATA) {}
19 virtual ~GoogleUpdateTest() {} 19 ~GoogleUpdateTest() override {}
20 20
21 private: 21 private:
22 base::ScopedPathOverride user_data_dir_override_; 22 base::ScopedPathOverride user_data_dir_override_;
23 23
24 DISALLOW_COPY_AND_ASSIGN(GoogleUpdateTest); 24 DISALLOW_COPY_AND_ASSIGN(GoogleUpdateTest);
25 }; 25 };
26 26
27 TEST_F(GoogleUpdateTest, StatsConsent) { 27 TEST_F(GoogleUpdateTest, StatsConsent) {
28 // Stats are off by default. 28 // Stats are off by default.
29 EXPECT_FALSE(GoogleUpdateSettings::GetCollectStatsConsent()); 29 EXPECT_FALSE(GoogleUpdateSettings::GetCollectStatsConsent());
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &consent_dir)); 74 ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &consent_dir));
75 ASSERT_TRUE(base::DirectoryExists(consent_dir)); 75 ASSERT_TRUE(base::DirectoryExists(consent_dir));
76 76
77 base::FilePath consent_file = consent_dir.Append("Consent To Send Stats"); 77 base::FilePath consent_file = consent_dir.Append("Consent To Send Stats");
78 ASSERT_TRUE(base::PathExists(consent_file)); 78 ASSERT_TRUE(base::PathExists(consent_file));
79 int permissions; 79 int permissions;
80 ASSERT_TRUE(base::GetPosixFilePermissions(consent_file, &permissions)); 80 ASSERT_TRUE(base::GetPosixFilePermissions(consent_file, &permissions));
81 EXPECT_TRUE(permissions & base::FILE_PERMISSION_READ_BY_OTHERS); 81 EXPECT_TRUE(permissions & base::FILE_PERMISSION_READ_BY_OTHERS);
82 } 82 }
83 #endif 83 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698