OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 9 #include <algorithm> |
10 | 10 |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/format_macros.h" | 12 #include "base/format_macros.h" |
13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
16 #include "base/strings/sys_string_conversions.h" | 16 #include "base/strings/sys_string_conversions.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "base/sys_byteorder.h" | 18 #include "base/sys_byteorder.h" |
19 #include "base/test/test_file_util.h" | 19 #include "base/test/test_file_util.h" |
20 #include "base/time.h" | 20 #include "base/time/time.h" |
21 #include "googleurl/src/gurl.h" | 21 #include "googleurl/src/gurl.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
24 namespace net { | 24 namespace net { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 static const size_t kNpos = base::string16::npos; | 28 static const size_t kNpos = base::string16::npos; |
29 | 29 |
30 struct FileCase { | 30 struct FileCase { |
(...skipping 3464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3495 kUnsafePortableBasenames[i]))) << kUnsafePortableBasenames[i]; | 3495 kUnsafePortableBasenames[i]))) << kUnsafePortableBasenames[i]; |
3496 if (!base::FilePath::StringType(kUnsafePortableBasenames[i]).empty()) { | 3496 if (!base::FilePath::StringType(kUnsafePortableBasenames[i]).empty()) { |
3497 EXPECT_FALSE(IsSafePortableRelativePath(safe_dirname.Append( | 3497 EXPECT_FALSE(IsSafePortableRelativePath(safe_dirname.Append( |
3498 base::FilePath(kUnsafePortableBasenames[i])))) | 3498 base::FilePath(kUnsafePortableBasenames[i])))) |
3499 << kUnsafePortableBasenames[i]; | 3499 << kUnsafePortableBasenames[i]; |
3500 } | 3500 } |
3501 } | 3501 } |
3502 } | 3502 } |
3503 | 3503 |
3504 } // namespace net | 3504 } // namespace net |
OLD | NEW |