Commit 53cf2f03 authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Commit Bot

servicediscovery: use NSNetService designated initializer in tests

Not doing this causes NSNetService to dealloc itself immediately,
which breaks the tests, on 10.15. Doing this is also objectively
correct. This fixes ServiceDiscoveryClientMacTest.* on 10.15.

Bug: 998755
Change-Id: I0f828073c74c3b9f5e611da01bc928c298efafa0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1827377
Auto-Submit: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700213}
parent b5630d76
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
@implementation TestNSNetService @implementation TestNSNetService
- (id)initWithData:(NSData*)data { - (id)initWithData:(NSData*)data {
if ((self = [super init])) { if ((self = [super initWithDomain:@"" type:@"_tcp." name:@"Test.123"])) {
data_.reset([data retain]); data_.reset([data retain]);
} }
return self; return self;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment