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

Unified Diff: chrome/browser/android/webapk/webapk_installer_unittest.cc

Issue 2921623004: Support badge icon in WebAPK update components (Closed)
Patch Set: Support badge icon in WebAPK update components Created 3 years, 6 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
Index: chrome/browser/android/webapk/webapk_installer_unittest.cc
diff --git a/chrome/browser/android/webapk/webapk_installer_unittest.cc b/chrome/browser/android/webapk/webapk_installer_unittest.cc
index 0ca52be08a9837340fc26ed53afdbde367f821fa..5da79323443c974a9ec669c4019a88f7acf05bd4 100644
--- a/chrome/browser/android/webapk/webapk_installer_unittest.cc
+++ b/chrome/browser/android/webapk/webapk_installer_unittest.cc
@@ -410,8 +410,8 @@ TEST_F(WebApkInstallerTest, UpdateSuccessWithEmptyDownloadUrlInResponse) {
}
// When there is no Web Manifest available for a site, an empty
-// |best_primary_icon_url| is used to build a WebApk update request. Tests the
-// request can be built properly.
+// |best_primary_icon_url| and an empty |best_badge_icon_url| is used to build a
+// WebApk update request. Tests the request can be built properly.
TEST_F(WebApkInstallerTest, BuildWebApkProtoWhenManifestIsObsolete) {
std::string icon_url_1 = test_server()->GetURL("/icon1.png").spec();
std::string icon_url_2 = test_server()->GetURL("/icon2.png").spec();
@@ -426,6 +426,9 @@ TEST_F(WebApkInstallerTest, BuildWebApkProtoWhenManifestIsObsolete) {
ASSERT_NE(nullptr, webapk_request);
webapk::WebAppManifest manifest = webapk_request->manifest();
+ // The manifest only has 3 icons because the request is built with empty
+ // SKBitmaps as primary icon and badge icon, and empty badge icons are not
+ // added to WebAPK proto.
ASSERT_EQ(3, manifest.icons_size());
webapk::Image icons[3];

Powered by Google App Engine
This is Rietveld 408576698