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

Unified Diff: chrome/browser/ui/views/global_error_bubble_view_unittest.cc

Issue 2696263002: Refactor ViewsDelegate and MD-ify the icon-to-text spacing for checkbox and radiobutton (Closed)
Patch Set: Fix unit tests to use a ViewsDelegate to guard against crashes Created 3 years, 10 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/ui/views/global_error_bubble_view_unittest.cc
diff --git a/chrome/browser/ui/views/global_error_bubble_view_unittest.cc b/chrome/browser/ui/views/global_error_bubble_view_unittest.cc
index 1ea39793f2d8450c7501a71083755a2856635d89..fc24048b261637b470a1e88516c1f2c30ea8e543 100644
--- a/chrome/browser/ui/views/global_error_bubble_view_unittest.cc
+++ b/chrome/browser/ui/views/global_error_bubble_view_unittest.cc
@@ -16,6 +16,7 @@
#include "ui/gfx/image/image_unittest_util.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/button/label_button.h"
+#include "ui/views/test/test_views_delegate.h"
using ::testing::_;
using ::testing::Return;
@@ -76,7 +77,8 @@ MockGlobalErrorWithStandardBubble::~MockGlobalErrorWithStandardBubble() {}
class GlobalErrorBubbleViewTest : public testing::Test {
public:
GlobalErrorBubbleViewTest()
- : mock_global_error_with_standard_bubble_(
+ : views_delegate_(base::MakeUnique<TestViewsDelegate>()),
+ mock_global_error_with_standard_bubble_(
base::MakeUnique<StrictMock<MockGlobalErrorWithStandardBubble>>()),
button_(&mock_button_listener_, base::string16()),
view_(base::MakeUnique<GlobalErrorBubbleView>(
@@ -87,6 +89,7 @@ class GlobalErrorBubbleViewTest : public testing::Test {
mock_global_error_with_standard_bubble_->AsWeakPtr())) {}
protected:
+ std::unique_ptr<TestViewsDelegate> views_delegate_;
std::unique_ptr<StrictMock<MockGlobalErrorWithStandardBubble>>
mock_global_error_with_standard_bubble_;
views::View arg_view_;

Powered by Google App Engine
This is Rietveld 408576698