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

Side by Side Diff: chrome_frame/test/chrome_frame_test_utils.h

Issue 57423008: Base: Make RegistryOverrideManager support sharded/parallel tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: run git cl format 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
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 #ifndef CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ 5 #ifndef CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_
6 #define CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ 6 #define CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include <atlbase.h> 10 #include <atlbase.h>
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 base::ProcessHandle StartCrashService(); 331 base::ProcessHandle StartCrashService();
332 332
333 // Used in tests where we reference the registry and don't want to run into 333 // Used in tests where we reference the registry and don't want to run into
334 // problems where existing registry settings might conflict with the 334 // problems where existing registry settings might conflict with the
335 // expectations of the test. 335 // expectations of the test.
336 class ScopedVirtualizeHklmAndHkcu { 336 class ScopedVirtualizeHklmAndHkcu {
337 public: 337 public:
338 ScopedVirtualizeHklmAndHkcu(); 338 ScopedVirtualizeHklmAndHkcu();
339 ~ScopedVirtualizeHklmAndHkcu(); 339 ~ScopedVirtualizeHklmAndHkcu();
340 340
341 // Removes all overrides and deletes all temporary test keys used by the
342 // overrides.
343 void RemoveAllOverrides();
344
345 protected: 341 protected:
346 registry_util::RegistryOverrideManager override_manager_; 342 registry_util::RegistryOverrideManager override_manager_;
347 }; 343 };
348 344
349 // Attempts to kill all the processes on the current machine that were launched 345 // Attempts to kill all the processes on the current machine that were launched
350 // from the given executable name, ending them with the given exit code. If 346 // from the given executable name, ending them with the given exit code. If
351 // filter is non-null, then only processes selected by the filter are killed. 347 // filter is non-null, then only processes selected by the filter are killed.
352 // Returns true if all processes were able to be killed off, false if at least 348 // Returns true if all processes were able to be killed off, false if at least
353 // one couldn't be killed. 349 // one couldn't be killed.
354 // NOTE: This function is based on the base\process_util.h helper function 350 // NOTE: This function is based on the base\process_util.h helper function
(...skipping 14 matching lines...) Expand all
369 } // namespace chrome_frame_test 365 } // namespace chrome_frame_test
370 366
371 // TODO(tommi): This is a temporary workaround while we're getting our 367 // TODO(tommi): This is a temporary workaround while we're getting our
372 // Singleton story straight. Ideally each test should clear up any singletons 368 // Singleton story straight. Ideally each test should clear up any singletons
373 // it might have created, but test cases do not implicitly have their own 369 // it might have created, but test cases do not implicitly have their own
374 // AtExitManager, so we have this workaround method for tests that depend on 370 // AtExitManager, so we have this workaround method for tests that depend on
375 // "fresh" singletons. The implementation is in chrome_frame_unittest_main.cc. 371 // "fresh" singletons. The implementation is in chrome_frame_unittest_main.cc.
376 void DeleteAllSingletons(); 372 void DeleteAllSingletons();
377 373
378 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ 374 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/installer/util/product_state_unittest.cc ('k') | chrome_frame/test/chrome_frame_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698