OLD | NEW |
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 "net/base/net_util.h" | 5 #include "net/base/net_util.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 } | 463 } |
464 | 464 |
465 // This is currently a windows specific function. | 465 // This is currently a windows specific function. |
466 #if defined(OS_WIN) | 466 #if defined(OS_WIN) |
467 namespace { | 467 namespace { |
468 | 468 |
469 struct GetDirectoryListingEntryCase { | 469 struct GetDirectoryListingEntryCase { |
470 const wchar_t* name; | 470 const wchar_t* name; |
471 const char* const raw_bytes; | 471 const char* const raw_bytes; |
472 bool is_dir; | 472 bool is_dir; |
473 int64 filesize; | 473 int64_t filesize; |
474 base::Time time; | 474 base::Time time; |
475 const char* const expected; | 475 const char* const expected; |
476 }; | 476 }; |
477 | 477 |
478 } // namespace | 478 } // namespace |
479 | 479 |
480 TEST(NetUtilTest, GetDirectoryListingEntry) { | 480 TEST(NetUtilTest, GetDirectoryListingEntry) { |
481 const GetDirectoryListingEntryCase test_cases[] = { | 481 const GetDirectoryListingEntryCase test_cases[] = { |
482 {L"Foo", | 482 {L"Foo", |
483 "", | 483 "", |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 | 1075 |
1076 const size_t omit_all_offsets[] = { | 1076 const size_t omit_all_offsets[] = { |
1077 0, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos, 0, kNpos, kNpos, kNpos, kNpos, | 1077 0, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos, 0, kNpos, kNpos, kNpos, kNpos, |
1078 0, 1, 2, 3, 4, 5, 6, 7 | 1078 0, 1, 2, 3, 4, 5, 6, 7 |
1079 }; | 1079 }; |
1080 CheckAdjustedOffsets("http://user@foo.com/", "en", kFormatUrlOmitAll, | 1080 CheckAdjustedOffsets("http://user@foo.com/", "en", kFormatUrlOmitAll, |
1081 UnescapeRule::NORMAL, omit_all_offsets); | 1081 UnescapeRule::NORMAL, omit_all_offsets); |
1082 } | 1082 } |
1083 | 1083 |
1084 } // namespace net | 1084 } // namespace net |
OLD | NEW |