| 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 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/mac/scoped_nsobject.h" | 9 #include "base/mac/scoped_nsobject.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 resolver_impl->GetContainerForTesting()->SetServiceForTesting(test_service); | 140 resolver_impl->GetContainerForTesting()->SetServiceForTesting(test_service); |
| 141 resolver->StartResolving(); | 141 resolver->StartResolving(); |
| 142 | 142 |
| 143 resolver_impl->GetContainerForTesting()->OnResolveUpdate( | 143 resolver_impl->GetContainerForTesting()->OnResolveUpdate( |
| 144 ServiceResolver::STATUS_SUCCESS); | 144 ServiceResolver::STATUS_SUCCESS); |
| 145 | 145 |
| 146 base::MessageLoop::current()->RunUntilIdle(); | 146 base::MessageLoop::current()->RunUntilIdle(); |
| 147 | 147 |
| 148 EXPECT_EQ(1, num_resolves_); | 148 EXPECT_EQ(1, num_resolves_); |
| 149 EXPECT_EQ(2u, last_service_description_.metadata.size()); | 149 EXPECT_EQ(2u, last_service_description_.metadata.size()); |
| 150 EXPECT_EQ(ip_address, last_service_description_.ip_address); |
| 151 EXPECT_EQ(kPort, last_service_description_.address.port()); |
| 150 EXPECT_EQ(kIp, last_service_description_.address.host()); | 152 EXPECT_EQ(kIp, last_service_description_.address.host()); |
| 151 EXPECT_EQ(kPort, last_service_description_.address.port()); | |
| 152 } | 153 } |
| 153 | 154 |
| 154 } // namespace local_discovery | 155 } // namespace local_discovery |
| OLD | NEW |