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

Side by Side Diff: content/browser/download/base_file_unittest.cc

Issue 7373004: Move the save file code from chrome to content. This is just a file move so the DEPS in content\b... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/scoped_temp_dir.h" 7 #include "base/scoped_temp_dir.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "chrome/browser/download/base_file.h"
10 #include "content/browser/browser_thread.h" 9 #include "content/browser/browser_thread.h"
10 #include "content/browser/download/base_file.h"
11 #include "net/base/file_stream.h" 11 #include "net/base/file_stream.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace { 14 namespace {
15 15
16 const char kTestData1[] = "Let's write some data to the file!\n"; 16 const char kTestData1[] = "Let's write some data to the file!\n";
17 const char kTestData2[] = "Writing more data.\n"; 17 const char kTestData2[] = "Writing more data.\n";
18 const char kTestData3[] = "Final line."; 18 const char kTestData3[] = "Final line.";
19 19
20 class BaseFileTest : public testing::Test { 20 class BaseFileTest : public testing::Test {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 EXPECT_TRUE(base_file_->Rename(new_path)); 221 EXPECT_TRUE(base_file_->Rename(new_path));
222 EXPECT_FALSE(file_util::PathExists(initial_path)); 222 EXPECT_FALSE(file_util::PathExists(initial_path));
223 EXPECT_TRUE(file_util::PathExists(new_path)); 223 EXPECT_TRUE(file_util::PathExists(new_path));
224 224
225 AppendDataToFile(kTestData2); 225 AppendDataToFile(kTestData2);
226 226
227 base_file_->Finish(); 227 base_file_->Finish();
228 } 228 }
229 229
230 } // namespace 230 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698