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 <map> | 5 #include <map> |
6 #include <string> | 6 #include <string> |
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 "base/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 200 |
201 // Check that we can get the correct session specifics back from the node. | 201 // Check that we can get the correct session specifics back from the node. |
202 sync_api::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); | 202 sync_api::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); |
203 sync_api::ReadNode node(&trans); | 203 sync_api::ReadNode node(&trans); |
204 ASSERT_TRUE(node.InitByClientTagLookup(syncable::SESSIONS, | 204 ASSERT_TRUE(node.InitByClientTagLookup(syncable::SESSIONS, |
205 machine_tag)); | 205 machine_tag)); |
206 const sync_pb::SessionSpecifics& specifics(node.GetSessionSpecifics()); | 206 const sync_pb::SessionSpecifics& specifics(node.GetSessionSpecifics()); |
207 ASSERT_EQ(machine_tag, specifics.session_tag()); | 207 ASSERT_EQ(machine_tag, specifics.session_tag()); |
208 ASSERT_TRUE(specifics.has_header()); | 208 ASSERT_TRUE(specifics.has_header()); |
209 const sync_pb::SessionHeader& header_s = specifics.header(); | 209 const sync_pb::SessionHeader& header_s = specifics.header(); |
| 210 ASSERT_TRUE(header_s.has_device_type()); |
| 211 ASSERT_EQ("TestSessionName", header_s.client_name()); |
210 ASSERT_EQ(0, header_s.window_size()); | 212 ASSERT_EQ(0, header_s.window_size()); |
211 } | 213 } |
212 | 214 |
213 // Test that we can fill this machine's session, write it to a node, | 215 // Test that we can fill this machine's session, write it to a node, |
214 // and then retrieve it. | 216 // and then retrieve it. |
215 // Experiencing random crashes on windows. http://crbug.com/81104. | 217 // Experiencing random crashes on windows. http://crbug.com/81104. |
216 #if defined(OS_WIN) | 218 #if defined(OS_WIN) |
217 #define MAYBE_WriteFilledSessionToNode DISABLED_WriteFilledSessionToNode | 219 #define MAYBE_WriteFilledSessionToNode DISABLED_WriteFilledSessionToNode |
218 #else | 220 #else |
219 #define MAYBE_WriteFilledSessionToNode WriteFilledSessionToNode | 221 #define MAYBE_WriteFilledSessionToNode WriteFilledSessionToNode |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 ASSERT_FALSE(model_associator_->tab_pool_.full()); | 449 ASSERT_FALSE(model_associator_->tab_pool_.full()); |
448 for (size_t i = 0; i < num_ids; ++i) { | 450 for (size_t i = 0; i < num_ids; ++i) { |
449 model_associator_->tab_pool_.FreeTabNode(node_ids[i]); | 451 model_associator_->tab_pool_.FreeTabNode(node_ids[i]); |
450 } | 452 } |
451 ASSERT_EQ(num_ids, model_associator_->tab_pool_.capacity()); | 453 ASSERT_EQ(num_ids, model_associator_->tab_pool_.capacity()); |
452 ASSERT_FALSE(model_associator_->tab_pool_.empty()); | 454 ASSERT_FALSE(model_associator_->tab_pool_.empty()); |
453 ASSERT_TRUE(model_associator_->tab_pool_.full()); | 455 ASSERT_TRUE(model_associator_->tab_pool_.full()); |
454 } | 456 } |
455 | 457 |
456 } // namespace browser_sync | 458 } // namespace browser_sync |
OLD | NEW |