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

Side by Side Diff: base/test/test_support_ios.mm

Issue 12586007: Use NSTextAlignmentCenter instead of deprecated UITextAlignmentCenter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 #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"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 CGRect bounds = [[UIScreen mainScreen] bounds]; 49 CGRect bounds = [[UIScreen mainScreen] bounds];
50 50
51 // Yes, this is leaked, it's just to make what's running visible. 51 // Yes, this is leaked, it's just to make what's running visible.
52 window_.reset([[UIWindow alloc] initWithFrame:bounds]); 52 window_.reset([[UIWindow alloc] initWithFrame:bounds]);
53 [window_ makeKeyAndVisible]; 53 [window_ makeKeyAndVisible];
54 54
55 // Add a label with the app name. 55 // Add a label with the app name.
56 UILabel* label = [[[UILabel alloc] initWithFrame:bounds] autorelease]; 56 UILabel* label = [[[UILabel alloc] initWithFrame:bounds] autorelease];
57 label.text = [[NSProcessInfo processInfo] processName]; 57 label.text = [[NSProcessInfo processInfo] processName];
58 label.textAlignment = UITextAlignmentCenter; 58 label.textAlignment = NSTextAlignmentCenter;
59 [window_ addSubview:label]; 59 [window_ addSubview:label];
60 60
61 if ([self shouldRedirectOutputToFile]) 61 if ([self shouldRedirectOutputToFile])
62 [self redirectOutput]; 62 [self redirectOutput];
63 63
64 // Queue up the test run. 64 // Queue up the test run.
65 [self performSelector:@selector(runTests) 65 [self performSelector:@selector(runTests)
66 withObject:nil 66 withObject:nil
67 afterDelay:0.1]; 67 afterDelay:0.1];
68 return YES; 68 return YES;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698