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

Side by Side Diff: chrome/browser/sessions/session_service_unittest.cc

Issue 12212048: Linux/ChromeOS Chromium style checker cleanup, chrome/browser edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 helper_.set_service(session_service); 54 helper_.set_service(session_service);
55 55
56 service()->SetWindowType( 56 service()->SetWindowType(
57 window_id, Browser::TYPE_TABBED, SessionService::TYPE_NORMAL); 57 window_id, Browser::TYPE_TABBED, SessionService::TYPE_NORMAL);
58 service()->SetWindowBounds(window_id, 58 service()->SetWindowBounds(window_id,
59 window_bounds, 59 window_bounds,
60 ui::SHOW_STATE_NORMAL); 60 ui::SHOW_STATE_NORMAL);
61 } 61 }
62 62
63 // Upon notification, increment the sync_save_count variable 63 // Upon notification, increment the sync_save_count variable
64 void Observe(int type, 64 virtual void Observe(int type,
65 const content::NotificationSource& source, 65 const content::NotificationSource& source,
66 const content::NotificationDetails& details) { 66 const content::NotificationDetails& details) OVERRIDE {
67 ASSERT_EQ(type, chrome::NOTIFICATION_SESSION_SERVICE_SAVED); 67 ASSERT_EQ(type, chrome::NOTIFICATION_SESSION_SERVICE_SAVED);
68 sync_save_count_++; 68 sync_save_count_++;
69 } 69 }
70 70
71 virtual void TearDown() { 71 virtual void TearDown() {
72 helper_.set_service(NULL); 72 helper_.set_service(NULL);
73 BrowserWithTestWindowTest::TearDown(); 73 BrowserWithTestWindowTest::TearDown();
74 } 74 }
75 75
76 void UpdateNavigation(const SessionID& window_id, 76 void UpdateNavigation(const SessionID& window_id,
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 service()->ScheduleCommand( 965 service()->ScheduleCommand(
966 service()->CreateSetActiveWindowCommand(window_id)); 966 service()->CreateSetActiveWindowCommand(window_id));
967 service()->ScheduleCommand( 967 service()->ScheduleCommand(
968 service()->CreateSetActiveWindowCommand(window2_id)); 968 service()->CreateSetActiveWindowCommand(window2_id));
969 969
970 ScopedVector<SessionWindow> windows; 970 ScopedVector<SessionWindow> windows;
971 SessionID::id_type active_window_id = 0; 971 SessionID::id_type active_window_id = 0;
972 ReadWindows(&(windows.get()), &active_window_id); 972 ReadWindows(&(windows.get()), &active_window_id);
973 EXPECT_EQ(window2_id.id(), active_window_id); 973 EXPECT_EQ(window2_id.id(), active_window_id);
974 } 974 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698