| 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 <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 mock_webapps_registry_.get(), | 250 mock_webapps_registry_.get(), |
| 251 blocking_task_runner_); | 251 blocking_task_runner_); |
| 252 | 252 |
| 253 mock_cache_observer_.reset(new StrictMock<MockGDataCacheObserver>); | 253 mock_cache_observer_.reset(new StrictMock<MockGDataCacheObserver>); |
| 254 cache_->AddObserver(mock_cache_observer_.get()); | 254 cache_->AddObserver(mock_cache_observer_.get()); |
| 255 | 255 |
| 256 mock_directory_observer_.reset(new StrictMock<MockDirectoryChangeObserver>); | 256 mock_directory_observer_.reset(new StrictMock<MockDirectoryChangeObserver>); |
| 257 file_system_->AddObserver(mock_directory_observer_.get()); | 257 file_system_->AddObserver(mock_directory_observer_.get()); |
| 258 | 258 |
| 259 file_system_->Initialize(); | 259 file_system_->Initialize(); |
| 260 cache_->RequestInitializeOnUIThread(); | 260 cache_->RequestInitializeOnUIThreadForTesting(); |
| 261 test_util::RunBlockingPoolTask(); | 261 test_util::RunBlockingPoolTask(); |
| 262 } | 262 } |
| 263 | 263 |
| 264 virtual void TearDown() OVERRIDE { | 264 virtual void TearDown() OVERRIDE { |
| 265 ASSERT_TRUE(file_system_); | 265 ASSERT_TRUE(file_system_); |
| 266 EXPECT_CALL(*mock_doc_service_, CancelAll()).Times(1); | 266 EXPECT_CALL(*mock_doc_service_, CancelAll()).Times(1); |
| 267 delete file_system_; | 267 delete file_system_; |
| 268 file_system_ = NULL; | 268 file_system_ = NULL; |
| 269 delete mock_doc_service_; | 269 delete mock_doc_service_; |
| 270 mock_doc_service_ = NULL; | 270 mock_doc_service_ = NULL; |
| (...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2617 | 2617 |
| 2618 // Try to close the same file twice. | 2618 // Try to close the same file twice. |
| 2619 file_system_->CloseFile(kFileInRoot, close_file_callback); | 2619 file_system_->CloseFile(kFileInRoot, close_file_callback); |
| 2620 message_loop_.Run(); | 2620 message_loop_.Run(); |
| 2621 | 2621 |
| 2622 // It must fail. | 2622 // It must fail. |
| 2623 EXPECT_EQ(GDATA_FILE_ERROR_NOT_FOUND, callback_helper_->last_error_); | 2623 EXPECT_EQ(GDATA_FILE_ERROR_NOT_FOUND, callback_helper_->last_error_); |
| 2624 } | 2624 } |
| 2625 | 2625 |
| 2626 } // namespace gdata | 2626 } // namespace gdata |
| OLD | NEW |