| 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 // The test scrubber uses a Google Test event listener to trigger scrubs. | 5 // The test scrubber uses a Google Test event listener to trigger scrubs. |
| 6 // Scrubs are performed at the start of the test program and at the conclusion | 6 // Scrubs are performed at the start of the test program and at the conclusion |
| 7 // of each test. | 7 // of each test. |
| 8 | 8 |
| 9 #include "chrome_frame/test/test_scrubber.h" | 9 #include "chrome_frame/test/test_scrubber.h" |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 scrubber_->CleanUpFromTestRun(); | 67 scrubber_->CleanUpFromTestRun(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 TestScrubber* scrubber_; | 71 TestScrubber* scrubber_; |
| 72 DISALLOW_COPY_AND_ASSIGN(EventListener); | 72 DISALLOW_COPY_AND_ASSIGN(EventListener); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 bool is_initialized() const { return !default_data_directory_.empty(); } | 75 bool is_initialized() const { return !default_data_directory_.empty(); } |
| 76 | 76 |
| 77 string16 default_data_directory_; | 77 base::string16 default_data_directory_; |
| 78 string16 data_directory_override_; | 78 base::string16 data_directory_override_; |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(TestScrubber); | 80 DISALLOW_COPY_AND_ASSIGN(TestScrubber); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 TestScrubber::TestScrubber() { | 83 TestScrubber::TestScrubber() { |
| 84 } | 84 } |
| 85 | 85 |
| 86 TestScrubber::~TestScrubber() { | 86 TestScrubber::~TestScrubber() { |
| 87 } | 87 } |
| 88 | 88 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 void OverrideDataDirectoryForThisTest( | 139 void OverrideDataDirectoryForThisTest( |
| 140 const base::StringPiece16& user_data_dir) { | 140 const base::StringPiece16& user_data_dir) { |
| 141 // Must be called within the context of a test. | 141 // Must be called within the context of a test. |
| 142 DCHECK(testing::UnitTest::GetInstance()->current_test_info()); | 142 DCHECK(testing::UnitTest::GetInstance()->current_test_info()); |
| 143 | 143 |
| 144 g_scrubber.Get().set_data_directory_override(user_data_dir); | 144 g_scrubber.Get().set_data_directory_override(user_data_dir); |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace chrome_frame_test | 147 } // namespace chrome_frame_test |
| OLD | NEW |