OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 "PRE_", base::CompareCase::SENSITIVE)) { | 192 "PRE_", base::CompareCase::SENSITIVE)) { |
193 return true; | 193 return true; |
194 } | 194 } |
195 | 195 |
196 ADD_FAILURE() << "SetUpUserDataDirectory is not handled by the test."; | 196 ADD_FAILURE() << "SetUpUserDataDirectory is not handled by the test."; |
197 return false; | 197 return false; |
198 } | 198 } |
199 | 199 |
200 void TearDownOnMainThread() override { | 200 void TearDownOnMainThread() override { |
201 test_body_has_run_ = true; | 201 test_body_has_run_ = true; |
202 InProcessBrowserTest::TearDownOnMainThread(); | |
203 } | 202 } |
204 | 203 |
205 void TearDown() override { | 204 void TearDown() override { |
206 EXPECT_EQ(expect_test_body_to_run_, test_body_has_run_); | 205 EXPECT_EQ(expect_test_body_to_run_, test_body_has_run_); |
207 InProcessBrowserTest::TearDown(); | 206 InProcessBrowserTest::TearDown(); |
208 } | 207 } |
209 | 208 |
210 private: | 209 private: |
211 bool test_body_has_run_; | 210 bool test_body_has_run_; |
212 bool expect_test_body_to_run_; | 211 bool expect_test_body_to_run_; |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 // Simulate a deleted profile by not creating the profile at the first place. | 415 // Simulate a deleted profile by not creating the profile at the first place. |
417 command_line->AppendSwitchASCII(switches::kProfileDirectory, "Not Found"); | 416 command_line->AppendSwitchASCII(switches::kProfileDirectory, "Not Found"); |
418 return RemoveCreateDirectoryPermissionForUserDataDirectory(); | 417 return RemoveCreateDirectoryPermissionForUserDataDirectory(); |
419 } | 418 } |
420 | 419 |
421 IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorCorruptProfileTest, | 420 IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorCorruptProfileTest, |
422 DeletedProfileFallbackToUserManager) { | 421 DeletedProfileFallbackToUserManager) { |
423 CheckBrowserWindows({}); | 422 CheckBrowserWindows({}); |
424 ExpectUserManagerToShow(); | 423 ExpectUserManagerToShow(); |
425 } | 424 } |
OLD | NEW |