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

Unified Diff: ui/views/controls/webview/webview_unittest.cc

Issue 1159033008: Refactor ViewsDelegate singleton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 6 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: ui/views/controls/webview/webview_unittest.cc
diff --git a/ui/views/controls/webview/webview_unittest.cc b/ui/views/controls/webview/webview_unittest.cc
index 349ad3f732d4a25c87e3c1a99b4aa3e6dd02b4a7..eb7a05f0acfc6f8498c16bfd5a682463963eaada 100644
--- a/ui/views/controls/webview/webview_unittest.cc
+++ b/ui/views/controls/webview/webview_unittest.cc
@@ -130,7 +130,9 @@ class WebViewUnitTest : public views::test::WidgetTest {
void SetUp() override {
// The ViewsDelegate is deleted when the ViewsTestBase class is torn down.
- WidgetTest::set_views_delegate(new WebViewTestViewsDelegate);
+ scoped_ptr<views::TestViewsDelegate> views_delegate(
+ new WebViewTestViewsDelegate);
+ set_views_delegate(views_delegate.Pass());
sadrul 2015/06/08 03:27:43 You can also do: set_views_delegate(make_scoped_
mohsen 2015/06/08 19:27:34 Done.
browser_context_.reset(new content::TestBrowserContext);
WidgetTest::SetUp();
// Set the test content browser client to avoid pulling in needless
@@ -176,7 +178,6 @@ class WebViewUnitTest : public views::test::WidgetTest {
content::TestBrowserThread file_blocking_thread_;
content::TestBrowserThread io_thread_;
scoped_ptr<content::TestBrowserContext> browser_context_;
- scoped_ptr<WebViewTestViewsDelegate> views_delegate_;
content::TestContentBrowserClient test_browser_client_;
Widget* top_level_widget_;

Powered by Google App Engine
This is Rietveld 408576698