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

Unified Diff: base/test/test_support_ios.mm

Issue 2585293003: Clean up in iOS code coverage code. (Closed)
Patch Set: Created 4 years 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 | testing/coverage_util_ios.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_support_ios.mm
diff --git a/base/test/test_support_ios.mm b/base/test/test_support_ios.mm
index 2509fa0e7307b078d7df913351fea1ce1995faf2..d7e99908eaf857b3240cc22aca57eec0dda5d26b 100644
--- a/base/test/test_support_ios.mm
+++ b/base/test/test_support_ios.mm
@@ -32,7 +32,7 @@ static int g_argc;
static char** g_argv;
@interface UIApplication (Testing)
-- (void) _terminateWithStatus:(int)status;
+- (void)_terminateWithStatus:(int)status;
@end
#if TARGET_IPHONE_SIMULATOR
@@ -47,8 +47,7 @@ static char** g_argv;
#endif // TARGET_IPHONE_SIMULATOR
@interface ChromeUnitTestDelegate : NSObject {
- @private
- base::scoped_nsobject<UIWindow> window_;
+ base::scoped_nsobject<UIWindow> _window;
}
- (void)runTests;
@end
@@ -70,19 +69,19 @@ static char** g_argv;
CGRect bounds = [[UIScreen mainScreen] bounds];
// Yes, this is leaked, it's just to make what's running visible.
- window_.reset([[UIWindow alloc] initWithFrame:bounds]);
- [window_ setBackgroundColor:[UIColor whiteColor]];
- [window_ makeKeyAndVisible];
+ _window.reset([[UIWindow alloc] initWithFrame:bounds]);
+ [_window setBackgroundColor:[UIColor whiteColor]];
+ [_window makeKeyAndVisible];
// Add a label with the app name.
UILabel* label = [[[UILabel alloc] initWithFrame:bounds] autorelease];
label.text = [[NSProcessInfo processInfo] processName];
label.textAlignment = NSTextAlignmentCenter;
- [window_ addSubview:label];
+ [_window addSubview:label];
// An NSInternalInconsistencyException is thrown if the app doesn't have a
// root view controller. Set an empty one here.
- [window_ setRootViewController:[[[UIViewController alloc] init] autorelease]];
+ [_window setRootViewController:[[[UIViewController alloc] init] autorelease]];
if ([self shouldRedirectOutputToFile])
[self redirectOutput];
@@ -163,7 +162,7 @@ static char** g_argv;
// TODO(crbug.com/137010): Figure out how much time is actually needed, and
// sleep only to make sure that much time has elapsed since launch.
[NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:2.0]];
- window_.reset();
+ _window.reset();
// Use the hidden selector to try and cleanly take down the app (otherwise
// things can think the app crashed even on a zero exit status).
« no previous file with comments | « no previous file | testing/coverage_util_ios.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698