| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "content/public/browser/notification_types.h" | 24 #include "content/public/browser/notification_types.h" |
| 25 #include "content/test/test_browser_thread.h" | 25 #include "content/test/test_browser_thread.h" |
| 26 #include "testing/gmock/include/gmock/gmock.h" | 26 #include "testing/gmock/include/gmock/gmock.h" |
| 27 | 27 |
| 28 using base::WaitableEvent; | 28 using base::WaitableEvent; |
| 29 using browser_sync::AutofillDataTypeController; | 29 using browser_sync::AutofillDataTypeController; |
| 30 using browser_sync::ChangeProcessorMock; | 30 using browser_sync::ChangeProcessorMock; |
| 31 using browser_sync::DataTypeController; | 31 using browser_sync::DataTypeController; |
| 32 using browser_sync::ModelAssociatorMock; | 32 using browser_sync::ModelAssociatorMock; |
| 33 using browser_sync::StartCallback; | 33 using browser_sync::StartCallback; |
| 34 using content::BrowserThread; |
| 34 using testing::_; | 35 using testing::_; |
| 35 using testing::DoAll; | 36 using testing::DoAll; |
| 36 using testing::Invoke; | 37 using testing::Invoke; |
| 37 using testing::Return; | 38 using testing::Return; |
| 38 using testing::SetArgumentPointee; | 39 using testing::SetArgumentPointee; |
| 39 | 40 |
| 40 namespace { | 41 namespace { |
| 41 | 42 |
| 42 ACTION_P(WaitOnEvent, event) { | 43 ACTION_P(WaitOnEvent, event) { |
| 43 event->Wait(); | 44 event->Wait(); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 wait_for_db_thread_pause.Wait(); | 286 wait_for_db_thread_pause.Wait(); |
| 286 EXPECT_EQ(DataTypeController::ASSOCIATING, autofill_dtc_->state()); | 287 EXPECT_EQ(DataTypeController::ASSOCIATING, autofill_dtc_->state()); |
| 287 | 288 |
| 288 SetStopExpectations(); | 289 SetStopExpectations(); |
| 289 EXPECT_CALL(start_callback_, Run(DataTypeController::ABORTED, _)); | 290 EXPECT_CALL(start_callback_, Run(DataTypeController::ABORTED, _)); |
| 290 autofill_dtc_->Stop(); | 291 autofill_dtc_->Stop(); |
| 291 EXPECT_EQ(DataTypeController::NOT_RUNNING, autofill_dtc_->state()); | 292 EXPECT_EQ(DataTypeController::NOT_RUNNING, autofill_dtc_->state()); |
| 292 } | 293 } |
| 293 | 294 |
| 294 } // namespace | 295 } // namespace |
| OLD | NEW |