| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "net/dns/record_rdata.h" |
| 6 |
| 5 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 6 #include "net/base/net_util.h" | 8 #include "net/base/ip_address_number.h" |
| 7 #include "net/dns/dns_response.h" | 9 #include "net/dns/dns_response.h" |
| 8 #include "net/dns/record_rdata.h" | |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 11 |
| 11 namespace net { | 12 namespace net { |
| 12 | 13 |
| 13 base::StringPiece MakeStringPiece(const uint8* data, unsigned size) { | 14 base::StringPiece MakeStringPiece(const uint8* data, unsigned size) { |
| 14 const char* data_cc = reinterpret_cast<const char*>(data); | 15 const char* data_cc = reinterpret_cast<const char*>(data); |
| 15 return base::StringPiece(data_cc, size); | 16 return base::StringPiece(data_cc, size); |
| 16 } | 17 } |
| 17 | 18 |
| 18 TEST(RecordRdataTest, ParseSrvRecord) { | 19 TEST(RecordRdataTest, ParseSrvRecord) { |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 for (int i = 2; i < 15; i++) { | 214 for (int i = 2; i < 15; i++) { |
| 214 EXPECT_FALSE(record_obj->GetBit(i)); | 215 EXPECT_FALSE(record_obj->GetBit(i)); |
| 215 } | 216 } |
| 216 EXPECT_TRUE(record_obj->GetBit(15)); | 217 EXPECT_TRUE(record_obj->GetBit(15)); |
| 217 | 218 |
| 218 ASSERT_TRUE(record_obj->IsEqual(record_obj.get())); | 219 ASSERT_TRUE(record_obj->IsEqual(record_obj.get())); |
| 219 } | 220 } |
| 220 | 221 |
| 221 | 222 |
| 222 } // namespace net | 223 } // namespace net |
| OLD | NEW |