| OLD | NEW |
| 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" | |
| 6 #include "base/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
| 7 #include "base/files/file_util.h" | 6 #include "base/files/file_util.h" |
| 7 #include "base/macros.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 "build/build_config.h" |
| 10 #include "chrome/browser/google/google_brand.h" | 11 #include "chrome/browser/google/google_brand.h" |
| 11 #include "chrome/common/chrome_paths.h" | 12 #include "chrome/common/chrome_paths.h" |
| 12 #include "chrome/installer/util/google_update_settings.h" | 13 #include "chrome/installer/util/google_update_settings.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 14 #include "testing/platform_test.h" | 15 #include "testing/platform_test.h" |
| 15 | 16 |
| 16 class GoogleUpdateTest : public PlatformTest { | 17 class GoogleUpdateTest : public PlatformTest { |
| 17 protected: | 18 protected: |
| 18 GoogleUpdateTest() : user_data_dir_override_(chrome::DIR_USER_DATA) {} | 19 GoogleUpdateTest() : user_data_dir_override_(chrome::DIR_USER_DATA) {} |
| 19 ~GoogleUpdateTest() override {} | 20 ~GoogleUpdateTest() override {} |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &consent_dir)); | 75 ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &consent_dir)); |
| 75 ASSERT_TRUE(base::DirectoryExists(consent_dir)); | 76 ASSERT_TRUE(base::DirectoryExists(consent_dir)); |
| 76 | 77 |
| 77 base::FilePath consent_file = consent_dir.Append("Consent To Send Stats"); | 78 base::FilePath consent_file = consent_dir.Append("Consent To Send Stats"); |
| 78 ASSERT_TRUE(base::PathExists(consent_file)); | 79 ASSERT_TRUE(base::PathExists(consent_file)); |
| 79 int permissions; | 80 int permissions; |
| 80 ASSERT_TRUE(base::GetPosixFilePermissions(consent_file, &permissions)); | 81 ASSERT_TRUE(base::GetPosixFilePermissions(consent_file, &permissions)); |
| 81 EXPECT_TRUE(permissions & base::FILE_PERMISSION_READ_BY_OTHERS); | 82 EXPECT_TRUE(permissions & base::FILE_PERMISSION_READ_BY_OTHERS); |
| 82 } | 83 } |
| 83 #endif | 84 #endif |
| OLD | NEW |