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

Side by Side Diff: chrome/browser/chromeos/login/users/avatar/user_image_manager_browsertest.cc

Issue 566933005: Do not display lock for hosted domains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ChromeOS test - part deux Created 6 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/profiles/gaia_info_update_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 reinterpret_cast<UserImageManagerImpl*>( 229 reinterpret_cast<UserImageManagerImpl*>(
230 ChromeUserManager::Get()->GetUserImageManager(username)) 230 ChromeUserManager::Get()->GetUserImageManager(username))
231 ->profile_downloader_.get(); 231 ->profile_downloader_.get();
232 ASSERT_TRUE(profile_downloader); 232 ASSERT_TRUE(profile_downloader);
233 233
234 static_cast<OAuth2TokenService::Consumer*>(profile_downloader)-> 234 static_cast<OAuth2TokenService::Consumer*>(profile_downloader)->
235 OnGetTokenSuccess(NULL, 235 OnGetTokenSuccess(NULL,
236 std::string(), 236 std::string(),
237 base::Time::Now() + base::TimeDelta::FromDays(1)); 237 base::Time::Now() + base::TimeDelta::FromDays(1));
238 238
239 net::TestURLFetcher* fetcher = 239 net::TestURLFetcher* fetcher = url_fetcher_factory->GetFetcherByID(
240 url_fetcher_factory->GetFetcherByID(0); 240 gaia::GaiaOAuthClient::kUrlFetcherId);
241 ASSERT_TRUE(fetcher); 241 ASSERT_TRUE(fetcher);
242 fetcher->SetResponseString( 242 fetcher->SetResponseString(
243 "{ \"picture\": \"http://localhost/avatar.jpg\" }"); 243 "{ \"picture\": \"http://localhost/avatar.jpg\" }");
244 fetcher->set_status(net::URLRequestStatus(net::URLRequestStatus::SUCCESS, 244 fetcher->set_status(net::URLRequestStatus(net::URLRequestStatus::SUCCESS,
245 net::OK)); 245 net::OK));
246 fetcher->set_response_code(200); 246 fetcher->set_response_code(200);
247 fetcher->delegate()->OnURLFetchComplete(fetcher); 247 fetcher->delegate()->OnURLFetchComplete(fetcher);
248 base::RunLoop().RunUntilIdle(); 248 base::RunLoop().RunUntilIdle();
249 } 249 }
250 250
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 885
886 saved_image = test::ImageLoader(GetUserImagePath(kTestUser1, "jpg")).Load(); 886 saved_image = test::ImageLoader(GetUserImagePath(kTestUser1, "jpg")).Load();
887 ASSERT_TRUE(saved_image); 887 ASSERT_TRUE(saved_image);
888 888
889 // Check image dimensions. Images can't be compared since JPEG is lossy. 889 // Check image dimensions. Images can't be compared since JPEG is lossy.
890 EXPECT_EQ(policy_image_->width(), saved_image->width()); 890 EXPECT_EQ(policy_image_->width(), saved_image->width());
891 EXPECT_EQ(policy_image_->height(), saved_image->height()); 891 EXPECT_EQ(policy_image_->height(), saved_image->height());
892 } 892 }
893 893
894 } // namespace chromeos 894 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/gaia_info_update_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698