| 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/ui/toolbar/recent_tabs_builder_test_helper.h" | 5 #include "chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.h" |
| 6 | 6 |
| 7 #include "base/rand_util.h" | 7 #include "base/rand_util.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "chrome/browser/sync/open_tabs_ui_delegate.h" | 11 #include "chrome/browser/sync/open_tabs_ui_delegate.h" |
| 12 #include "chrome/browser/sync/sessions/sessions_sync_manager.h" | 12 #include "chrome/browser/sync/sessions/sessions_sync_manager.h" |
| 13 #include "sync/api/attachments/attachment_id.h" | 13 #include "sync/api/attachments/attachment_id.h" |
| 14 #include "sync/api/attachments/attachment_service_proxy_for_test.h" | 14 #include "sync/internal_api/public/attachments/attachment_service_proxy_for_test
.h" |
| 15 #include "sync/protocol/session_specifics.pb.h" | 15 #include "sync/protocol/session_specifics.pb.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 const char kBaseSessionTag[] = "session_tag"; | 20 const char kBaseSessionTag[] = "session_tag"; |
| 21 const char kBaseSessionName[] = "session_name"; | 21 const char kBaseSessionName[] = "session_name"; |
| 22 const char kBaseTabUrl[] = "http://foo/?"; | 22 const char kBaseTabUrl[] = "http://foo/?"; |
| 23 const char kTabTitleFormat[] = "session=%d;window=%d;tab=%d"; | 23 const char kTabTitleFormat[] = "session=%d;window=%d;tab=%d"; |
| 24 | 24 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 tab->set_current_navigation_index(0); | 297 tab->set_current_navigation_index(0); |
| 298 tab->set_pinned(true); | 298 tab->set_pinned(true); |
| 299 tab->set_extension_app_id("app_id"); | 299 tab->set_extension_app_id("app_id"); |
| 300 sync_pb::TabNavigation* navigation = tab->add_navigation(); | 300 sync_pb::TabNavigation* navigation = tab->add_navigation(); |
| 301 navigation->set_virtual_url(ToTabUrl(session_id, window_id, tab_id)); | 301 navigation->set_virtual_url(ToTabUrl(session_id, window_id, tab_id)); |
| 302 navigation->set_referrer("referrer"); | 302 navigation->set_referrer("referrer"); |
| 303 navigation->set_title(base::UTF16ToUTF8(GetTabTitle( | 303 navigation->set_title(base::UTF16ToUTF8(GetTabTitle( |
| 304 session_index, window_index, tab_index))); | 304 session_index, window_index, tab_index))); |
| 305 navigation->set_page_transition(sync_pb::SyncEnums_PageTransition_TYPED); | 305 navigation->set_page_transition(sync_pb::SyncEnums_PageTransition_TYPED); |
| 306 } | 306 } |
| OLD | NEW |