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

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

Issue 2632243004: Don't download identical APKs on update. (Closed)
Patch Set: Nits. Created 3 years, 11 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 84265e7d0a0d446b7e3b8837f2c185c66b221abc..62426133e4cadd6b50b1478aa61c4bd3a70d27ee 100644
--- a/chrome/browser/android/webapk/webapk_installer_unittest.cc
+++ b/chrome/browser/android/webapk/webapk_installer_unittest.cc
@@ -424,6 +424,16 @@ TEST_F(WebApkInstallerTest, UpdateSuccess) {
EXPECT_TRUE(runner->success());
}
+// Test that updates suceeded if the WebAPK server returns a HTTP response with
+// an empty download URL.
pkotwicz 2017/02/10 02:50:31 Nits: "updates" -> "an update" "succeeded" -> "suc
Xi Han 2017/02/10 18:21:09 Done.
+TEST_F(WebApkInstallerTest, UpdateSuccessWithEmptyDownloadUrlInResponse) {
+ SetWebApkResponseBuilder(base::Bind(&BuildValidWebApkResponse, GURL()));
+
+ std::unique_ptr<WebApkInstallerRunner> runner = CreateWebApkInstallerRunner();
+ runner->RunUpdateWebApk();
+ EXPECT_TRUE(runner->success());
+}
+
// Test installation succeeds using Google Play.
TEST_F(WebApkInstallerTest, InstallFromGooglePlaySuccess) {
std::unique_ptr<WebApkInstallerRunner> runner = CreateWebApkInstallerRunner();

Powered by Google App Engine
This is Rietveld 408576698