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 #include "chrome/browser/profiles/profile.h" | 5 #include "chrome/browser/profiles/profile.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // (see crbug.com/88586). | 85 // (see crbug.com/88586). |
86 content::RunAllPendingInMessageLoop(); | 86 content::RunAllPendingInMessageLoop(); |
87 content::RunAllPendingInMessageLoop(content::BrowserThread::DB); | 87 content::RunAllPendingInMessageLoop(content::BrowserThread::DB); |
88 content::RunAllPendingInMessageLoop(content::BrowserThread::FILE); | 88 content::RunAllPendingInMessageLoop(content::BrowserThread::FILE); |
89 } | 89 } |
90 | 90 |
91 } // namespace | 91 } // namespace |
92 | 92 |
93 class ProfileBrowserTest : public InProcessBrowserTest { | 93 class ProfileBrowserTest : public InProcessBrowserTest { |
94 protected: | 94 protected: |
95 void SetUpCommandLine(CommandLine* command_line) override { | 95 void SetUpCommandLine(base::CommandLine* command_line) override { |
96 #if defined(OS_CHROMEOS) | 96 #if defined(OS_CHROMEOS) |
97 command_line->AppendSwitch( | 97 command_line->AppendSwitch( |
98 chromeos::switches::kIgnoreUserProfileMappingForTests); | 98 chromeos::switches::kIgnoreUserProfileMappingForTests); |
99 #endif | 99 #endif |
100 } | 100 } |
101 | 101 |
102 scoped_ptr<Profile> CreateProfile( | 102 scoped_ptr<Profile> CreateProfile( |
103 const base::FilePath& path, | 103 const base::FilePath& path, |
104 Profile::Delegate* delegate, | 104 Profile::Delegate* delegate, |
105 Profile::CreateMode create_mode) { | 105 Profile::CreateMode create_mode) { |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 ASSERT_EQ(GetExitTypePreferenceFromDisk(profile), "SessionEnded"); | 391 ASSERT_EQ(GetExitTypePreferenceFromDisk(profile), "SessionEnded"); |
392 | 392 |
393 // Mark the success. | 393 // Mark the success. |
394 succeeded = true; | 394 succeeded = true; |
395 } | 395 } |
396 | 396 |
397 ASSERT_TRUE(succeeded) << "profile->EndSession() timed out too often."; | 397 ASSERT_TRUE(succeeded) << "profile->EndSession() timed out too often."; |
398 } | 398 } |
399 | 399 |
400 #endif // defined(USE_X11) || defined(OS_WIN) | 400 #endif // defined(USE_X11) || defined(OS_WIN) |
OLD | NEW |