summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-10 18:56:18 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-10 18:56:18 +0000
commit13044cdc2b1e8fb304af65a7913c083f52c623bc (patch)
treeb072c74e8354714d2ed38b8493fd23aebe4b2bd7
parent0457c6bb559c2cebf47235388f0441be51817d60 (diff)
downloadchromium_src-13044cdc2b1e8fb304af65a7913c083f52c623bc.zip
chromium_src-13044cdc2b1e8fb304af65a7913c083f52c623bc.tar.gz
chromium_src-13044cdc2b1e8fb304af65a7913c083f52c623bc.tar.bz2
Make path absolute so URL Fixer Upper unittest does not fail if invoked using something like ../../out/Debug/unit_tests
BUG=none TEST=Run the unit_tests executable with a path containing a "/../". It should pass. Review URL: http://codereview.chromium.org/595005 Patch from Bernhard Bauer. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38641 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/net/url_fixer_upper_unittest.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/net/url_fixer_upper_unittest.cc b/chrome/browser/net/url_fixer_upper_unittest.cc
index 5028cb2..a9d77ed 100644
--- a/chrome/browser/net/url_fixer_upper_unittest.cc
+++ b/chrome/browser/net/url_fixer_upper_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -401,6 +401,7 @@ TEST(URLFixerUpperTest, FixupRelativeFile) {
FilePath file_part(FILE_PATH_LITERAL("url_fixer_upper_existing_file.txt"));
ASSERT_TRUE(PathService::Get(chrome::DIR_APP, &dir));
ASSERT_TRUE(MakeTempFile(dir, file_part, &full_path));
+ ASSERT_TRUE(file_util::AbsolutePath(&full_path));
// make sure we pass through good URLs
std::string fixedup;
@@ -437,6 +438,7 @@ TEST(URLFixerUpperTest, FixupRelativeFile) {
FilePath new_dir = dir.Append(sub_dir);
file_util::CreateDirectory(new_dir);
ASSERT_TRUE(MakeTempFile(new_dir, sub_file, &full_path));
+ ASSERT_TRUE(file_util::AbsolutePath(&full_path));
// test file in the subdir
FilePath relative_file = sub_dir.Append(sub_file);