| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/sync/sessions/sessions_sync_manager.h" | 5 #include "chrome/browser/sync/sessions/sessions_sync_manager.h" |
| 6 | 6 |
| 7 #include "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/browser/sessions/session_id.h" | 9 #include "chrome/browser/sessions/session_id.h" |
| 10 #include "chrome/browser/sessions/session_tab_helper.h" | 10 #include "chrome/browser/sessions/session_tab_helper.h" |
| 11 #include "chrome/browser/sessions/session_types.h" | 11 #include "chrome/browser/sessions/session_types.h" |
| 12 #include "chrome/browser/sync/glue/device_info.h" | 12 #include "chrome/browser/sync/glue/device_info.h" |
| 13 #include "chrome/browser/sync/glue/local_device_info_provider_mock.h" | 13 #include "chrome/browser/sync/glue/local_device_info_provider_mock.h" |
| 14 #include "chrome/browser/sync/glue/session_sync_test_helper.h" | 14 #include "chrome/browser/sync/glue/session_sync_test_helper.h" |
| 15 #include "chrome/browser/sync/glue/synced_tab_delegate.h" | 15 #include "chrome/browser/sync/glue/synced_tab_delegate.h" |
| 16 #include "chrome/browser/sync/glue/synced_window_delegate.h" | 16 #include "chrome/browser/sync/glue/synced_window_delegate.h" |
| 17 #include "chrome/browser/sync/sessions/notification_service_sessions_router.h" | 17 #include "chrome/browser/sync/sessions/notification_service_sessions_router.h" |
| 18 #include "chrome/browser/sync/sessions/sessions_util.h" | 18 #include "chrome/browser/sync/sessions/sessions_util.h" |
| 19 #include "chrome/browser/sync/sessions/synced_window_delegates_getter.h" | 19 #include "chrome/browser/sync/sessions/synced_window_delegates_getter.h" |
| 20 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" | 20 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
| 21 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 21 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 22 #include "chrome/test/base/browser_with_test_window_test.h" | 22 #include "chrome/test/base/browser_with_test_window_test.h" |
| 23 #include "components/sessions/serialized_navigation_entry_test_helper.h" | 23 #include "components/sessions/serialized_navigation_entry_test_helper.h" |
| 24 #include "content/public/browser/navigation_entry.h" | 24 #include "content/public/browser/navigation_entry.h" |
| 25 #include "content/public/browser/notification_details.h" | 25 #include "content/public/browser/notification_details.h" |
| 26 #include "content/public/browser/notification_service.h" | 26 #include "content/public/browser/notification_service.h" |
| 27 #include "content/public/browser/notification_source.h" | 27 #include "content/public/browser/notification_source.h" |
| 28 #include "content/public/browser/web_contents.h" | 28 #include "content/public/browser/web_contents.h" |
| 29 #include "sync/api/attachments/attachment_id.h" | 29 #include "sync/api/attachments/attachment_id.h" |
| 30 #include "sync/api/attachments/attachment_service_proxy_for_test.h" | |
| 31 #include "sync/api/sync_error_factory_mock.h" | 30 #include "sync/api/sync_error_factory_mock.h" |
| 31 #include "sync/internal_api/public/attachments/attachment_service_proxy_for_test
.h" |
| 32 #include "testing/gmock/include/gmock/gmock.h" | 32 #include "testing/gmock/include/gmock/gmock.h" |
| 33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
| 34 | 34 |
| 35 using content::WebContents; | 35 using content::WebContents; |
| 36 using sessions::SerializedNavigationEntry; | 36 using sessions::SerializedNavigationEntry; |
| 37 using sessions::SerializedNavigationEntryTestHelper; | 37 using sessions::SerializedNavigationEntryTestHelper; |
| 38 using syncer::SyncChange; | 38 using syncer::SyncChange; |
| 39 using syncer::SyncData; | 39 using syncer::SyncData; |
| 40 | 40 |
| 41 namespace browser_sync { | 41 namespace browser_sync { |
| (...skipping 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1815 ASSERT_FALSE(observer.notified_of_refresh()); | 1815 ASSERT_FALSE(observer.notified_of_refresh()); |
| 1816 InitWithNoSyncData(); | 1816 InitWithNoSyncData(); |
| 1817 AddTab(browser(), GURL("http://foo1")); | 1817 AddTab(browser(), GURL("http://foo1")); |
| 1818 EXPECT_FALSE(observer.notified_of_refresh()); | 1818 EXPECT_FALSE(observer.notified_of_refresh()); |
| 1819 NavigateAndCommitActiveTab(GURL("chrome://newtab/#open_tabs")); | 1819 NavigateAndCommitActiveTab(GURL("chrome://newtab/#open_tabs")); |
| 1820 EXPECT_TRUE(observer.notified_of_refresh()); | 1820 EXPECT_TRUE(observer.notified_of_refresh()); |
| 1821 } | 1821 } |
| 1822 #endif // defined(OS_ANDROID) || defined(OS_IOS) | 1822 #endif // defined(OS_ANDROID) || defined(OS_IOS) |
| 1823 | 1823 |
| 1824 } // namespace browser_sync | 1824 } // namespace browser_sync |
| OLD | NEW |