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

Unified Diff: chrome/browser/download/download_commands_unittest.cc

Issue 1084123004: [Downloads] Add context parameter to help center article URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « chrome/browser/download/download_commands.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_commands_unittest.cc
diff --git a/chrome/browser/download/download_commands_unittest.cc b/chrome/browser/download/download_commands_unittest.cc
index 46717c455f1ead71d29ef6224654d506514691db..e404d93b645b6e38037871f16b13fa7e4e8fdf7b 100644
--- a/chrome/browser/download/download_commands_unittest.cc
+++ b/chrome/browser/download/download_commands_unittest.cc
@@ -26,6 +26,8 @@ const base::FilePath::CharType kDefaultTargetFilePath[] =
// Default URL for a mock download item in DownloadCommandsTest.
const char kDefaultURL[] = "http://example.com/foo.bar";
+} // namespace
+
class DownloadCommandsTest : public testing::Test {
public:
DownloadCommandsTest() : commands_(&item_) {}
@@ -80,8 +82,6 @@ class DownloadCommandsTest : public testing::Test {
DownloadCommands commands_;
};
-} // namespace
-
TEST_F(DownloadCommandsTest, InProgress) {
EXPECT_TRUE(IsCommandEnabled(DownloadCommands::SHOW_IN_FOLDER));
EXPECT_TRUE(IsCommandEnabled(DownloadCommands::CANCEL));
@@ -154,3 +154,11 @@ TEST_F(DownloadCommandsTest, DoResume) {
EXPECT_CALL(item(), Resume()).Times(1);
commands().ExecuteCommand(DownloadCommands::RESUME);
}
+
+TEST_F(DownloadCommandsTest, LearnMoreInterruptedURL) {
+ EXPECT_CALL(item(), GetLastReason())
+ .WillOnce(
+ Return(content::DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED));
+ GURL learn_more_url = commands().GetLearnMoreURLForInterruptedDownload();
+ EXPECT_EQ("p=ui_download_errors&ctx=22", learn_more_url.query());
Randy Smith (Not in Mondays) 2015/04/21 17:28:37 I'd rather compare against the download interrupt
asanka 2015/04/22 16:58:47 Done.
+}
« no previous file with comments | « chrome/browser/download/download_commands.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698