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

Side by Side Diff: net/base/file_stream_unittest.cc

Issue 11440008: Add SHARED_DELETE flag to FileStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/base/file_stream.h" 5 #include "net/base/file_stream.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 26 matching lines...) Expand all
37 37
38 class FileStreamTest : public PlatformTest { 38 class FileStreamTest : public PlatformTest {
39 public: 39 public:
40 virtual void SetUp() { 40 virtual void SetUp() {
41 PlatformTest::SetUp(); 41 PlatformTest::SetUp();
42 42
43 file_util::CreateTemporaryFile(&temp_file_path_); 43 file_util::CreateTemporaryFile(&temp_file_path_);
44 file_util::WriteFile(temp_file_path_, kTestData, kTestDataSize); 44 file_util::WriteFile(temp_file_path_, kTestData, kTestDataSize);
45 } 45 }
46 virtual void TearDown() { 46 virtual void TearDown() {
47 file_util::Delete(temp_file_path_, false); 47 EXPECT_TRUE(file_util::Delete(temp_file_path_, false));
48 48
49 PlatformTest::TearDown(); 49 PlatformTest::TearDown();
50 } 50 }
51 51
52 const FilePath temp_file_path() const { return temp_file_path_; } 52 const FilePath temp_file_path() const { return temp_file_path_; }
53 53
54 private: 54 private:
55 FilePath temp_file_path_; 55 FilePath temp_file_path_;
56 }; 56 };
57 57
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 // complete. Should be safe. 1027 // complete. Should be safe.
1028 stream.reset(); 1028 stream.reset();
1029 // open_callback won't be called. 1029 // open_callback won't be called.
1030 MessageLoop::current()->RunUntilIdle(); 1030 MessageLoop::current()->RunUntilIdle();
1031 EXPECT_FALSE(open_callback.have_result()); 1031 EXPECT_FALSE(open_callback.have_result());
1032 } 1032 }
1033 1033
1034 } // namespace 1034 } // namespace
1035 1035
1036 } // namespace net 1036 } // namespace net
OLDNEW
« net/base/file_stream_context.cc ('K') | « net/base/file_stream_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698