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

Unified Diff: ios/web/web_state/favicon_callbacks_inttest.mm

Issue 2880723002: Favicon url is used only if it is valid (Closed)
Patch Set: Change the comment Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ios/web/web_state/js/resources/common.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/favicon_callbacks_inttest.mm
diff --git a/ios/web/web_state/favicon_callbacks_inttest.mm b/ios/web/web_state/favicon_callbacks_inttest.mm
index acc1479fdc38aa07081b9390e54fa88fdb4d4825..fc998fc4d6dd32cdb0b4e7db3e6888f588aef349 100644
--- a/ios/web/web_state/favicon_callbacks_inttest.mm
+++ b/ios/web/web_state/favicon_callbacks_inttest.mm
@@ -120,7 +120,7 @@ TEST_F(FaviconCallbackTest, AppleTouchIconPrecomposedFavicon) {
// Tests page without favicon link.
TEST_F(FaviconCallbackTest, NoFavicon) {
ASSERT_TRUE(observer_->favicon_url_candidates().empty());
- LoadHtml(@"<html></html>", GURL("https://chromium.test"));
+ LoadHtml(@"<html></html>", GURL("https://chromium.test/test/test.html"));
WaitForCondition(^{
return observer_->favicon_url_updated();
@@ -164,7 +164,8 @@ TEST_F(FaviconCallbackTest, MultipleFavicons) {
// Tests page with invalid favicon url.
TEST_F(FaviconCallbackTest, InvalidFaviconUrl) {
ASSERT_TRUE(observer_->favicon_url_candidates().empty());
- LoadHtml(@"<head><link rel='icon' href='http://'></head>");
+ LoadHtml(@"<html><head><link rel='icon' href='http://'></head></html>",
+ GURL("https://chromium.test"));
WaitForCondition(^{
return observer_->favicon_url_updated();
@@ -172,7 +173,7 @@ TEST_F(FaviconCallbackTest, InvalidFaviconUrl) {
const std::vector<FaviconURL>& favicons = observer_->favicon_url_candidates();
ASSERT_EQ(1U, favicons.size());
- EXPECT_EQ("http:", favicons[0].icon_url.possibly_invalid_spec());
+ EXPECT_EQ(GURL("https://chromium.test/favicon.ico"), favicons[0].icon_url);
EXPECT_EQ(FaviconURL::FAVICON, favicons[0].icon_type);
ASSERT_TRUE(favicons[0].icon_sizes.empty());
};
« no previous file with comments | « no previous file | ios/web/web_state/js/resources/common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698