Chromium Code Reviews| Index: chrome/browser/chromeos/drive/drive_sync_client_unittest.cc |
| diff --git a/chrome/browser/chromeos/drive/drive_sync_client_unittest.cc b/chrome/browser/chromeos/drive/drive_sync_client_unittest.cc |
| index d6b2c24fdff09ebc2c157314de2cf22d446ac2d4..0310df945092c5b7a11d2baac65231207f8193d0 100644 |
| --- a/chrome/browser/chromeos/drive/drive_sync_client_unittest.cc |
| +++ b/chrome/browser/chromeos/drive/drive_sync_client_unittest.cc |
| @@ -24,14 +24,10 @@ |
| #include "chrome/browser/google_apis/test_util.h" |
| #include "chrome/common/chrome_paths.h" |
|
hashimoto
2013/04/19 03:43:22
ditto.
kinaba
2013/04/19 03:51:44
Done.
|
| #include "chrome/common/pref_names.h" |
|
hashimoto
2013/04/19 03:43:22
ditto.
kinaba
2013/04/19 03:51:44
Done.
|
| -#include "chrome/test/base/testing_profile.h" |
| #include "content/public/test/test_browser_thread.h" |
| #include "testing/gmock/include/gmock/gmock.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| -using ::testing::AnyNumber; |
| -using ::testing::DoAll; |
| -using ::testing::Return; |
| using ::testing::StrictMock; |
| using ::testing::_; |
| @@ -56,25 +52,16 @@ ACTION_P2(MockUpdateFileByResourceId, error, md5) { |
| arg1.Run(error, base::FilePath(), entry_proto.Pass()); |
| } |
| -class MockNetworkChangeNotifier : public net::NetworkChangeNotifier { |
| - public: |
| - MOCK_CONST_METHOD0(GetCurrentConnectionType, |
| - net::NetworkChangeNotifier::ConnectionType()); |
| -}; |
| - |
| } // namespace |
| class DriveSyncClientTest : public testing::Test { |
| public: |
| DriveSyncClientTest() |
| : ui_thread_(content::BrowserThread::UI, &message_loop_), |
| - profile_(new TestingProfile), |
| mock_file_system_(new StrictMock<MockDriveFileSystem>) { |
| } |
| virtual void SetUp() OVERRIDE { |
| - mock_network_change_notifier_.reset(new MockNetworkChangeNotifier); |
| - |
| // Create a temporary directory. |
| ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| @@ -93,8 +80,7 @@ class DriveSyncClientTest : public testing::Test { |
| SetUpCache(); |
| // Initialize the sync client. |
| - sync_client_.reset(new DriveSyncClient(profile_.get(), |
| - mock_file_system_.get(), |
| + sync_client_.reset(new DriveSyncClient(mock_file_system_.get(), |
| cache_.get())); |
| EXPECT_CALL(*mock_file_system_, AddObserver(sync_client_.get())).Times(1); |
| @@ -111,7 +97,6 @@ class DriveSyncClientTest : public testing::Test { |
| // client registers itself as observer of NetworkLibrary. |
| sync_client_.reset(); |
| cache_.reset(); |
| - mock_network_change_notifier_.reset(); |
| } |
| // Sets up cache for tests. |
| @@ -244,11 +229,9 @@ class DriveSyncClientTest : public testing::Test { |
| MessageLoopForUI message_loop_; |
| content::TestBrowserThread ui_thread_; |
| base::ScopedTempDir temp_dir_; |
| - scoped_ptr<TestingProfile> profile_; |
| scoped_ptr<StrictMock<MockDriveFileSystem> > mock_file_system_; |
| scoped_ptr<DriveCache, test_util::DestroyHelperForTests> cache_; |
| scoped_ptr<DriveSyncClient> sync_client_; |
| - scoped_ptr<MockNetworkChangeNotifier> mock_network_change_notifier_; |
| }; |
| TEST_F(DriveSyncClientTest, StartInitialScan) { |