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

Unified Diff: base/test/test_suite.cc

Issue 2226623003: Adds support for running unittests using XCTest on iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review. Created 4 years, 4 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 | « no previous file | base/test/test_support_ios.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_suite.cc
diff --git a/base/test/test_suite.cc b/base/test/test_suite.cc
index 512bde5810a349dc6cc2f8a3a39db86d8d28daf7..f9bf38ea2d67ee19333dda0fdd6f11039c9fa439 100644
--- a/base/test/test_suite.cc
+++ b/base/test/test_suite.cc
@@ -238,7 +238,13 @@ int TestSuite::Run() {
// Check to see if we are being run as a client process.
if (!client_func.empty())
return multi_process_function_list::InvokeChildProcessTest(client_func);
+
#if defined(OS_IOS)
+ if (IsRunningWithXCTest()) {
+ // XCTest will drive the tests if running in XCTest mode on iOS. There is
+ // no need to run the tests here or to tear down the test suite.
+ return 0;
+ }
test_listener_ios::RegisterTestEndListener();
#endif
« no previous file with comments | « no previous file | base/test/test_support_ios.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698