| 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/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "chrome/browser/sessions/session_types.h" | 10 #include "chrome/browser/sessions/session_types.h" |
| 11 #include "chrome/browser/sync/glue/session_model_associator.h" | 11 #include "chrome/browser/sync/glue/session_model_associator.h" |
| 12 #include "chrome/browser/sync/glue/synced_tab_delegate.h" | 12 #include "chrome/browser/sync/glue/synced_tab_delegate.h" |
| 13 #include "chrome/browser/sync/protocol/session_specifics.pb.h" | |
| 14 #include "chrome/browser/sync/profile_sync_service_mock.h" | 13 #include "chrome/browser/sync/profile_sync_service_mock.h" |
| 15 #include "chrome/common/chrome_notification_types.h" | 14 #include "chrome/common/chrome_notification_types.h" |
| 16 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
| 17 #include "chrome/test/base/profile_mock.h" | 16 #include "chrome/test/base/profile_mock.h" |
| 18 #include "content/public/browser/navigation_entry.h" | 17 #include "content/public/browser/navigation_entry.h" |
| 18 #include "content/public/browser/navigation_entry.h" |
| 19 #include "content/public/browser/notification_details.h" |
| 19 #include "content/public/browser/notification_service.h" | 20 #include "content/public/browser/notification_service.h" |
| 20 #include "content/public/browser/notification_details.h" | |
| 21 #include "content/public/browser/navigation_entry.h" | |
| 22 #include "content/public/common/page_transition_types.h" | 21 #include "content/public/common/page_transition_types.h" |
| 23 #include "content/test/test_browser_thread.h" | 22 #include "content/test/test_browser_thread.h" |
| 23 #include "sync/protocol/session_specifics.pb.h" |
| 24 #include "testing/gmock/include/gmock/gmock.h" | 24 #include "testing/gmock/include/gmock/gmock.h" |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
| 26 | 26 |
| 27 using content::BrowserThread; | 27 using content::BrowserThread; |
| 28 using testing::NiceMock; | 28 using testing::NiceMock; |
| 29 using testing::Return; | 29 using testing::Return; |
| 30 | 30 |
| 31 namespace browser_sync { | 31 namespace browser_sync { |
| 32 | 32 |
| 33 class SyncSessionModelAssociatorTest : public testing::Test { | 33 class SyncSessionModelAssociatorTest : public testing::Test { |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 EXPECT_CALL(tab_mock, GetEntryAtIndex(1)).WillRepeatedly( | 315 EXPECT_CALL(tab_mock, GetEntryAtIndex(1)).WillRepeatedly( |
| 316 Return(entry2.get())); | 316 Return(entry2.get())); |
| 317 EXPECT_CALL(tab_mock, GetEntryAtIndex(2)).WillRepeatedly( | 317 EXPECT_CALL(tab_mock, GetEntryAtIndex(2)).WillRepeatedly( |
| 318 Return(entry3.get())); | 318 Return(entry3.get())); |
| 319 EXPECT_CALL(tab_mock, GetEntryCount()).WillRepeatedly(Return(3)); | 319 EXPECT_CALL(tab_mock, GetEntryCount()).WillRepeatedly(Return(3)); |
| 320 EXPECT_CALL(tab_mock, GetPendingEntryIndex()).WillRepeatedly(Return(-1)); | 320 EXPECT_CALL(tab_mock, GetPendingEntryIndex()).WillRepeatedly(Return(-1)); |
| 321 EXPECT_TRUE(model_associator_->ShouldSyncTab(tab_mock)); | 321 EXPECT_TRUE(model_associator_->ShouldSyncTab(tab_mock)); |
| 322 } | 322 } |
| 323 | 323 |
| 324 } // namespace browser_sync | 324 } // namespace browser_sync |
| OLD | NEW |