OLD | NEW |
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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/logging.h" | |
10 #include "base/path_service.h" | 9 #include "base/path_service.h" |
11 #include "base/string_util.h" | 10 #include "base/string_util.h" |
12 #include "chrome/browser/net/url_fixer_upper.h" | 11 #include "chrome/browser/net/url_fixer_upper.h" |
13 #include "chrome/common/chrome_paths.h" | 12 #include "chrome/common/chrome_paths.h" |
14 #include "googleurl/src/url_parse.h" | 13 #include "googleurl/src/url_parse.h" |
15 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
16 #include "net/base/net_util.h" | 15 #include "net/base/net_util.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
18 | 17 |
19 namespace { | 18 namespace { |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 // (should resolve to the same file as above) | 363 // (should resolve to the same file as above) |
365 relative_file_str = sub_dir.value() + FILE_PATH_LITERAL("/../") + | 364 relative_file_str = sub_dir.value() + FILE_PATH_LITERAL("/../") + |
366 sub_dir.value() + FILE_PATH_LITERAL("///./") + sub_file.value(); | 365 sub_dir.value() + FILE_PATH_LITERAL("///./") + sub_file.value(); |
367 fixedup = URLFixerUpper::FixupRelativeFile(dir, FilePath(relative_file_str)); | 366 fixedup = URLFixerUpper::FixupRelativeFile(dir, FilePath(relative_file_str)); |
368 EXPECT_TRUE(IsMatchingFileURL(fixedup, full_path)); | 367 EXPECT_TRUE(IsMatchingFileURL(fixedup, full_path)); |
369 | 368 |
370 // done with the subdir | 369 // done with the subdir |
371 EXPECT_TRUE(file_util::Delete(full_path, false)); | 370 EXPECT_TRUE(file_util::Delete(full_path, false)); |
372 EXPECT_TRUE(file_util::Delete(new_dir, true)); | 371 EXPECT_TRUE(file_util::Delete(new_dir, true)); |
373 } | 372 } |
OLD | NEW |