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

Unified Diff: components/test/run_all_unittests.cc

Issue 1330613004: Remove dependency of //component:components_unittests on //content on iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments by blundell Created 5 years, 3 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 | « components/components_tests.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test/run_all_unittests.cc
diff --git a/components/test/run_all_unittests.cc b/components/test/run_all_unittests.cc
index 9edbe9c2e461a0f72e4debc2e237dc367ff70e7d..d04085ea80db4c8c89031f3b98e67826684f67d7 100644
--- a/components/test/run_all_unittests.cc
+++ b/components/test/run_all_unittests.cc
@@ -10,13 +10,13 @@
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
-#include "content/public/test/test_content_client_initializer.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "url/url_util.h"
#if !defined(OS_IOS)
+#include "content/public/test/test_content_client_initializer.h"
#include "ui/gl/test/gl_surface_test_support.h"
#endif
@@ -103,15 +103,21 @@ class ComponentsUnitTestEventListener : public testing::EmptyTestEventListener {
~ComponentsUnitTestEventListener() override {}
void OnTestStart(const testing::TestInfo& test_info) override {
+#if !defined(OS_IOS)
content_initializer_.reset(new content::TestContentClientInitializer());
+#endif
}
void OnTestEnd(const testing::TestInfo& test_info) override {
+#if !defined(OS_IOS)
content_initializer_.reset();
+#endif
}
private:
+#if !defined(OS_IOS)
scoped_ptr<content::TestContentClientInitializer> content_initializer_;
+#endif
DISALLOW_COPY_AND_ASSIGN(ComponentsUnitTestEventListener);
};
« no previous file with comments | « components/components_tests.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698