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

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

Issue 9460019: Reduce flakiness in chrome_frame_tests.exe by having each run in a clean environment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed robert's comments Created 8 years, 9 months 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
(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. See CFACWithChrome::SetUp in
14 // 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
15
16 #ifndef CHROME_FRAME_TEST_TEST_SCRUBBER_H_
17 #define CHROME_FRAME_TEST_TEST_SCRUBBER_H_
18 #pragma once
19
20 #include "base/string_piece.h"
21
22 namespace testing {
23 class UnitTest;
24 }
25
26 namespace chrome_frame_test {
27
28 // Install the scrubber in |unit_test| (call before RUN_ALL_TESTS).
29 void InstallTestScrubber(testing::UnitTest* unit_test);
30
31 // Override the user data directory that will be deleted by the scrubber at the
32 // completion of the current test.
33 void OverrideDataDirectoryForThisTest(const base::StringPiece16& user_data_dir);
34
35 } // namespace chrome_frame_test
36
37 #endif // CHROME_FRAME_TEST_TEST_SCRUBBER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698