| OLD | NEW |
| 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 Loading... |
| 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 |
| 341 protected: | 345 protected: |
| 342 registry_util::RegistryOverrideManager override_manager_; | 346 registry_util::RegistryOverrideManager override_manager_; |
| 343 }; | 347 }; |
| 344 | 348 |
| 345 // Attempts to kill all the processes on the current machine that were launched | 349 // Attempts to kill all the processes on the current machine that were launched |
| 346 // from the given executable name, ending them with the given exit code. If | 350 // from the given executable name, ending them with the given exit code. If |
| 347 // filter is non-null, then only processes selected by the filter are killed. | 351 // filter is non-null, then only processes selected by the filter are killed. |
| 348 // Returns true if all processes were able to be killed off, false if at least | 352 // Returns true if all processes were able to be killed off, false if at least |
| 349 // one couldn't be killed. | 353 // one couldn't be killed. |
| 350 // NOTE: This function is based on the base\process_util.h helper function | 354 // NOTE: This function is based on the base\process_util.h helper function |
| (...skipping 14 matching lines...) Expand all Loading... |
| 365 } // namespace chrome_frame_test | 369 } // namespace chrome_frame_test |
| 366 | 370 |
| 367 // TODO(tommi): This is a temporary workaround while we're getting our | 371 // TODO(tommi): This is a temporary workaround while we're getting our |
| 368 // Singleton story straight. Ideally each test should clear up any singletons | 372 // Singleton story straight. Ideally each test should clear up any singletons |
| 369 // it might have created, but test cases do not implicitly have their own | 373 // it might have created, but test cases do not implicitly have their own |
| 370 // AtExitManager, so we have this workaround method for tests that depend on | 374 // AtExitManager, so we have this workaround method for tests that depend on |
| 371 // "fresh" singletons. The implementation is in chrome_frame_unittest_main.cc. | 375 // "fresh" singletons. The implementation is in chrome_frame_unittest_main.cc. |
| 372 void DeleteAllSingletons(); | 376 void DeleteAllSingletons(); |
| 373 | 377 |
| 374 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ | 378 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ |
| OLD | NEW |