| OLD | NEW |
| 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 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 chromeos::UserManager::Get()->FindUser(user_id_1_); | 1033 chromeos::UserManager::Get()->FindUser(user_id_1_); |
| 1034 ASSERT_TRUE(user); | 1034 ASSERT_TRUE(user); |
| 1035 | 1035 |
| 1036 base::FilePath user_data_dir; | 1036 base::FilePath user_data_dir; |
| 1037 ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); | 1037 ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); |
| 1038 const base::FilePath saved_image_path = | 1038 const base::FilePath saved_image_path = |
| 1039 user_data_dir.Append(user_id_1_).AddExtension("jpg"); | 1039 user_data_dir.Append(user_id_1_).AddExtension("jpg"); |
| 1040 | 1040 |
| 1041 EXPECT_FALSE(user->HasDefaultImage()); | 1041 EXPECT_FALSE(user->HasDefaultImage()); |
| 1042 EXPECT_EQ(chromeos::User::kExternalImageIndex, user->image_index()); | 1042 EXPECT_EQ(chromeos::User::kExternalImageIndex, user->image_index()); |
| 1043 EXPECT_TRUE(chromeos::test::AreImagesEqual(*policy_image, user->image())); | 1043 EXPECT_TRUE(chromeos::test::AreImagesEqual(*policy_image, user->GetImage())); |
| 1044 const base::DictionaryValue* images_pref = | 1044 const base::DictionaryValue* images_pref = |
| 1045 g_browser_process->local_state()->GetDictionary("user_image_info"); | 1045 g_browser_process->local_state()->GetDictionary("user_image_info"); |
| 1046 ASSERT_TRUE(images_pref); | 1046 ASSERT_TRUE(images_pref); |
| 1047 const base::DictionaryValue* image_properties; | 1047 const base::DictionaryValue* image_properties; |
| 1048 ASSERT_TRUE(images_pref->GetDictionaryWithoutPathExpansion( | 1048 ASSERT_TRUE(images_pref->GetDictionaryWithoutPathExpansion( |
| 1049 user_id_1_, | 1049 user_id_1_, |
| 1050 &image_properties)); | 1050 &image_properties)); |
| 1051 int image_index; | 1051 int image_index; |
| 1052 std::string image_path; | 1052 std::string image_path; |
| 1053 ASSERT_TRUE(image_properties->GetInteger("index", &image_index)); | 1053 ASSERT_TRUE(image_properties->GetInteger("index", &image_index)); |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1396 if (!IsSessionStarted()) { | 1396 if (!IsSessionStarted()) { |
| 1397 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED, | 1397 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED, |
| 1398 base::Bind(IsSessionStarted)).Wait(); | 1398 base::Bind(IsSessionStarted)).Wait(); |
| 1399 } | 1399 } |
| 1400 } | 1400 } |
| 1401 | 1401 |
| 1402 INSTANTIATE_TEST_CASE_P(TermsOfServiceTestInstance, | 1402 INSTANTIATE_TEST_CASE_P(TermsOfServiceTestInstance, |
| 1403 TermsOfServiceTest, testing::Bool()); | 1403 TermsOfServiceTest, testing::Bool()); |
| 1404 | 1404 |
| 1405 } // namespace policy | 1405 } // namespace policy |
| OLD | NEW |