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

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

Issue 7792102: Revert 99391 (broke CrOS unit_tests) - Set user-visible machine names and devices types for synce... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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());
212 ASSERT_EQ(0, header_s.window_size()); 210 ASSERT_EQ(0, header_s.window_size());
213 } 211 }
214 212
215 // Test that we can fill this machine's session, write it to a node, 213 // Test that we can fill this machine's session, write it to a node,
216 // and then retrieve it. 214 // and then retrieve it.
217 // Experiencing random crashes on windows. http://crbug.com/81104. 215 // Experiencing random crashes on windows. http://crbug.com/81104.
218 #if defined(OS_WIN) 216 #if defined(OS_WIN)
219 #define MAYBE_WriteFilledSessionToNode DISABLED_WriteFilledSessionToNode 217 #define MAYBE_WriteFilledSessionToNode DISABLED_WriteFilledSessionToNode
220 #else 218 #else
221 #define MAYBE_WriteFilledSessionToNode WriteFilledSessionToNode 219 #define MAYBE_WriteFilledSessionToNode WriteFilledSessionToNode
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 ASSERT_FALSE(model_associator_->tab_pool_.full()); 447 ASSERT_FALSE(model_associator_->tab_pool_.full());
450 for (size_t i = 0; i < num_ids; ++i) { 448 for (size_t i = 0; i < num_ids; ++i) {
451 model_associator_->tab_pool_.FreeTabNode(node_ids[i]); 449 model_associator_->tab_pool_.FreeTabNode(node_ids[i]);
452 } 450 }
453 ASSERT_EQ(num_ids, model_associator_->tab_pool_.capacity()); 451 ASSERT_EQ(num_ids, model_associator_->tab_pool_.capacity());
454 ASSERT_FALSE(model_associator_->tab_pool_.empty()); 452 ASSERT_FALSE(model_associator_->tab_pool_.empty());
455 ASSERT_TRUE(model_associator_->tab_pool_.full()); 453 ASSERT_TRUE(model_associator_->tab_pool_.full());
456 } 454 }
457 455
458 } // namespace browser_sync 456 } // 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