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

Side by Side Diff: chrome/browser/chromeos/drive/drive_file_stream_reader_unittest.cc

Issue 18419004: Remove destruction-only TearDown() methods in Drive related test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix Created 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/chromeos/drive/drive_file_stream_reader.h" 5 #include "chrome/browser/chromeos/drive/drive_file_stream_reader.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 virtual void SetUp() OVERRIDE { 45 virtual void SetUp() OVERRIDE {
46 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 46 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
47 ASSERT_TRUE(google_apis::test_util::CreateFileOfSpecifiedSize( 47 ASSERT_TRUE(google_apis::test_util::CreateFileOfSpecifiedSize(
48 temp_dir_.path(), 1024, &file_path_, &file_content_)); 48 temp_dir_.path(), 1024, &file_path_, &file_content_));
49 49
50 worker_thread_.reset(new base::Thread("ReaderProxyTest")); 50 worker_thread_.reset(new base::Thread("ReaderProxyTest"));
51 ASSERT_TRUE(worker_thread_->Start()); 51 ASSERT_TRUE(worker_thread_->Start());
52 } 52 }
53 53
54 virtual void TearDown() OVERRIDE {
55 worker_thread_.reset();
56 }
57
58 content::TestBrowserThreadBundle thread_bundle_; 54 content::TestBrowserThreadBundle thread_bundle_;
59 55
60 base::ScopedTempDir temp_dir_; 56 base::ScopedTempDir temp_dir_;
61 base::FilePath file_path_; 57 base::FilePath file_path_;
62 std::string file_content_; 58 std::string file_content_;
63 59
64 scoped_ptr<base::Thread> worker_thread_; 60 scoped_ptr<base::Thread> worker_thread_;
65 }; 61 };
66 62
67 TEST_F(LocalReaderProxyTest, Read) { 63 TEST_F(LocalReaderProxyTest, Read) {
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 google_apis::test_util::CreateQuitCallback( 489 google_apis::test_util::CreateQuitCallback(
494 &run_loop, 490 &run_loop,
495 google_apis::test_util::CreateCopyResultCallback(&error, &entry))); 491 google_apis::test_util::CreateCopyResultCallback(&error, &entry)));
496 run_loop.Run(); 492 run_loop.Run();
497 } 493 }
498 EXPECT_EQ(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE, error); 494 EXPECT_EQ(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE, error);
499 EXPECT_FALSE(entry); 495 EXPECT_FALSE(entry);
500 } 496 }
501 497
502 } // namespace drive 498 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698