OLD | NEW |
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 #import <UIKit/UIKit.h> | 5 #import <UIKit/UIKit.h> |
6 | 6 |
7 #include "base/debug/debugger.h" | 7 #include "base/debug/debugger.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/mac/scoped_nsautorelease_pool.h" | 9 #include "base/mac/scoped_nsautorelease_pool.h" |
10 #include "base/memory/scoped_nsobject.h" | 10 #include "base/memory/scoped_nsobject.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/message_pump_default.h" | 12 #include "base/message_loop/message_pump_default.h" |
13 #include "base/test/test_suite.h" | 13 #include "base/test/test_suite.h" |
14 | 14 |
15 // Springboard will kill any iOS app that fails to check in after launch within | 15 // Springboard will kill any iOS app that fails to check in after launch within |
16 // a given time. Starting a UIApplication before invoking TestSuite::Run | 16 // a given time. Starting a UIApplication before invoking TestSuite::Run |
17 // prevents this from happening. | 17 // prevents this from happening. |
18 | 18 |
19 // InitIOSRunHook saves the TestSuite and argc/argv, then invoking | 19 // InitIOSRunHook saves the TestSuite and argc/argv, then invoking |
20 // RunTestsFromIOSApp calls UIApplicationMain(), providing an application | 20 // RunTestsFromIOSApp calls UIApplicationMain(), providing an application |
21 // delegate class: ChromeUnitTestDelegate. The delegate implements | 21 // delegate class: ChromeUnitTestDelegate. The delegate implements |
22 // application:didFinishLaunchingWithOptions: to invoke the TestSuite's Run | 22 // application:didFinishLaunchingWithOptions: to invoke the TestSuite's Run |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 if (!ran_hook) { | 179 if (!ran_hook) { |
180 ran_hook = true; | 180 ran_hook = true; |
181 mac::ScopedNSAutoreleasePool pool; | 181 mac::ScopedNSAutoreleasePool pool; |
182 int exit_status = UIApplicationMain(g_argc, g_argv, nil, | 182 int exit_status = UIApplicationMain(g_argc, g_argv, nil, |
183 @"ChromeUnitTestDelegate"); | 183 @"ChromeUnitTestDelegate"); |
184 exit(exit_status); | 184 exit(exit_status); |
185 } | 185 } |
186 } | 186 } |
187 | 187 |
188 } // namespace base | 188 } // namespace base |
OLD | NEW |