| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "chrome/common/local_discovery/service_discovery_client.h" | |
| 11 #include "chrome/browser/local_discovery/service_discovery_client_mac.h" | 10 #include "chrome/browser/local_discovery/service_discovery_client_mac.h" |
| 12 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 11 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
| 12 #include "chrome/common/local_discovery/service_discovery_client.h" |
| 13 #include "testing/gtest_mac.h" | 13 #include "testing/gtest_mac.h" |
| 14 | 14 |
| 15 @interface TestNSNetService : NSNetService { | 15 @interface TestNSNetService : NSNetService { |
| 16 @private | 16 @private |
| 17 NSData* data_; | 17 NSData* data_; |
| 18 } | 18 } |
| 19 - (id) initWithData:(NSData *)data; | 19 - (id) initWithData:(NSData *)data; |
| 20 @end | 20 @end |
| 21 | 21 |
| 22 @implementation TestNSNetService | 22 @implementation TestNSNetService |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 resolver_impl->GetContainerForTesting()->OnResolveUpdate( | 122 resolver_impl->GetContainerForTesting()->OnResolveUpdate( |
| 123 ServiceResolver::STATUS_SUCCESS); | 123 ServiceResolver::STATUS_SUCCESS); |
| 124 | 124 |
| 125 base::MessageLoop::current()->RunUntilIdle(); | 125 base::MessageLoop::current()->RunUntilIdle(); |
| 126 | 126 |
| 127 EXPECT_EQ(1, num_resolves_); | 127 EXPECT_EQ(1, num_resolves_); |
| 128 EXPECT_EQ(2u, last_service_description_.metadata.size()); | 128 EXPECT_EQ(2u, last_service_description_.metadata.size()); |
| 129 } | 129 } |
| 130 | 130 |
| 131 } // namespace local_discovery | 131 } // namespace local_discovery |
| OLD | NEW |