OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chrome_elf_init_win.h" | 5 #include "chrome/browser/chrome_elf_init_win.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/test/test_reg_util_win.h" | 10 #include "base/test/test_reg_util_win.h" |
11 #include "chrome/common/chrome_version_info.h" | 11 #include "chrome/common/chrome_version_info.h" |
12 #include "chrome_elf/blacklist/blacklist.h" | 12 #include "chrome_elf/chrome_elf_constants.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 class ChromeBlacklistTrialTest : public testing::Test { | 15 class ChromeBlacklistTrialTest : public testing::Test { |
16 protected: | 16 protected: |
17 ChromeBlacklistTrialTest() : | 17 ChromeBlacklistTrialTest() : |
18 blacklist_registry_key_(HKEY_CURRENT_USER, | 18 blacklist_registry_key_(HKEY_CURRENT_USER, |
19 blacklist::kRegistryBeaconPath, | 19 blacklist::kRegistryBeaconPath, |
20 KEY_QUERY_VALUE | KEY_SET_VALUE) {} | 20 KEY_QUERY_VALUE | KEY_SET_VALUE) {} |
21 | 21 |
22 virtual void SetUp() OVERRIDE { | 22 virtual void SetUp() OVERRIDE { |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 126 |
127 BrowserBlacklistBeaconSetup(); | 127 BrowserBlacklistBeaconSetup(); |
128 | 128 |
129 // The beacon should now be marked as enabled for the current version. | 129 // The beacon should now be marked as enabled for the current version. |
130 ASSERT_EQ(blacklist::BLACKLIST_ENABLED, GetBlacklistState()); | 130 ASSERT_EQ(blacklist::BLACKLIST_ENABLED, GetBlacklistState()); |
131 | 131 |
132 chrome::VersionInfo version_info; | 132 chrome::VersionInfo version_info; |
133 base::string16 expected_version(base::UTF8ToUTF16(version_info.Version())); | 133 base::string16 expected_version(base::UTF8ToUTF16(version_info.Version())); |
134 ASSERT_EQ(expected_version, GetBlacklistVersion()); | 134 ASSERT_EQ(expected_version, GetBlacklistVersion()); |
135 } | 135 } |
OLD | NEW |