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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadTest.java

Issue 2478583004: implementation for new duplicate download UI (Closed)
Patch Set: do null check on webcontents Created 4 years, 1 month 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/android/java_sources.gni ('k') | chrome/browser/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadTest.java
index e2c291129aca56e67128fd74377a0e92adbc498e..94ab592c4c147aa004951fcaf728d0f65fa6a6a7 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadTest.java
@@ -143,7 +143,7 @@ public class DownloadTest extends DownloadTestBase {
@MediumTest
@Feature({"Downloads"})
@RetryOnFailure
- public void testDuplicateHttpPostDownload_Overwrite() throws Exception {
+ public void testDuplicateHttpPostDownload_Download() throws Exception {
// Snackbar overlaps the infobar which is clicked in this test.
getActivity().getSnackbarManager().disableForTesting();
// Download a file.
@@ -162,20 +162,19 @@ public class DownloadTest extends DownloadTestBase {
callCount = getChromeDownloadCallCount();
singleClickView(currentView);
assertPollForInfoBarSize(1);
- assertTrue("OVERWRITE button wasn't found",
+ assertTrue("Download button wasn't found",
InfoBarUtil.clickPrimaryButton(getInfoBars().get(0)));
assertTrue("Failed to finish downloading file for the second time.",
waitForChromeDownloadToFinish(callCount));
assertTrue("Missing first download", hasDownload(FILENAME_TEXT, SUPERBO_CONTENTS));
- assertFalse("Should not have second download",
- hasDownload(FILENAME_TEXT_1, SUPERBO_CONTENTS));
+ assertTrue("Missing second download", hasDownload(FILENAME_TEXT_1, SUPERBO_CONTENTS));
}
@MediumTest
@Feature({"Downloads"})
@DisabledTest(message = "crbug.com/597230")
- public void testDuplicateHttpPostDownload_CreateNew() throws Exception {
+ public void testDuplicateHttpPostDownload_Cancel() throws Exception {
// Download a file.
loadUrl(mTestServer.getURL(TEST_DOWNLOAD_DIRECTORY + "post.html"));
waitForFocus();
@@ -194,12 +193,8 @@ public class DownloadTest extends DownloadTestBase {
assertPollForInfoBarSize(1);
assertTrue("CREATE NEW button wasn't found",
InfoBarUtil.clickSecondaryButton(getInfoBars().get(0)));
- assertTrue("Failed to finish downloading file for the second time.",
+ assertFalse("Download should not happen when clicking cancel button",
waitForChromeDownloadToFinish(callCount));
-
- assertTrue("Missing first download", hasDownload(FILENAME_TEXT, SUPERBO_CONTENTS));
- assertTrue("Missing second download",
- hasDownload(FILENAME_TEXT_1, SUPERBO_CONTENTS));
}
@MediumTest
« no previous file with comments | « chrome/android/java_sources.gni ('k') | chrome/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698