OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_downloader.h" | 5 #include "chrome/browser/profiles/profile_downloader.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
10 namespace { | 10 namespace { |
11 | 11 |
12 std::string GetJSonData(const std::string& name, const std::string& url) { | 12 std::string GetJSonData(const std::string& name, const std::string& url) { |
13 std::stringstream stream; | 13 std::stringstream stream; |
14 stream << "{ "; | 14 stream << "{ "; |
15 if (!name.empty()) | 15 if (!name.empty()) |
16 stream << "\"name\": \"" << name << "\", "; | 16 stream << "\"name\": \"" << name << "\", "; |
17 if (!url.empty()) | 17 if (!url.empty()) |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // Not default G+ photo | 93 // Not default G+ photo |
94 EXPECT_FALSE(ProfileDownloader::IsDefaultProfileImageURL( | 94 EXPECT_FALSE(ProfileDownloader::IsDefaultProfileImageURL( |
95 "https://example.com/-4/AAAAAAAAAAI/AAAAAAAAAAA/G/photo.jpg")); | 95 "https://example.com/-4/AAAAAAAAAAI/AAAAAAAAAAA/G/photo.jpg")); |
96 // Not default with 6 components | 96 // Not default with 6 components |
97 EXPECT_FALSE(ProfileDownloader::IsDefaultProfileImageURL( | 97 EXPECT_FALSE(ProfileDownloader::IsDefaultProfileImageURL( |
98 "https://example.com/-4/AAAAAAAAAAI/AAAAAAAAACQ/Efg/photo.jpg")); | 98 "https://example.com/-4/AAAAAAAAAAI/AAAAAAAAACQ/Efg/photo.jpg")); |
99 // Not default with 7 components | 99 // Not default with 7 components |
100 EXPECT_FALSE(ProfileDownloader::IsDefaultProfileImageURL( | 100 EXPECT_FALSE(ProfileDownloader::IsDefaultProfileImageURL( |
101 "https://example.com/-4/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s32-c/photo.jpg")); | 101 "https://example.com/-4/AAAAAAAAAAI/AAAAAAAAACQ/Efg/s32-c/photo.jpg")); |
102 } | 102 } |
OLD | NEW |