Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: chrome/browser/sync/profile_sync_service_session_unittest.cc

Issue 7740055: Set user-visible machine names and devices types for synced sessions. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix tests Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/synced_session_tracker.h ('k') | chrome/browser/ui/webui/sessions_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698