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

Side by Side Diff: chrome/common/net/url_fixer_upper_unittest.cc

Issue 220253002: Add net/base/filename_util.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/net/url_fixer_upper.cc ('k') | chrome/test/base/ui_test_utils.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/path_service.h" 9 #include "base/path_service.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "chrome/common/chrome_paths.h" 12 #include "chrome/common/chrome_paths.h"
13 #include "chrome/common/net/url_fixer_upper.h" 13 #include "chrome/common/net/url_fixer_upper.h"
14 #include "net/base/net_util.h" 14 #include "net/base/filename_util.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "url/gurl.h" 16 #include "url/gurl.h"
17 #include "url/url_parse.h" 17 #include "url/url_parse.h"
18 18
19 namespace { 19 namespace {
20 class URLFixerUpperTest : public testing::Test { 20 class URLFixerUpperTest : public testing::Test {
21 }; 21 };
22 }; 22 };
23 23
24 namespace url_parse { 24 namespace url_parse {
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 EXPECT_TRUE(base::DeleteFile(full_path, false)); 530 EXPECT_TRUE(base::DeleteFile(full_path, false));
531 EXPECT_TRUE(base::DeleteFile(new_dir, true)); 531 EXPECT_TRUE(base::DeleteFile(new_dir, true));
532 532
533 // Test that an obvious HTTP URL isn't accidentally treated as an absolute 533 // Test that an obvious HTTP URL isn't accidentally treated as an absolute
534 // file path (on account of system-specific craziness). 534 // file path (on account of system-specific craziness).
535 base::FilePath empty_path; 535 base::FilePath empty_path;
536 base::FilePath http_url_path(FILE_PATH_LITERAL("http://../")); 536 base::FilePath http_url_path(FILE_PATH_LITERAL("http://../"));
537 EXPECT_TRUE(URLFixerUpper::FixupRelativeFile( 537 EXPECT_TRUE(URLFixerUpper::FixupRelativeFile(
538 empty_path, http_url_path).SchemeIs("http")); 538 empty_path, http_url_path).SchemeIs("http"));
539 } 539 }
OLDNEW
« no previous file with comments | « chrome/common/net/url_fixer_upper.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698