Chromium Code Reviews| 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..fa4d79a6d3b704ebfc318e0ba64e8f03de216b39 |
| --- /dev/null |
| +++ b/chrome_frame/test/test_scrubber.h |
| @@ -0,0 +1,33 @@ |
| +// 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 TestScrubber cleans up machine state between tests. This includes killing |
|
robertshield
2012/02/27 21:13:42
The TestScrubber class isn't exposed to callers, f
grt (UTC plus 2)
2012/02/28 03:12:04
I changed "TestScrubber" to "test scrubber". Othe
|
| +// 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 use a non-standard user data directory must provide that directory |
| +// to the scrubber via |OverrideDataDirectoryForThisTest()|. |
| + |
| +#ifndef CHROME_FRAME_TEST_TEST_SCRUBBER_H_ |
| +#define CHROME_FRAME_TEST_TEST_SCRUBBER_H_ |
| +#pragma once |
| + |
| +#include "base/string_piece.h" |
|
robertshield
2012/02/27 21:13:42
I think you could forward declare StringPiece16 as
grt (UTC plus 2)
2012/02/28 03:12:04
I think that'd involve several forward decls since
|
| + |
| +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 for the current test. |
|
robertshield
2012/02/27 21:13:42
I might be misreading the implementation, but it f
grt (UTC plus 2)
2012/02/28 03:12:04
Comments updated (here and at the top of the file)
|
| +void OverrideDataDirectoryForThisTest(const base::StringPiece16& user_data_dir); |
| + |
| +} // namespace chrome_frame_test |
| + |
| +#endif // CHROME_FRAME_TEST_TEST_SCRUBBER_H_ |