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

Side by Side Diff: base/win/registry_unittest.cc

Issue 2882423002: Disable flaky RegistryTest.OpenSubKey (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/win/registry.h" 5 #include "base/win/registry.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <cstring> 9 #include <cstring>
10 #include <vector> 10 #include <vector>
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 KEY_SET_VALUE | kRedirectedViewMask)); 327 KEY_SET_VALUE | kRedirectedViewMask));
328 ASSERT_NE(ERROR_SUCCESS, key.DeleteKey(kRootKey)); 328 ASSERT_NE(ERROR_SUCCESS, key.DeleteKey(kRootKey));
329 329
330 ASSERT_EQ(ERROR_SUCCESS, 330 ASSERT_EQ(ERROR_SUCCESS,
331 key.Open(HKEY_LOCAL_MACHINE, 331 key.Open(HKEY_LOCAL_MACHINE,
332 L"Software", 332 L"Software",
333 KEY_SET_VALUE | kNativeViewMask)); 333 KEY_SET_VALUE | kNativeViewMask));
334 ASSERT_EQ(ERROR_SUCCESS, key.DeleteKey(kRootKey)); 334 ASSERT_EQ(ERROR_SUCCESS, key.DeleteKey(kRootKey));
335 } 335 }
336 336
337 TEST_F(RegistryTest, OpenSubKey) { 337 // Test is flaky. crbug.com/721245
338 TEST_F(RegistryTest, DISABLED_OpenSubKey) {
338 RegKey key; 339 RegKey key;
339 ASSERT_EQ(ERROR_SUCCESS, 340 ASSERT_EQ(ERROR_SUCCESS,
340 key.Open(HKEY_CURRENT_USER, 341 key.Open(HKEY_CURRENT_USER,
341 kRootKey, 342 kRootKey,
342 KEY_READ | KEY_CREATE_SUB_KEY)); 343 KEY_READ | KEY_CREATE_SUB_KEY));
343 344
344 ASSERT_NE(ERROR_SUCCESS, key.OpenKey(L"foo", KEY_READ)); 345 ASSERT_NE(ERROR_SUCCESS, key.OpenKey(L"foo", KEY_READ));
345 ASSERT_EQ(ERROR_SUCCESS, key.CreateKey(L"foo", KEY_READ)); 346 ASSERT_EQ(ERROR_SUCCESS, key.CreateKey(L"foo", KEY_READ));
346 ASSERT_EQ(ERROR_SUCCESS, key.Open(HKEY_CURRENT_USER, kRootKey, KEY_READ)); 347 ASSERT_EQ(ERROR_SUCCESS, key.Open(HKEY_CURRENT_USER, kRootKey, KEY_READ));
347 ASSERT_EQ(ERROR_SUCCESS, key.OpenKey(L"foo", KEY_READ)); 348 ASSERT_EQ(ERROR_SUCCESS, key.OpenKey(L"foo", KEY_READ));
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 ASSERT_TRUE(key.StartWatching(Bind(&TestChangeDelegate::OnKeyChanged, 415 ASSERT_TRUE(key.StartWatching(Bind(&TestChangeDelegate::OnKeyChanged,
415 Unretained(&delegate)))); 416 Unretained(&delegate))));
416 base::RunLoop().RunUntilIdle(); 417 base::RunLoop().RunUntilIdle();
417 EXPECT_FALSE(delegate.WasCalled()); 418 EXPECT_FALSE(delegate.WasCalled());
418 } 419 }
419 420
420 } // namespace 421 } // namespace
421 422
422 } // namespace win 423 } // namespace win
423 } // namespace base 424 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698