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

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

Issue 1392023004: Rename android only infobars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: try again Created 5 years, 2 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_request_infobar_delegate_unittest.cc
diff --git a/chrome/browser/download/download_request_infobar_delegate_unittest.cc b/chrome/browser/download/download_request_infobar_delegate_unittest.cc
index 2506a31def865a389f7005b5f20df3d953e4b5b9..cbf9d69bb1cd1f708eab8f9da4e1f72438025416 100644
--- a/chrome/browser/download/download_request_infobar_delegate_unittest.cc
+++ b/chrome/browser/download/download_request_infobar_delegate_unittest.cc
@@ -4,7 +4,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "chrome/browser/download/download_request_infobar_delegate.h"
+#include "chrome/browser/download/download_request_infobar_delegate_android.h"
#include "chrome/browser/download/download_request_limiter.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -27,7 +27,7 @@ class MockTabDownloadState : public DownloadRequestLimiter::TabDownloadState {
private:
// The actual infobar delegate we're listening to.
- scoped_ptr<DownloadRequestInfoBarDelegate> infobar_delegate_;
+ scoped_ptr<DownloadRequestInfoBarDelegateAndroid> infobar_delegate_;
// True if we have gotten some sort of response.
bool responded_;
@@ -46,8 +46,8 @@ MockTabDownloadState::MockTabDownloadState()
: responded_(false),
accepted_(false),
weak_ptr_factory_(this) {
- infobar_delegate_ =
- DownloadRequestInfoBarDelegate::Create(weak_ptr_factory_.GetWeakPtr());
+ infobar_delegate_ = DownloadRequestInfoBarDelegateAndroid::Create(
+ weak_ptr_factory_.GetWeakPtr());
}
MockTabDownloadState::~MockTabDownloadState() {
@@ -74,21 +74,21 @@ void MockTabDownloadState::CancelOnce() {
// Tests ----------------------------------------------------------------------
-TEST(DownloadRequestInfoBarDelegate, AcceptTest) {
+TEST(DownloadRequestInfoBarDelegateAndroid, AcceptTest) {
MockTabDownloadState state;
if (state.infobar_delegate()->Accept())
state.delete_infobar_delegate();
EXPECT_TRUE(state.accepted());
}
-TEST(DownloadRequestInfoBarDelegate, CancelTest) {
+TEST(DownloadRequestInfoBarDelegateAndroid, CancelTest) {
MockTabDownloadState state;
if (state.infobar_delegate()->Cancel())
state.delete_infobar_delegate();
EXPECT_FALSE(state.accepted());
}
-TEST(DownloadRequestInfoBarDelegate, CloseTest) {
+TEST(DownloadRequestInfoBarDelegateAndroid, CloseTest) {
MockTabDownloadState state;
state.delete_infobar_delegate();
EXPECT_FALSE(state.accepted());

Powered by Google App Engine
This is Rietveld 408576698