Index: chrome_frame/test/test_scrubber.h |
diff --git a/chrome_frame/test/test_scrubber.h b/chrome_frame/test/test_scrubber.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..73947f36f70f4a00e119cb3f4dea868fc6f0e050 |
--- /dev/null |
+++ b/chrome_frame/test/test_scrubber.h |
@@ -0,0 +1,37 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// The test scrubber cleans up machine state between tests. This includes |
+// killing all Internet Explorer processes, killing all Chrome processes spawned |
+// by Chrome Frame, and deleting the user data directory. The scrubber must be |
+// installed before tests are run via |InstallTestScrubber|. |
+// |
+// Tests that lead to Chrome using a user data directory other than that used by |
+// Chrome Frame in IE must provide that directory to the scrubber via |
+// |OverrideDataDirectoryForThisTest()|. Failure to do so will lead to the |
+// scrubber failing to delete that directory. See CFACWithChrome::SetUp in |
+// automation_client_mock.cc for an example. |
robertshield
2012/02/28 03:32:15
The last sentence is prone to rapid bitrotting (li
grt (UTC plus 2)
2012/02/28 04:03:25
Removed. I initially changed it to "search for it
|
+ |
+#ifndef CHROME_FRAME_TEST_TEST_SCRUBBER_H_ |
+#define CHROME_FRAME_TEST_TEST_SCRUBBER_H_ |
+#pragma once |
+ |
+#include "base/string_piece.h" |
+ |
+namespace testing { |
+class UnitTest; |
+} |
+ |
+namespace chrome_frame_test { |
+ |
+// Install the scrubber in |unit_test| (call before RUN_ALL_TESTS). |
+void InstallTestScrubber(testing::UnitTest* unit_test); |
+ |
+// Override the user data directory that will be deleted by the scrubber at the |
+// completion of the current test. |
+void OverrideDataDirectoryForThisTest(const base::StringPiece16& user_data_dir); |
+ |
+} // namespace chrome_frame_test |
+ |
+#endif // CHROME_FRAME_TEST_TEST_SCRUBBER_H_ |