OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "components/sessions/core/session_types.h" | 5 #include "components/sessions/core/session_types.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "components/sessions/core/serialized_navigation_entry_test_helper.h" | 13 #include "components/sessions/core/serialized_navigation_entry_test_helper.h" |
14 #include "sync/protocol/session_specifics.pb.h" | 14 #include "components/sync/base/time.h" |
15 #include "sync/util/time.h" | 15 #include "components/sync/protocol/session_specifics.pb.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "ui/base/page_transition_types.h" | 17 #include "ui/base/page_transition_types.h" |
18 #include "url/gurl.h" | 18 #include "url/gurl.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 // Create a typical SessionTab protocol buffer and set an existing | 22 // Create a typical SessionTab protocol buffer and set an existing |
23 // SessionTab from it. The data from the protocol buffer should | 23 // SessionTab from it. The data from the protocol buffer should |
24 // clobber the existing data. | 24 // clobber the existing data. |
25 TEST(SessionTab, FromSyncData) { | 25 TEST(SessionTab, FromSyncData) { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 EXPECT_FALSE(sync_data.has_favicon()); | 113 EXPECT_FALSE(sync_data.has_favicon()); |
114 EXPECT_FALSE(sync_data.has_favicon_type()); | 114 EXPECT_FALSE(sync_data.has_favicon_type()); |
115 EXPECT_FALSE(sync_data.has_favicon_source()); | 115 EXPECT_FALSE(sync_data.has_favicon_source()); |
116 | 116 |
117 ASSERT_EQ(2, sync_data.variation_id_size()); | 117 ASSERT_EQ(2, sync_data.variation_id_size()); |
118 EXPECT_EQ(3312238u, sync_data.variation_id(0)); | 118 EXPECT_EQ(3312238u, sync_data.variation_id(0)); |
119 EXPECT_EQ(3312242u, sync_data.variation_id(1)); | 119 EXPECT_EQ(3312242u, sync_data.variation_id(1)); |
120 } | 120 } |
121 | 121 |
122 } // namespace | 122 } // namespace |
OLD | NEW |