Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1347)

Side by Side Diff: chrome/browser/local_discovery/service_discovery_client_unittest.cc

Issue 1676023002: Make IPAddress::FromIPLiteral a member function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 405
406 base::MessageLoop::current()->RunUntilIdle(); 406 base::MessageLoop::current()->RunUntilIdle();
407 } 407 }
408 408
409 409
410 class ServiceResolverTest : public ServiceDiscoveryTest { 410 class ServiceResolverTest : public ServiceDiscoveryTest {
411 public: 411 public:
412 ServiceResolverTest() { 412 ServiceResolverTest() {
413 metadata_expected_.push_back("hello"); 413 metadata_expected_.push_back("hello");
414 address_expected_ = net::HostPortPair("myhello.local", 8888); 414 address_expected_ = net::HostPortPair("myhello.local", 8888);
415 EXPECT_TRUE( 415 EXPECT_TRUE(ip_address_expected_.AssignFromIPLiteral("1.2.3.4"));
416 net::IPAddress::FromIPLiteral("1.2.3.4", &ip_address_expected_));
417 } 416 }
418 417
419 ~ServiceResolverTest() { 418 ~ServiceResolverTest() {
420 } 419 }
421 420
422 void SetUp() { 421 void SetUp() {
423 resolver_ = service_discovery_client_.CreateServiceResolver( 422 resolver_ = service_discovery_client_.CreateServiceResolver(
424 "hello._privet._tcp.local", 423 "hello._privet._tcp.local",
425 base::Bind(&ServiceResolverTest::OnFinishedResolving, 424 base::Bind(&ServiceResolverTest::OnFinishedResolving,
426 base::Unretained(this))); 425 base::Unretained(this)));
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 ServiceResolver::STATUS_REQUEST_TIMEOUT, _, _, _)); 507 ServiceResolver::STATUS_REQUEST_TIMEOUT, _, _, _));
509 508
510 // TODO(noamsml): When NSEC record support is added, change this to use an 509 // TODO(noamsml): When NSEC record support is added, change this to use an
511 // NSEC record. 510 // NSEC record.
512 RunFor(base::TimeDelta::FromSeconds(4)); 511 RunFor(base::TimeDelta::FromSeconds(4));
513 } 512 }
514 513
515 } // namespace 514 } // namespace
516 515
517 } // namespace local_discovery 516 } // namespace local_discovery
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698