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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc

Issue 2758323002: Broke out layout metric information from ViewsDelegate to LayoutProvider (Closed)
Patch Set: Fix Bookmark and Global error unittests Created 3 years, 9 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 ef959af3e7003bdefa91940f54e241dc5d3fb8d1..8a90c0668a75ab2ccc4a3d3f6c0b7489735d072e 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc
@@ -10,6 +10,7 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/views/harmony/chrome_views_layout_delegate.h"
#include "chrome/test/base/testing_profile.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/test/bookmark_test_helpers.h"
@@ -36,6 +37,10 @@ class BookmarkEditorViewTest : public testing::Test {
profile_.reset(new TestingProfile());
profile_->CreateBookmarkModel(true);
+ views_delegate_.set_layout_delegate(nullptr);
Peter Kasting 2017/03/24 22:51:13 Why is this line needed? Same comment elsewhere t
kylix_rd 2017/03/27 18:18:27 Since these delegates are singletons and they set/
Peter Kasting 2017/03/27 20:06:48 This sounds like the API is easy to subtly use wro
kylix_rd 2017/03/29 18:56:04 Short of imposing more conditions on its use, I'm
+ views_delegate_.set_layout_delegate(
+ base::MakeUnique<ChromeViewsLayoutDelegate>());
+
model_ = BookmarkModelFactory::GetForBrowserContext(profile_.get());
bookmarks::test::WaitForBookmarkModelToLoad(model_);

Powered by Google App Engine
This is Rietveld 408576698