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

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, 10 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 | « chrome/browser/android/webapk/webapk_installer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0728546e7f39fd2e0834084211ffb456b252c58f..96a82320ddcfa879b3329bac06d7b79aa2cf4b52 100644
--- a/chrome/browser/android/webapk/webapk_installer_unittest.cc
+++ b/chrome/browser/android/webapk/webapk_installer_unittest.cc
@@ -421,6 +421,21 @@ TEST_F(WebApkInstallerTest, UpdateSuccess) {
EXPECT_TRUE(runner->success());
}
+// Test that an update suceeds if the WebAPK server returns a HTTP response with
+// an empty download URL. The WebAPK server sends an empty download URL when:
+// - The server is unable to update the WebAPK in the way that the client
+// requested.
+// AND
+// - The most up to date version of the WebAPK on the server is identical to the
+// one installed on the client.
+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();
« no previous file with comments | « chrome/browser/android/webapk/webapk_installer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698