OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // The test scrubber cleans up machine state between tests. This includes |
| 6 // killing all Internet Explorer processes, killing all Chrome processes spawned |
| 7 // by Chrome Frame, and deleting the user data directory. The scrubber must be |
| 8 // installed before tests are run via |InstallTestScrubber|. |
| 9 // |
| 10 // Tests that lead to Chrome using a user data directory other than that used by |
| 11 // Chrome Frame in IE must provide that directory to the scrubber via |
| 12 // |OverrideDataDirectoryForThisTest()|. Failure to do so will lead to the |
| 13 // scrubber failing to delete that directory. |
| 14 |
| 15 #ifndef CHROME_FRAME_TEST_TEST_SCRUBBER_H_ |
| 16 #define CHROME_FRAME_TEST_TEST_SCRUBBER_H_ |
| 17 #pragma once |
| 18 |
| 19 #include "base/string_piece.h" |
| 20 |
| 21 namespace testing { |
| 22 class UnitTest; |
| 23 } |
| 24 |
| 25 namespace chrome_frame_test { |
| 26 |
| 27 // Install the scrubber in |unit_test| (call before RUN_ALL_TESTS). |
| 28 void InstallTestScrubber(testing::UnitTest* unit_test); |
| 29 |
| 30 // Override the user data directory that will be deleted by the scrubber at the |
| 31 // completion of the current test. |
| 32 void OverrideDataDirectoryForThisTest(const base::StringPiece16& user_data_dir); |
| 33 |
| 34 } // namespace chrome_frame_test |
| 35 |
| 36 #endif // CHROME_FRAME_TEST_TEST_SCRUBBER_H_ |
OLD | NEW |