| 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 #include <stdint.h> | 6 #include <stdint.h> | 
| 7 | 7 | 
| 8 #include "base/bind.h" | 8 #include "base/bind.h" | 
| 9 #include "base/callback.h" | 9 #include "base/callback.h" | 
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" | 
| 11 #include "base/macros.h" | 11 #include "base/macros.h" | 
| 12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" | 
| 13 #include "chrome/browser/local_discovery/service_discovery_client.h" | 13 #include "chrome/browser/local_discovery/service_discovery_client.h" | 
| 14 #include "chrome/browser/local_discovery/service_discovery_client_mac.h" | 14 #include "chrome/browser/local_discovery/service_discovery_client_mac.h" | 
| 15 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 15 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" | 
| 16 #include "content/public/test/test_browser_thread_bundle.h" | 16 #include "content/public/test/test_browser_thread_bundle.h" | 
| 17 #include "net/base/ip_endpoint.h" | 17 #include "net/base/ip_endpoint.h" | 
| 18 #include "net/base/sockaddr_storage.h" | 18 #include "net/base/sockaddr_storage.h" | 
| 19 #include "testing/gtest_mac.h" | 19 #include "testing/gtest_mac.h" | 
| 20 | 20 | 
| 21 @interface TestNSNetService : NSNetService { | 21 @interface TestNSNetService : NSNetService { | 
| 22  @private | 22  @private | 
| 23   base::scoped_nsobject<NSData> data_; | 23   base::scoped_nsobject<NSData> data_; | 
| 24   base::scoped_nsobject<NSArray> addresses_; | 24   base::scoped_nsobject<NSArray> addresses_; | 
| 25 } | 25 } | 
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 242           base::Unretained(this), run_loop.QuitClosure())); | 242           base::Unretained(this), run_loop.QuitClosure())); | 
| 243   resolver->StartResolving(); | 243   resolver->StartResolving(); | 
| 244 | 244 | 
| 245   run_loop.Run(); | 245   run_loop.Run(); | 
| 246 | 246 | 
| 247   EXPECT_EQ(1, num_resolves_); | 247   EXPECT_EQ(1, num_resolves_); | 
| 248   EXPECT_EQ(ServiceResolver::STATUS_KNOWN_NONEXISTENT, last_status_); | 248   EXPECT_EQ(ServiceResolver::STATUS_KNOWN_NONEXISTENT, last_status_); | 
| 249 } | 249 } | 
| 250 | 250 | 
| 251 }  // namespace local_discovery | 251 }  // namespace local_discovery | 
| OLD | NEW | 
|---|