Commit 1222984c authored by jkrcal's avatar jkrcal Committed by Commit bot

[LargeIconService] Adding URL fallback for the server

This CL fixes the fallback_opts parameter for favicon server once again
(after CL 2790113002).

BUG=644102

Review-Url: https://codereview.chromium.org/2804293003
Cr-Commit-Position: refs/heads/master@{#462905}
parent f90cae07
...@@ -32,7 +32,7 @@ namespace { ...@@ -32,7 +32,7 @@ namespace {
const char kGoogleServerV2RequestFormat[] = const char kGoogleServerV2RequestFormat[] =
"https://t0.gstatic.com/faviconV2?" "https://t0.gstatic.com/faviconV2?"
"client=chrome&drop_404_icon=true&size=%d&min_size=%d&max_size=%d&" "client=chrome&drop_404_icon=true&size=%d&min_size=%d&max_size=%d&"
"fallback_opts=TYPE,SIZE&url=%s"; "fallback_opts=TYPE,SIZE,URL&url=%s";
const int kGoogleServerV2MaxSizeInPixel = 128; const int kGoogleServerV2MaxSizeInPixel = 128;
const int kGoogleServerV2DesiredSizeInPixel = 64; const int kGoogleServerV2DesiredSizeInPixel = 64;
......
...@@ -131,7 +131,7 @@ class LargeIconServiceTest : public testing::Test { ...@@ -131,7 +131,7 @@ class LargeIconServiceTest : public testing::Test {
TEST_F(LargeIconServiceTest, ShouldGetFromGoogleServer) { TEST_F(LargeIconServiceTest, ShouldGetFromGoogleServer) {
const GURL kExpectedServerUrl( const GURL kExpectedServerUrl(
"https://t0.gstatic.com/faviconV2?client=chrome&drop_404_icon=true" "https://t0.gstatic.com/faviconV2?client=chrome&drop_404_icon=true"
"&size=64&min_size=42&max_size=128&fallback_opts=TYPE,SIZE" "&size=64&min_size=42&max_size=128&fallback_opts=TYPE,SIZE,URL"
"&url=http://www.example.com/"); "&url=http://www.example.com/");
EXPECT_CALL(mock_favicon_service_, UnableToDownloadFavicon(_)).Times(0); EXPECT_CALL(mock_favicon_service_, UnableToDownloadFavicon(_)).Times(0);
...@@ -158,7 +158,7 @@ TEST_F(LargeIconServiceTest, ShouldTrimQueryParametersForGoogleServer) { ...@@ -158,7 +158,7 @@ TEST_F(LargeIconServiceTest, ShouldTrimQueryParametersForGoogleServer) {
const GURL kDummyUrlWithQuery("http://www.example.com?foo=1"); const GURL kDummyUrlWithQuery("http://www.example.com?foo=1");
const GURL kExpectedServerUrl( const GURL kExpectedServerUrl(
"https://t0.gstatic.com/faviconV2?client=chrome&drop_404_icon=true" "https://t0.gstatic.com/faviconV2?client=chrome&drop_404_icon=true"
"&size=64&min_size=42&max_size=128&fallback_opts=TYPE,SIZE" "&size=64&min_size=42&max_size=128&fallback_opts=TYPE,SIZE,URL"
"&url=http://www.example.com/"); "&url=http://www.example.com/");
EXPECT_CALL(*mock_image_fetcher_, EXPECT_CALL(*mock_image_fetcher_,
...@@ -197,7 +197,7 @@ TEST_F(LargeIconServiceTest, ShouldReportUnavailableIfFetchFromServerFails) { ...@@ -197,7 +197,7 @@ TEST_F(LargeIconServiceTest, ShouldReportUnavailableIfFetchFromServerFails) {
const GURL kDummyUrlWithQuery("http://www.example.com?foo=1"); const GURL kDummyUrlWithQuery("http://www.example.com?foo=1");
const GURL kExpectedServerUrl( const GURL kExpectedServerUrl(
"https://t0.gstatic.com/faviconV2?client=chrome&drop_404_icon=true" "https://t0.gstatic.com/faviconV2?client=chrome&drop_404_icon=true"
"&size=64&min_size=42&max_size=128&fallback_opts=TYPE,SIZE" "&size=64&min_size=42&max_size=128&fallback_opts=TYPE,SIZE,URL"
"&url=http://www.example.com/"); "&url=http://www.example.com/");
EXPECT_CALL(mock_favicon_service_, SetLastResortFavicons(_, _, _, _, _)) EXPECT_CALL(mock_favicon_service_, SetLastResortFavicons(_, _, _, _, _))
...@@ -223,7 +223,7 @@ TEST_F(LargeIconServiceTest, ShoutNotGetFromGoogleServerIfUnavailable) { ...@@ -223,7 +223,7 @@ TEST_F(LargeIconServiceTest, ShoutNotGetFromGoogleServerIfUnavailable) {
mock_favicon_service_, mock_favicon_service_,
WasUnableToDownloadFavicon(GURL( WasUnableToDownloadFavicon(GURL(
"https://t0.gstatic.com/faviconV2?client=chrome&drop_404_icon=true" "https://t0.gstatic.com/faviconV2?client=chrome&drop_404_icon=true"
"&size=64&min_size=42&max_size=128&fallback_opts=TYPE,SIZE" "&size=64&min_size=42&max_size=128&fallback_opts=TYPE,SIZE,URL"
"&url=http://www.example.com/"))) "&url=http://www.example.com/")))
.WillByDefault(Return(true)); .WillByDefault(Return(true));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment