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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_editor_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/bookmarks/bookmark_editor_view_unittest.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc
index 2abe3d77823e2f144ab3c2c62b5117ac182d68d0..3ed2d0b9ae34bb0025b1b083d3e1c4049658bd31 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc
@@ -4,8 +4,10 @@
#include "chrome/browser/ui/views/bookmarks/bookmark_editor_view.h"
+#include <memory>
#include <string>
+#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
@@ -17,6 +19,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/controls/tree/tree_view.h"
+#include "ui/views/test/test_views_delegate.h"
using base::ASCIIToUTF16;
using base::UTF8ToUTF16;
@@ -35,6 +38,8 @@ class BookmarkEditorViewTest : public testing::Test {
profile_.reset(new TestingProfile());
profile_->CreateBookmarkModel(true);
+ views_delegate_ = base::MakeUnique<views::TestViewsDelegate>();
+
model_ = BookmarkModelFactory::GetForBrowserContext(profile_.get());
bookmarks::test::WaitForBookmarkModelToLoad(model_);
@@ -113,6 +118,7 @@ class BookmarkEditorViewTest : public testing::Test {
BookmarkModel* model_;
std::unique_ptr<TestingProfile> profile_;
+ std::unique_ptr<views::TestViewsDelegate> views_delegate_;
private:
// Creates the following structure:

Powered by Google App Engine
This is Rietveld 408576698