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

Unified Diff: base/win/registry_unittest.cc

Issue 334973003: Fix issue where OpenKey() would call Close() and reset the wow64_access to 0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: code review changes Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/win/registry.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/registry_unittest.cc
diff --git a/base/win/registry_unittest.cc b/base/win/registry_unittest.cc
index e340c8e58a5e21ed9b4143dca444bea7e0902c21..8c91f0412fcafd16206bef77c6af74ad78d6c5db 100644
--- a/base/win/registry_unittest.cc
+++ b/base/win/registry_unittest.cc
@@ -277,6 +277,24 @@ TEST_F(RegistryTest, DISABLED_Wow64RedirectedFromNative) {
ASSERT_EQ(ERROR_SUCCESS, key.DeleteKey(kRootKey));
}
+// Test for the issue found in http://crbug.com/384587 where OpenKey would call
+// Close() and reset wow64_access_ flag to 0 and cause a NOTREACHED to hit on a
+// subsequent OpenKey call.
+TEST_F(RegistryTest, SameWowFlags) {
+ RegKey key;
+
+ ASSERT_EQ(ERROR_SUCCESS,
+ key.Open(HKEY_LOCAL_MACHINE,
+ L"Software",
+ KEY_READ | KEY_WOW64_64KEY));
+ ASSERT_EQ(ERROR_SUCCESS,
+ key.OpenKey(L"Microsoft",
+ KEY_READ | KEY_WOW64_64KEY));
+ ASSERT_EQ(ERROR_SUCCESS,
+ key.OpenKey(L"Windows",
+ KEY_READ | KEY_WOW64_64KEY));
+}
+
// TODO(wfh): flaky test on Vista. See http://crbug.com/377917
TEST_F(RegistryTest, DISABLED_Wow64NativeFromRedirected) {
if (!IsRedirectorPresent())
« no previous file with comments | « base/win/registry.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698