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

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

Issue 16924017: A few minor changes to the chrome.downloads extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: @r212092 Created 7 years, 5 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/download/download_danger_prompt_browsertest.cc
diff --git a/chrome/browser/download/download_danger_prompt_browsertest.cc b/chrome/browser/download/download_danger_prompt_browsertest.cc
index 5a7c9e8b9b5e45a5c4903c5b262421d062f3b71f..02627adf927c1d8ca929d4b1f519ae92cfb914b0 100644
--- a/chrome/browser/download/download_danger_prompt_browsertest.cc
+++ b/chrome/browser/download/download_danger_prompt_browsertest.cc
@@ -86,10 +86,7 @@ class DownloadDangerPromptTest : public InProcessBrowserTest {
&download_,
browser()->tab_strip_model()->GetActiveWebContents(),
false,
- base::Bind(&DownloadDangerPromptTest::PromptCallback, this,
- DownloadDangerPrompt::ACCEPT),
- base::Bind(&DownloadDangerPromptTest::PromptCallback, this,
- DownloadDangerPrompt::CANCEL));
+ base::Bind(&DownloadDangerPromptTest::PromptCallback, this));
content::RunAllPendingInMessageLoop();
}
@@ -112,26 +109,26 @@ class DownloadDangerPromptTest : public InProcessBrowserTest {
IN_PROC_BROWSER_TEST_F(DownloadDangerPromptTest, TestAll) {
OpenNewTab();
- // The Accept action should cause the accept callback to be invoked.
+ // Clicking the Accept button should invoke the ACCEPT action.
SetUpExpectations(DownloadDangerPrompt::ACCEPT);
SimulatePromptAction(DownloadDangerPrompt::ACCEPT);
VerifyExpectations();
- // The Discard action should cause the discard callback to be invoked.
+ // Clicking the Cancel button should invoke the CANCEL action.
SetUpExpectations(DownloadDangerPrompt::CANCEL);
SimulatePromptAction(DownloadDangerPrompt::CANCEL);
VerifyExpectations();
// If the download is no longer dangerous (because it was accepted), the
- // dialog should dismiss itself.
- SetUpExpectations(DownloadDangerPrompt::CANCEL);
+ // dialog should DISMISS itself.
+ SetUpExpectations(DownloadDangerPrompt::DISMISS);
EXPECT_CALL(download(), IsDangerous()).WillOnce(Return(false));
download_observer()->OnDownloadUpdated(&download());
VerifyExpectations();
- // If the download is in a terminal state then the dialog should dismiss
+ // If the download is in a terminal state then the dialog should DISMISS
// itself.
- SetUpExpectations(DownloadDangerPrompt::CANCEL);
+ SetUpExpectations(DownloadDangerPrompt::DISMISS);
EXPECT_CALL(download(), IsDangerous()).WillOnce(Return(true));
EXPECT_CALL(download(), IsDone()).WillOnce(Return(true));
download_observer()->OnDownloadUpdated(&download());
@@ -146,9 +143,9 @@ IN_PROC_BROWSER_TEST_F(DownloadDangerPromptTest, TestAll) {
SimulatePromptAction(DownloadDangerPrompt::ACCEPT);
VerifyExpectations();
- // If the containing tab is closed, the dialog should be canceled.
+ // If the containing tab is closed, the dialog should DISMISS itself.
OpenNewTab();
- SetUpExpectations(DownloadDangerPrompt::CANCEL);
+ SetUpExpectations(DownloadDangerPrompt::DISMISS);
chrome::CloseTab(browser());
VerifyExpectations();
}

Powered by Google App Engine
This is Rietveld 408576698