| 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/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 // TODO(crbug.com/137010): Figure out how much time is actually needed, and | 162 // TODO(crbug.com/137010): Figure out how much time is actually needed, and |
| 163 // sleep only to make sure that much time has elapsed since launch. | 163 // sleep only to make sure that much time has elapsed since launch. |
| 164 [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:2.0]]; | 164 [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:2.0]]; |
| 165 _window.reset(); | 165 _window.reset(); |
| 166 | 166 |
| 167 // Use the hidden selector to try and cleanly take down the app (otherwise | 167 // Use the hidden selector to try and cleanly take down the app (otherwise |
| 168 // things can think the app crashed even on a zero exit status). | 168 // things can think the app crashed even on a zero exit status). |
| 169 UIApplication* application = [UIApplication sharedApplication]; | 169 UIApplication* application = [UIApplication sharedApplication]; |
| 170 [application _terminateWithStatus:exitStatus]; | 170 [application _terminateWithStatus:exitStatus]; |
| 171 | 171 |
| 172 coverage_util::FlushCoverageDataIfNecessary(); | 172 // coverage_util::SetupCodeCoverageIfNecessary(); |
| 173 | 173 |
| 174 exit(exitStatus); | 174 exit(exitStatus); |
| 175 } | 175 } |
| 176 | 176 |
| 177 @end | 177 @end |
| 178 | 178 |
| 179 namespace { | 179 namespace { |
| 180 | 180 |
| 181 std::unique_ptr<base::MessagePump> CreateMessagePumpForUIForTests() { | 181 std::unique_ptr<base::MessagePump> CreateMessagePumpForUIForTests() { |
| 182 // A default MessagePump will do quite nicely in tests. | 182 // A default MessagePump will do quite nicely in tests. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 210 if (!ran_hook) { | 210 if (!ran_hook) { |
| 211 ran_hook = true; | 211 ran_hook = true; |
| 212 mac::ScopedNSAutoreleasePool pool; | 212 mac::ScopedNSAutoreleasePool pool; |
| 213 int exit_status = UIApplicationMain(g_argc, g_argv, nil, | 213 int exit_status = UIApplicationMain(g_argc, g_argv, nil, |
| 214 @"ChromeUnitTestDelegate"); | 214 @"ChromeUnitTestDelegate"); |
| 215 exit(exit_status); | 215 exit(exit_status); |
| 216 } | 216 } |
| 217 } | 217 } |
| 218 | 218 |
| 219 } // namespace base | 219 } // namespace base |
| OLD | NEW |