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

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

Issue 4158009: Session sync integration tests. Left out many client for now, since even... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
« no previous file with comments | « chrome/browser/sync/glue/session_model_associator.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 ASSERT_EQ(model_associator_->GetSyncIdFromChromeId(machine_tag), sync_id); 307 ASSERT_EQ(model_associator_->GetSyncIdFromChromeId(machine_tag), sync_id);
308 scoped_ptr<const sync_pb::SessionSpecifics> sync_specifics( 308 scoped_ptr<const sync_pb::SessionSpecifics> sync_specifics(
309 model_associator_->GetChromeNodeFromSyncId(sync_id)); 309 model_associator_->GetChromeNodeFromSyncId(sync_id));
310 ASSERT_TRUE(sync_specifics != NULL); 310 ASSERT_TRUE(sync_specifics != NULL);
311 ScopedVector<ForeignSession> foreign_sessions; 311 ScopedVector<ForeignSession> foreign_sessions;
312 model_associator_->GetSessionData(&foreign_sessions.get()); 312 model_associator_->GetSessionData(&foreign_sessions.get());
313 ASSERT_EQ(1U, foreign_sessions.size()); 313 ASSERT_EQ(1U, foreign_sessions.size());
314 ASSERT_EQ(1U, foreign_sessions[0]->windows.size()); 314 ASSERT_EQ(1U, foreign_sessions[0]->windows.size());
315 ASSERT_EQ(1U, foreign_sessions[0]->windows[0]->tabs.size()); 315 ASSERT_EQ(1U, foreign_sessions[0]->windows[0]->tabs.size());
316 ASSERT_EQ(1U, foreign_sessions[0]->windows[0]->tabs[0]->navigations.size()); 316 ASSERT_EQ(1U, foreign_sessions[0]->windows[0]->tabs[0]->navigations.size());
317 ASSERT_EQ(foreign_sessions[0]->foreign_tession_tag, machine_tag); 317 ASSERT_EQ(foreign_sessions[0]->foreign_session_tag, machine_tag);
318 ASSERT_EQ(1, foreign_sessions[0]->windows[0]->selected_tab_index); 318 ASSERT_EQ(1, foreign_sessions[0]->windows[0]->selected_tab_index);
319 ASSERT_EQ(1, foreign_sessions[0]->windows[0]->type); 319 ASSERT_EQ(1, foreign_sessions[0]->windows[0]->type);
320 ASSERT_EQ(13, foreign_sessions[0]->windows[0]->tabs[0]->tab_visual_index); 320 ASSERT_EQ(13, foreign_sessions[0]->windows[0]->tabs[0]->tab_visual_index);
321 ASSERT_EQ(3, 321 ASSERT_EQ(3,
322 foreign_sessions[0]->windows[0]->tabs[0]->current_navigation_index); 322 foreign_sessions[0]->windows[0]->tabs[0]->current_navigation_index);
323 ASSERT_TRUE(foreign_sessions[0]->windows[0]->tabs[0]->pinned); 323 ASSERT_TRUE(foreign_sessions[0]->windows[0]->tabs[0]->pinned);
324 ASSERT_EQ("app_id", 324 ASSERT_EQ("app_id",
325 foreign_sessions[0]->windows[0]->tabs[0]->extension_app_id); 325 foreign_sessions[0]->windows[0]->tabs[0]->extension_app_id);
326 ASSERT_EQ(12, 326 ASSERT_EQ(12,
327 foreign_sessions[0]->windows[0]->tabs[0]->navigations[0].index()); 327 foreign_sessions[0]->windows[0]->tabs[0]->navigations[0].index());
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 ASSERT_FALSE(notified_of_update_); 394 ASSERT_FALSE(notified_of_update_);
395 { 395 {
396 sync_api::WriteTransaction trans(backend()->GetUserShareHandle()); 396 sync_api::WriteTransaction trans(backend()->GetUserShareHandle());
397 change_processor_->ApplyChangesFromSyncModel(&trans, record.get(), 1); 397 change_processor_->ApplyChangesFromSyncModel(&trans, record.get(), 1);
398 } 398 }
399 ASSERT_TRUE(notified_of_update_); 399 ASSERT_TRUE(notified_of_update_);
400 } 400 }
401 401
402 } // namespace browser_sync 402 } // namespace browser_sync
403 403
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/session_model_associator.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698