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

Side by Side Diff: chrome/browser/chromeos/policy/device_local_account_browsertest.cc

Issue 253063002: CleanUp: Introduce UserInfo. Move session_state stuff to ash/session. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "apps/app_window_registry.h" 8 #include "apps/app_window_registry.h"
9 #include "apps/ui/native_app_window.h" 9 #include "apps/ui/native_app_window.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 chromeos::UserManager::Get()->FindUser(user_id_1_); 1025 chromeos::UserManager::Get()->FindUser(user_id_1_);
1026 ASSERT_TRUE(user); 1026 ASSERT_TRUE(user);
1027 1027
1028 base::FilePath user_data_dir; 1028 base::FilePath user_data_dir;
1029 ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); 1029 ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir));
1030 const base::FilePath saved_image_path = 1030 const base::FilePath saved_image_path =
1031 user_data_dir.Append(user_id_1_).AddExtension("jpg"); 1031 user_data_dir.Append(user_id_1_).AddExtension("jpg");
1032 1032
1033 EXPECT_FALSE(user->HasDefaultImage()); 1033 EXPECT_FALSE(user->HasDefaultImage());
1034 EXPECT_EQ(chromeos::User::kExternalImageIndex, user->image_index()); 1034 EXPECT_EQ(chromeos::User::kExternalImageIndex, user->image_index());
1035 EXPECT_TRUE(chromeos::test::AreImagesEqual(*policy_image, user->image())); 1035 EXPECT_TRUE(chromeos::test::AreImagesEqual(*policy_image, user->GetImage()));
1036 const base::DictionaryValue* images_pref = 1036 const base::DictionaryValue* images_pref =
1037 g_browser_process->local_state()->GetDictionary("user_image_info"); 1037 g_browser_process->local_state()->GetDictionary("user_image_info");
1038 ASSERT_TRUE(images_pref); 1038 ASSERT_TRUE(images_pref);
1039 const base::DictionaryValue* image_properties; 1039 const base::DictionaryValue* image_properties;
1040 ASSERT_TRUE(images_pref->GetDictionaryWithoutPathExpansion( 1040 ASSERT_TRUE(images_pref->GetDictionaryWithoutPathExpansion(
1041 user_id_1_, 1041 user_id_1_,
1042 &image_properties)); 1042 &image_properties));
1043 int image_index; 1043 int image_index;
1044 std::string image_path; 1044 std::string image_path;
1045 ASSERT_TRUE(image_properties->GetInteger("index", &image_index)); 1045 ASSERT_TRUE(image_properties->GetInteger("index", &image_index));
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 if (!IsSessionStarted()) { 1388 if (!IsSessionStarted()) {
1389 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED, 1389 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED,
1390 base::Bind(IsSessionStarted)).Wait(); 1390 base::Bind(IsSessionStarted)).Wait();
1391 } 1391 }
1392 } 1392 }
1393 1393
1394 INSTANTIATE_TEST_CASE_P(TermsOfServiceTestInstance, 1394 INSTANTIATE_TEST_CASE_P(TermsOfServiceTestInstance,
1395 TermsOfServiceTest, testing::Bool()); 1395 TermsOfServiceTest, testing::Bool());
1396 1396
1397 } // namespace policy 1397 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698