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

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

Issue 2822883002: Fix test slowness introduced by https://codereview.chromium.org/2771793003 (Closed)
Patch Set: Created 3 years, 8 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 bd885d498affcd39b4e5222b8af6d3dc4f2e686e..87abf2874cd0b77263c3bd542068273156af0745 100644
--- a/chrome/browser/android/webapk/webapk_installer_unittest.cc
+++ b/chrome/browser/android/webapk/webapk_installer_unittest.cc
@@ -349,10 +349,10 @@ TEST_F(WebApkInstallerTest, Success) {
}
// Test that installation fails if fetching the bitmap at the best primary icon
-// URL times out. In a perfect world the fetch would never time out because the
-// bitmap at the best primary icon URL should be in the HTTP cache.
+// URL returns no content. In a perfect world the fetch would always succeed
+// because the fetch for the same icon succeeded recently.
TEST_F(WebApkInstallerTest, BestPrimaryIconUrlDownloadTimesOut) {
- SetBestPrimaryIconUrl(test_server()->GetURL("/slow?1000"));
+ SetBestPrimaryIconUrl(test_server()->GetURL("/nocontent"));
std::unique_ptr<WebApkInstallerRunner> runner = CreateWebApkInstallerRunner();
runner->RunInstallWebApk();
@@ -360,10 +360,10 @@ TEST_F(WebApkInstallerTest, BestPrimaryIconUrlDownloadTimesOut) {
}
// Test that installation fails if fetching the bitmap at the best badge icon
-// URL times out. In a perfect world the fetch would never time out because the
-// bitmap at the best badge icon URL should be in the HTTP cache.
+// URL returns no content. In a perfect world the fetch would always succeed
+// because the fetch for the same icon succeeded recently.
TEST_F(WebApkInstallerTest, BestBadgeIconUrlDownloadTimesOut) {
- SetBestBadgeIconUrl(test_server()->GetURL("/slow?1000"));
+ SetBestBadgeIconUrl(test_server()->GetURL("/nocontent"));
std::unique_ptr<WebApkInstallerRunner> runner = CreateWebApkInstallerRunner();
runner->RunInstallWebApk();

Powered by Google App Engine
This is Rietveld 408576698