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

Side by Side Diff: base/test/test_suite.cc

Issue 10700158: Get base_unittests closer to compiling for iOS (Closed) Base URL: http://git.chromium.org/chromium/src.git@all-ios-tweak
Patch Set: Comment fix Created 8 years, 5 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 unified diff | Download patch
« base/base.gyp ('K') | « base/base.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/test/test_suite.h" 5 #include "base/test/test_suite.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/base_paths.h" 8 #include "base/base_paths.h"
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/debug/debug_on_start_win.h" 11 #include "base/debug/debug_on_start_win.h"
12 #include "base/debug/debugger.h" 12 #include "base/debug/debugger.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/i18n/icu_util.h" 14 #include "base/i18n/icu_util.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/path_service.h" 17 #include "base/path_service.h"
18 #include "base/process_util.h" 18 #include "base/process_util.h"
19 #include "base/test/multiprocess_test.h" 19 #include "base/test/multiprocess_test.h"
20 #include "base/test/test_switches.h" 20 #include "base/test/test_switches.h"
21 #include "base/test/test_timeouts.h" 21 #include "base/test/test_timeouts.h"
22 #include "base/time.h" 22 #include "base/time.h"
23 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
24 #include "testing/multiprocess_func_list.h" 24 #include "testing/multiprocess_func_list.h"
25 25
26 #if defined(OS_MACOSX) 26 #if defined(OS_MACOSX)
27 #include "base/mac/scoped_nsautorelease_pool.h" 27 #include "base/mac/scoped_nsautorelease_pool.h"
28 #if !defined(OS_IOS)
28 #include "base/test/mock_chrome_application_mac.h" 29 #include "base/test/mock_chrome_application_mac.h"
29 #endif 30 #endif // !OS_IOS
31 #endif // OS_MACOSX
30 32
31 #if defined(OS_ANDROID) 33 #if defined(OS_ANDROID)
32 #include "base/test/test_support_android.h" 34 #include "base/test/test_support_android.h"
33 #endif 35 #endif
34 36
35 #if defined(TOOLKIT_GTK) 37 #if defined(TOOLKIT_GTK)
36 #include <gtk/gtk.h> 38 #include <gtk/gtk.h>
37 #endif 39 #endif
38 40
39 namespace { 41 namespace {
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 // Suppress the "Debug Assertion Failed" dialog. 286 // Suppress the "Debug Assertion Failed" dialog.
285 // TODO(hbono): remove this code when gtest has it. 287 // TODO(hbono): remove this code when gtest has it.
286 // http://groups.google.com/d/topic/googletestframework/OjuwNlXy5ac/discussion 288 // http://groups.google.com/d/topic/googletestframework/OjuwNlXy5ac/discussion
287 _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); 289 _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
288 _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); 290 _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
289 #endif // defined(_DEBUG) && defined(_HAS_EXCEPTIONS) && (_HAS_EXCEPTIONS == 1) 291 #endif // defined(_DEBUG) && defined(_HAS_EXCEPTIONS) && (_HAS_EXCEPTIONS == 1)
290 #endif // defined(OS_WIN) 292 #endif // defined(OS_WIN)
291 } 293 }
292 294
293 void TestSuite::Initialize() { 295 void TestSuite::Initialize() {
294 #if defined(OS_MACOSX) 296 #if defined(OS_MACOSX) && !defined(OS_IOS)
295 // Some of the app unit tests spin runloops. 297 // Some of the app unit tests spin runloops.
296 mock_cr_app::RegisterMockCrApp(); 298 mock_cr_app::RegisterMockCrApp();
297 #endif 299 #endif
298 300
299 #if defined(OS_ANDROID) 301 #if defined(OS_ANDROID)
300 InitAndroidTest(); 302 InitAndroidTest();
301 #else 303 #else
302 // Initialize logging. 304 // Initialize logging.
303 FilePath exe; 305 FilePath exe;
304 PathService::Get(base::FILE_EXE, &exe); 306 PathService::Get(base::FILE_EXE, &exe);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 !CommandLine::ForCurrentProcess()->HasSwitch( 343 !CommandLine::ForCurrentProcess()->HasSwitch(
342 switches::kSingleProcessChromeFlag)) { 344 switches::kSingleProcessChromeFlag)) {
343 WatchAtExitManager(); 345 WatchAtExitManager();
344 } 346 }
345 347
346 TestTimeouts::Initialize(); 348 TestTimeouts::Initialize();
347 } 349 }
348 350
349 void TestSuite::Shutdown() { 351 void TestSuite::Shutdown() {
350 } 352 }
OLDNEW
« base/base.gyp ('K') | « base/base.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698