summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-02 19:57:58 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-02 19:57:58 +0000
commitabb669e1c059feeaab8c72457562c6787c3c5328 (patch)
tree820a443140d9dadcda13e2091f6e0400f2695601
parent4d0f36e5227612dacc8e3d8b5c8e3ff44d0a5869 (diff)
downloadchromium_src-abb669e1c059feeaab8c72457562c6787c3c5328.zip
chromium_src-abb669e1c059feeaab8c72457562c6787c3c5328.tar.gz
chromium_src-abb669e1c059feeaab8c72457562c6787c3c5328.tar.bz2
Coverity: Check CreateNewTempDirectory return value.
CID=6021,6020,6019 TEST=none BUG=none Review URL: http://codereview.chromium.org/256033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27881 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/importer/firefox_profile_lock_unittest.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/importer/firefox_profile_lock_unittest.cc b/chrome/browser/importer/firefox_profile_lock_unittest.cc
index 1f365d0..3234062 100644
--- a/chrome/browser/importer/firefox_profile_lock_unittest.cc
+++ b/chrome/browser/importer/firefox_profile_lock_unittest.cc
@@ -46,7 +46,8 @@ TEST_F(FirefoxProfileLockTest, LockTest) {
// use.
TEST_F(FirefoxProfileLockTest, ProfileLock) {
std::wstring test_path;
- file_util::CreateNewTempDirectory(L"firefox_profile", &test_path);
+ ASSERT_TRUE(file_util::CreateNewTempDirectory(L"firefox_profile",
+ &test_path));
FilePath lock_file_path = FilePath::FromWStringHack(test_path);
FileAutoDeleter deleter(lock_file_path);
lock_file_path = lock_file_path.Append(FirefoxProfileLock::kLockFileName);
@@ -81,8 +82,8 @@ TEST_F(FirefoxProfileLockTest, ProfileLock) {
// should still be able to lock it, at least in the Windows implementation.
TEST_F(FirefoxProfileLockTest, ProfileLockOrphaned) {
FilePath test_path;
- file_util::CreateNewTempDirectory(FILE_PATH_LITERAL("firefox_profile"),
- &test_path);
+ ASSERT_TRUE(file_util::CreateNewTempDirectory(
+ FILE_PATH_LITERAL("firefox_profile"), &test_path));
FilePath lock_file_path = test_path;
FileAutoDeleter deleter(lock_file_path);
lock_file_path = lock_file_path.Append(FirefoxProfileLock::kLockFileName);
@@ -107,7 +108,8 @@ TEST_F(FirefoxProfileLockTest, ProfileLockOrphaned) {
// Tests two locks contending for the same lock file.
TEST_F(FirefoxProfileLockTest, ProfileLockContention) {
std::wstring test_path;
- file_util::CreateNewTempDirectory(L"firefox_profile", &test_path);
+ ASSERT_TRUE(file_util::CreateNewTempDirectory(L"firefox_profile",
+ &test_path));
FileAutoDeleter deleter(FilePath::FromWStringHack(test_path));
scoped_ptr<FirefoxProfileLock> lock1;