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

Side by Side Diff: chrome/browser/ui/views/avatar_menu_button_browsertest.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
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/ui/views/avatar_menu_button.h" 5 #include "chrome/browser/ui/views/avatar_menu_button.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/profiles/avatar_menu_model.h" 10 #include "chrome/browser/profiles/avatar_menu_model.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 switches::kNewProfileManagement); 67 switches::kNewProfileManagement);
68 } 68 }
69 69
70 void AvatarMenuButtonTest::CreateTestingProfile() { 70 void AvatarMenuButtonTest::CreateTestingProfile() {
71 ProfileManager* profile_manager = g_browser_process->profile_manager(); 71 ProfileManager* profile_manager = g_browser_process->profile_manager();
72 EXPECT_EQ(1u, profile_manager->GetNumberOfProfiles()); 72 EXPECT_EQ(1u, profile_manager->GetNumberOfProfiles());
73 73
74 base::FilePath path; 74 base::FilePath path;
75 PathService::Get(chrome::DIR_USER_DATA, &path); 75 PathService::Get(chrome::DIR_USER_DATA, &path);
76 path = path.AppendASCII("test_profile"); 76 path = path.AppendASCII("test_profile");
77 if (!file_util::PathExists(path)) 77 if (!base::PathExists(path))
78 ASSERT_TRUE(file_util::CreateDirectory(path)); 78 ASSERT_TRUE(file_util::CreateDirectory(path));
79 Profile* profile = 79 Profile* profile =
80 Profile::CreateProfile(path, NULL, Profile::CREATE_MODE_SYNCHRONOUS); 80 Profile::CreateProfile(path, NULL, Profile::CREATE_MODE_SYNCHRONOUS);
81 profile_manager->RegisterTestingProfile(profile, true, false); 81 profile_manager->RegisterTestingProfile(profile, true, false);
82 82
83 EXPECT_EQ(2u, profile_manager->GetNumberOfProfiles()); 83 EXPECT_EQ(2u, profile_manager->GetNumberOfProfiles());
84 } 84 }
85 85
86 AvatarMenuButton* AvatarMenuButtonTest::GetAvatarMenuButton() { 86 AvatarMenuButton* AvatarMenuButtonTest::GetAvatarMenuButton() {
87 BrowserView* browser_view = reinterpret_cast<BrowserView*>( 87 BrowserView* browser_view = reinterpret_cast<BrowserView*>(
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 EXPECT_TRUE(model->GetItemAt(model->GetActiveProfileIndex()).signin_required); 155 EXPECT_TRUE(model->GetItemAt(model->GetActiveProfileIndex()).signin_required);
156 156
157 window_close_observer.Wait(); // Rely on test timeout for failure indication. 157 window_close_observer.Wait(); // Rely on test timeout for failure indication.
158 EXPECT_TRUE(browser_list->empty()); 158 EXPECT_TRUE(browser_list->empty());
159 } 159 }
160 160
161 161
162 INSTANTIATE_TEST_CASE_P(Old, AvatarMenuButtonTest, testing::Values(false)); 162 INSTANTIATE_TEST_CASE_P(Old, AvatarMenuButtonTest, testing::Values(false));
163 INSTANTIATE_TEST_CASE_P(New, AvatarMenuButtonTest, testing::Values(true)); 163 INSTANTIATE_TEST_CASE_P(New, AvatarMenuButtonTest, testing::Values(true));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698