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

Side by Side Diff: trunk/src/chrome_frame/test/util_unittests.cc

Issue 69793004: Revert 234367 "Base: Make RegistryOverrideManager support sharde..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 | « trunk/src/chrome_frame/test/chrome_frame_test_utils.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/file_version_info.h" 5 #include "base/file_version_info.h"
6 #include "base/file_version_info_win.h" 6 #include "base/file_version_info_win.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/win/registry.h" 10 #include "base/win/registry.h"
(...skipping 16 matching lines...) Expand all
27 base::FilePath path = GetIETemporaryFilesFolder(); 27 base::FilePath path = GetIETemporaryFilesFolder();
28 EXPECT_FALSE(path.empty()); 28 EXPECT_FALSE(path.empty());
29 } 29 }
30 30
31 class UtilTests : public testing::Test { 31 class UtilTests : public testing::Test {
32 protected: 32 protected:
33 void SetUp() { 33 void SetUp() {
34 DeleteAllSingletons(); 34 DeleteAllSingletons();
35 } 35 }
36 36
37 void TearDown() {
38 registry_virtualization_.RemoveAllOverrides();
39 }
40
37 // This is used to manage life cycle of PolicySettings singleton. 41 // This is used to manage life cycle of PolicySettings singleton.
38 // base::ShadowingAtExitManager at_exit_manager_; 42 // base::ShadowingAtExitManager at_exit_manager_;
39 chrome_frame_test::ScopedVirtualizeHklmAndHkcu registry_virtualization_; 43 chrome_frame_test::ScopedVirtualizeHklmAndHkcu registry_virtualization_;
40 }; 44 };
41 45
42 TEST_F(UtilTests, GetModuleVersionTest) { 46 TEST_F(UtilTests, GetModuleVersionTest) {
43 HMODULE mod = GetModuleHandle(L"kernel32.dll"); 47 HMODULE mod = GetModuleHandle(L"kernel32.dll");
44 EXPECT_NE(mod, static_cast<HMODULE>(NULL)); 48 EXPECT_NE(mod, static_cast<HMODULE>(NULL));
45 wchar_t path[MAX_PATH] = {0}; 49 wchar_t path[MAX_PATH] = {0};
46 GetModuleFileName(mod, path, arraysize(path)); 50 GetModuleFileName(mod, path, arraysize(path));
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 546
543 ASSERT_EQ(expect_match, 547 ASSERT_EQ(expect_match,
544 CheckXUaCompatibleDirective(test.header_value, 548 CheckXUaCompatibleDirective(test.header_value,
545 all_versions[version_index])) 549 all_versions[version_index]))
546 << "Expect '" << test.header_value << "' to " 550 << "Expect '" << test.header_value << "' to "
547 << (expect_match ? "match" : "not match") << " IE major version " 551 << (expect_match ? "match" : "not match") << " IE major version "
548 << all_versions[version_index]; 552 << all_versions[version_index];
549 } 553 }
550 } 554 }
551 } 555 }
OLDNEW
« no previous file with comments | « trunk/src/chrome_frame/test/chrome_frame_test_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698