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

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

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « base/test/test_suite.cc ('k') | base/test/trace_event_analyzer.cc » ('j') | 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/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 window_.reset([[UIWindow alloc] initWithFrame:bounds]); 73 window_.reset([[UIWindow alloc] initWithFrame:bounds]);
74 [window_ setBackgroundColor:[UIColor whiteColor]]; 74 [window_ setBackgroundColor:[UIColor whiteColor]];
75 [window_ makeKeyAndVisible]; 75 [window_ makeKeyAndVisible];
76 76
77 // Add a label with the app name. 77 // Add a label with the app name.
78 UILabel* label = [[[UILabel alloc] initWithFrame:bounds] autorelease]; 78 UILabel* label = [[[UILabel alloc] initWithFrame:bounds] autorelease];
79 label.text = [[NSProcessInfo processInfo] processName]; 79 label.text = [[NSProcessInfo processInfo] processName];
80 label.textAlignment = NSTextAlignmentCenter; 80 label.textAlignment = NSTextAlignmentCenter;
81 [window_ addSubview:label]; 81 [window_ addSubview:label];
82 82
83 // An NSInternalInconsistencyException is thrown if the app doesn't have a
84 // root view controller. Set an empty one here.
85 [window_ setRootViewController:[[[UIViewController alloc] init] autorelease]];
86
83 if ([self shouldRedirectOutputToFile]) 87 if ([self shouldRedirectOutputToFile])
84 [self redirectOutput]; 88 [self redirectOutput];
85 89
86 // Queue up the test run. 90 // Queue up the test run.
87 [self performSelector:@selector(runTests) 91 [self performSelector:@selector(runTests)
88 withObject:nil 92 withObject:nil
89 afterDelay:0.1]; 93 afterDelay:0.1];
90 return YES; 94 return YES;
91 } 95 }
92 96
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 if (!ran_hook) { 211 if (!ran_hook) {
208 ran_hook = true; 212 ran_hook = true;
209 mac::ScopedNSAutoreleasePool pool; 213 mac::ScopedNSAutoreleasePool pool;
210 int exit_status = UIApplicationMain(g_argc, g_argv, nil, 214 int exit_status = UIApplicationMain(g_argc, g_argv, nil,
211 @"ChromeUnitTestDelegate"); 215 @"ChromeUnitTestDelegate");
212 exit(exit_status); 216 exit(exit_status);
213 } 217 }
214 } 218 }
215 219
216 } // namespace base 220 } // namespace base
OLDNEW
« no previous file with comments | « base/test/test_suite.cc ('k') | base/test/trace_event_analyzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698