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

Side by Side Diff: chrome/browser/sessions/session_service_test_helper.h

Issue 6462015: Cleanup more test code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright update Created 9 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) 2010 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 #ifndef CHROME_BROWSER_SESSIONS_SESSION_SERVICE_TEST_HELPER_H_ 5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_SERVICE_TEST_HELPER_H_
6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_TEST_HELPER_H_ 6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_TEST_HELPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/ref_counted.h" 12 #include "base/ref_counted.h"
13 13
14 class SessionBackend; 14 class SessionBackend;
15 class SessionCommand; 15 class SessionCommand;
16 class SessionID; 16 class SessionID;
17 class SessionService; 17 class SessionService;
18 struct SessionTab; 18 struct SessionTab;
19 struct SessionWindow; 19 struct SessionWindow;
20 class TabNavigation; 20 class TabNavigation;
21 21
22 // A simple class that makes writing SessionService related tests easier. 22 // A simple class that makes writing SessionService related tests easier.
23 23
24 class SessionServiceTestHelper { 24 class SessionServiceTestHelper {
25 public: 25 public:
26 explicit SessionServiceTestHelper() {} 26 explicit SessionServiceTestHelper();
27 27 explicit SessionServiceTestHelper(SessionService* service);
28 explicit SessionServiceTestHelper(SessionService* service) 28 ~SessionServiceTestHelper();
29 : service_(service) {}
30 29
31 void RestoreSessionFromCommands(const std::vector<SessionCommand*>& commands, 30 void RestoreSessionFromCommands(const std::vector<SessionCommand*>& commands,
32 std::vector<SessionWindow*>* valid_windows); 31 std::vector<SessionWindow*>* valid_windows);
33 32
34 void PrepareTabInWindow(const SessionID& window_id, 33 void PrepareTabInWindow(const SessionID& window_id,
35 const SessionID& tab_id, 34 const SessionID& tab_id,
36 int visual_index, 35 int visual_index,
37 bool select); 36 bool select);
38 37
39 void SetTabExtensionAppID(const SessionID& window_id, 38 void SetTabExtensionAppID(const SessionID& window_id,
(...skipping 28 matching lines...) Expand all
68 67
69 SessionBackend* backend(); 68 SessionBackend* backend();
70 69
71 private: 70 private:
72 scoped_refptr<SessionService> service_; 71 scoped_refptr<SessionService> service_;
73 72
74 DISALLOW_COPY_AND_ASSIGN(SessionServiceTestHelper); 73 DISALLOW_COPY_AND_ASSIGN(SessionServiceTestHelper);
75 }; 74 };
76 75
77 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_TEST_HELPER_H_ 76 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sessions/session_service_test_helper.cc » ('j') | chrome/chrome_tests.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698