| OLD | NEW |
| 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 "chrome/browser/chromeos/drive/drive_system_service.h" | 5 #include "chrome/browser/chromeos/drive/drive_system_service.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "chrome/browser/chromeos/drive/drive_test_util.h" | 8 #include "chrome/browser/chromeos/drive/drive_test_util.h" |
| 9 #include "chrome/browser/chromeos/drive/mock_drive_file_system.h" | 9 #include "chrome/browser/chromeos/drive/mock_drive_file_system.h" |
| 10 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 10 #include "chrome/browser/google_apis/dummy_drive_service.h" | 11 #include "chrome/browser/google_apis/dummy_drive_service.h" |
| 11 #include "chrome/test/base/testing_profile.h" | 12 #include "chrome/test/base/testing_profile.h" |
| 12 #include "content/public/test/test_browser_thread.h" | 13 #include "content/public/test/test_browser_thread.h" |
| 13 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 16 |
| 16 namespace drive { | 17 namespace drive { |
| 17 | 18 |
| 18 class DriveSystemServiceTest : public testing::Test { | 19 class DriveSystemServiceTest : public testing::Test { |
| 19 public: | 20 public: |
| (...skipping 18 matching lines...) Expand all Loading... |
| 38 profile_.reset(); | 39 profile_.reset(); |
| 39 } | 40 } |
| 40 | 41 |
| 41 protected: | 42 protected: |
| 42 MessageLoopForUI message_loop_; | 43 MessageLoopForUI message_loop_; |
| 43 // The order of the test threads is important, do not change the order. | 44 // The order of the test threads is important, do not change the order. |
| 44 // See also content/browser/browser_thread_impl.cc. | 45 // See also content/browser/browser_thread_impl.cc. |
| 45 content::TestBrowserThread ui_thread_; | 46 content::TestBrowserThread ui_thread_; |
| 46 scoped_ptr<TestingProfile> profile_; | 47 scoped_ptr<TestingProfile> profile_; |
| 47 | 48 |
| 49 chromeos::ScopedTestCrosSettings test_cros_settings_; |
| 50 |
| 48 MockDriveFileSystem* file_system_; | 51 MockDriveFileSystem* file_system_; |
| 49 DriveSystemService* system_service_; | 52 DriveSystemService* system_service_; |
| 50 }; | 53 }; |
| 51 | 54 |
| 52 TEST_F(DriveSystemServiceTest, InitializeAndShutdown) { | 55 TEST_F(DriveSystemServiceTest, InitializeAndShutdown) { |
| 53 system_service_->Initialize(); | 56 system_service_->Initialize(); |
| 54 google_apis::test_util::RunBlockingPoolTask(); | 57 google_apis::test_util::RunBlockingPoolTask(); |
| 55 system_service_->Shutdown(); | 58 system_service_->Shutdown(); |
| 56 } | 59 } |
| 57 | 60 |
| 58 } // namespace drive | 61 } // namespace drive |
| OLD | NEW |