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

Side by Side Diff: net/base/net_util_unittest.cc

Issue 18789: Bring in googleurl changes which fix URL parsing layout test. (Closed)
Patch Set: Created 11 years, 11 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
« no previous file with comments | « DEPS ('k') | webkit/tools/layout_tests/test_lists/tests_fixable.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "net/base/net_util.h" 10 #include "net/base/net_util.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 {L"\\\\foo\\bar.txt", L"file:////foo\\bar.txt"}, 100 {L"\\\\foo\\bar.txt", L"file:////foo\\bar.txt"},
101 {L"\\\\foo\\bar.txt", L"file:/foo/bar.txt"}, 101 {L"\\\\foo\\bar.txt", L"file:/foo/bar.txt"},
102 {L"\\\\foo\\bar.txt", L"file://foo\\bar.txt"}, 102 {L"\\\\foo\\bar.txt", L"file://foo\\bar.txt"},
103 {L"C:\\foo\\bar.txt", L"file:\\\\\\c:/foo/bar.txt"}, 103 {L"C:\\foo\\bar.txt", L"file:\\\\\\c:/foo/bar.txt"},
104 #elif defined(OS_POSIX) 104 #elif defined(OS_POSIX)
105 {L"/c:/foo/bar.txt", L"file:/c:/foo/bar.txt"}, 105 {L"/c:/foo/bar.txt", L"file:/c:/foo/bar.txt"},
106 {L"/c:/foo/bar.txt", L"file:///c:/foo/bar.txt"}, 106 {L"/c:/foo/bar.txt", L"file:///c:/foo/bar.txt"},
107 {L"/foo/bar.txt", L"file:/foo/bar.txt"}, 107 {L"/foo/bar.txt", L"file:/foo/bar.txt"},
108 {L"/c:/foo/bar.txt", L"file:\\\\\\c:/foo/bar.txt"}, 108 {L"/c:/foo/bar.txt", L"file:\\\\\\c:/foo/bar.txt"},
109 {L"/foo/bar.txt", L"file:foo/bar.txt"}, 109 {L"/foo/bar.txt", L"file:foo/bar.txt"},
110 {L"/foo/bar.txt", L"file://foo/bar.txt"}, 110 {L"/bar.txt", L"file://foo/bar.txt"},
111 {L"/foo/bar.txt", L"file:///foo/bar.txt"}, 111 {L"/foo/bar.txt", L"file:///foo/bar.txt"},
112 {L"/foo/bar.txt", L"file:////foo/bar.txt"}, 112 {L"/foo/bar.txt", L"file:////foo/bar.txt"},
113 {L"/foo/bar.txt", L"file:////foo//bar.txt"}, 113 {L"/foo/bar.txt", L"file:////foo//bar.txt"},
114 {L"/foo/bar.txt", L"file:////foo///bar.txt"}, 114 {L"/foo/bar.txt", L"file:////foo///bar.txt"},
115 {L"/foo/bar.txt", L"file:////foo////bar.txt"}, 115 {L"/foo/bar.txt", L"file:////foo////bar.txt"},
116 {L"/c:/foo/bar.txt", L"file:\\\\\\c:/foo/bar.txt"}, 116 {L"/c:/foo/bar.txt", L"file:\\\\\\c:/foo/bar.txt"},
117 {L"/c:/foo/bar.txt", L"file:c:/foo/bar.txt"}, 117 {L"/c:/foo/bar.txt", L"file:c:/foo/bar.txt"},
118 // We get these wrong because GURL turns back slashes into forward 118 // We get these wrong because GURL turns back slashes into forward
119 // slashes. 119 // slashes.
120 //{L"/foo%5Cbar.txt", L"file://foo\\bar.txt"}, 120 //{L"/foo%5Cbar.txt", L"file://foo\\bar.txt"},
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) { 729 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) {
730 const std::string results = net::GetDirectoryListingEntry( 730 const std::string results = net::GetDirectoryListingEntry(
731 test_cases[i].name, 731 test_cases[i].name,
732 test_cases[i].is_dir, 732 test_cases[i].is_dir,
733 test_cases[i].filesize, 733 test_cases[i].filesize,
734 test_cases[i].time); 734 test_cases[i].time);
735 EXPECT_EQ(test_cases[i].expected, results); 735 EXPECT_EQ(test_cases[i].expected, results);
736 } 736 }
737 } 737 }
738 #endif 738 #endif
OLDNEW
« no previous file with comments | « DEPS ('k') | webkit/tools/layout_tests/test_lists/tests_fixable.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698