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

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

Issue 13052: Cleanup: move base/platform_test.h -> testing/ (Closed)
Patch Set: fix mark's comment Created 12 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
« no previous file with comments | « net/base/bzip2_filter_unittest.cc ('k') | net/base/gzip_filter_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/platform_test.h"
8 #include "net/base/file_stream.h" 7 #include "net/base/file_stream.h"
9 #include "net/base/net_errors.h" 8 #include "net/base/net_errors.h"
10 #include "net/base/test_completion_callback.h" 9 #include "net/base/test_completion_callback.h"
11 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "testing/platform_test.h"
12 12
13 static const char kTestData[] = "0123456789"; 13 static const char kTestData[] = "0123456789";
14 static const int kTestDataSize = arraysize(kTestData) - 1; 14 static const int kTestDataSize = arraysize(kTestData) - 1;
15 15
16 class FileStreamTest : public PlatformTest { 16 class FileStreamTest : public PlatformTest {
17 public: 17 public:
18 virtual void SetUp() { 18 virtual void SetUp() {
19 PlatformTest::SetUp(); 19 PlatformTest::SetUp();
20 20
21 file_util::CreateTemporaryFileName(&temp_file_path_); 21 file_util::CreateTemporaryFileName(&temp_file_path_);
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 rv = stream.Write(kTestData, kTestDataSize, NULL); 360 rv = stream.Write(kTestData, kTestDataSize, NULL);
361 EXPECT_EQ(kTestDataSize, rv); 361 EXPECT_EQ(kTestDataSize, rv);
362 stream.Close(); 362 stream.Close();
363 363
364 ok = file_util::GetFileSize(temp_file_path(), &file_size); 364 ok = file_util::GetFileSize(temp_file_path(), &file_size);
365 EXPECT_TRUE(ok); 365 EXPECT_TRUE(ok);
366 EXPECT_EQ(kTestDataSize * 2, file_size); 366 EXPECT_EQ(kTestDataSize * 2, file_size);
367 } 367 }
368 368
369 // TODO(erikkay): more READ_WRITE tests? 369 // TODO(erikkay): more READ_WRITE tests?
OLDNEW
« no previous file with comments | « net/base/bzip2_filter_unittest.cc ('k') | net/base/gzip_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698