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

Unified Diff: chrome/browser/net/url_fixer_upper_unittest.cc

Issue 7572046: Be a little more careful whether something is an URL or a file path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/net/url_fixer_upper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/url_fixer_upper_unittest.cc
===================================================================
--- chrome/browser/net/url_fixer_upper_unittest.cc (revision 95185)
+++ chrome/browser/net/url_fixer_upper_unittest.cc (working copy)
@@ -516,4 +516,11 @@
// done with the subdir
EXPECT_TRUE(file_util::Delete(full_path, false));
EXPECT_TRUE(file_util::Delete(new_dir, true));
+
+ // Test that an obvious HTTP URL isn't accidentally treated as an absolute
+ // file path (on account of system-specific craziness).
+ FilePath empty_path;
+ FilePath http_url_path(FILE_PATH_LITERAL("http://../"));
+ EXPECT_TRUE(URLFixerUpper::FixupRelativeFile(
+ empty_path, http_url_path).SchemeIs("http"));
}
« no previous file with comments | « chrome/browser/net/url_fixer_upper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698