Chromium Code Reviews| Index: testing/iossim/iossim.mm |
| diff --git a/testing/iossim/iossim.mm b/testing/iossim/iossim.mm |
| index f1f0ca86c6e345b59caad9aa46cbf4d9ef8ead24..c2b04127f728cbbf0eeb2e95e5db295b045a5286 100644 |
| --- a/testing/iossim/iossim.mm |
| +++ b/testing/iossim/iossim.mm |
| @@ -89,6 +89,14 @@ void LogError(NSString* format, ...) { |
| [_task waitUntilExit]; |
| } |
| +- (void)launch { |
| + [_task launch]; |
| +} |
| + |
| +- (void)waitUntilExit { |
| + [_task waitUntilExit]; |
| +} |
| + |
| @end |
| // Return array of available iOS runtime dictionaries. Unavailable (old Xcode |
| @@ -127,9 +135,11 @@ NSDictionary* GetSimulatorList() { |
| initWithArguments:@[ @"simctl", @"list", @"-j" ]] autorelease]; |
| NSPipe* out = [NSPipe pipe]; |
| [task setStandardOutput:out]; |
| - [task run]; |
| + [task launch]; |
| NSData* data = [[out fileHandleForReading] readDataToEndOfFile]; |
|
rohitrao (ping after 24h)
2016/08/13 00:59:05
Add a comment explaining why the code is ordered t
|
| + [task waitUntilExit]; |
| + |
| NSError* error = nil; |
| return [NSJSONSerialization JSONObjectWithData:data |
| options:kNilOptions |