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

Unified Diff: content/test/test_content_client_initializer.cc

Issue 10191010: Re-implement the screensaver to use WebView instead of ExtensionDialogHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ut fix. Created 8 years, 8 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
« no previous file with comments | « content/test/test_content_client_initializer.h ('k') | content/test/test_render_view_host_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_content_client_initializer.cc
diff --git a/content/test/test_content_client_initializer.cc b/content/test/test_content_client_initializer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..26cd3aaad5479da834ccf96a98d03859d47ddebc
--- /dev/null
+++ b/content/test/test_content_client_initializer.cc
@@ -0,0 +1,35 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/test/test_content_client_initializer.h"
+
+#include "content/browser/mock_content_browser_client.h"
+#include "content/browser/notification_service_impl.h"
+#include "content/public/common/content_client.h"
+#include "content/test/test_content_client.h"
+
+namespace content {
+
+TestContentClientInitializer::TestContentClientInitializer() {
+ notification_service_.reset(new NotificationServiceImpl());
+
+ DCHECK(!content::GetContentClient());
+ content_client_.reset(new TestContentClient);
+ content::SetContentClient(content_client_.get());
+
+ content_browser_client_.reset(new content::MockContentBrowserClient());
+ content_client_->set_browser(content_browser_client_.get());
+}
+
+TestContentClientInitializer::~TestContentClientInitializer() {
+ notification_service_.reset();
+
+ DCHECK_EQ(content_client_.get(), content::GetContentClient());
+ content::SetContentClient(NULL);
+ content_client_.reset();
+
+ content_browser_client_.reset();
+}
+
+} // namespace content
« no previous file with comments | « content/test/test_content_client_initializer.h ('k') | content/test/test_render_view_host_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698