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

Side by Side Diff: chrome/browser/sync/abstract_profile_sync_service_test.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_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ 5 #ifndef CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_
6 #define CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ 6 #define CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
(...skipping 21 matching lines...) Expand all
33 static const std::string GetTagForType(syncable::ModelType model_type); 33 static const std::string GetTagForType(syncable::ModelType model_type);
34 34
35 static bool CreateRoot(syncable::ModelType model_type, 35 static bool CreateRoot(syncable::ModelType model_type,
36 sync_api::UserShare* service, 36 sync_api::UserShare* service,
37 browser_sync::TestIdFactory* ids); 37 browser_sync::TestIdFactory* ids);
38 }; 38 };
39 39
40 class AbstractProfileSyncServiceTest : public testing::Test { 40 class AbstractProfileSyncServiceTest : public testing::Test {
41 public: 41 public:
42 AbstractProfileSyncServiceTest(); 42 AbstractProfileSyncServiceTest();
43 virtual ~AbstractProfileSyncServiceTest();
43 44
44 bool CreateRoot(syncable::ModelType model_type); 45 bool CreateRoot(syncable::ModelType model_type);
45 46
46 protected: 47 protected:
47 MessageLoopForUI message_loop_; 48 MessageLoopForUI message_loop_;
48 BrowserThread ui_thread_; 49 BrowserThread ui_thread_;
49 ProfileSyncFactoryMock factory_; 50 ProfileSyncFactoryMock factory_;
50 TokenService token_service_; 51 TokenService token_service_;
51 scoped_ptr<TestProfileSyncService> service_; 52 scoped_ptr<TestProfileSyncService> service_;
52 }; 53 };
53 54
54 class CreateRootTask : public Task { 55 class CreateRootTask : public Task {
55 public: 56 public:
56 CreateRootTask(AbstractProfileSyncServiceTest* test, 57 CreateRootTask(AbstractProfileSyncServiceTest* test,
57 syncable::ModelType model_type); 58 syncable::ModelType model_type);
58 59
59 virtual ~CreateRootTask(); 60 virtual ~CreateRootTask();
60 virtual void Run(); 61 virtual void Run();
61 62
62 bool success(); 63 bool success();
63 64
64 private: 65 private:
65 AbstractProfileSyncServiceTest* test_; 66 AbstractProfileSyncServiceTest* test_;
66 syncable::ModelType model_type_; 67 syncable::ModelType model_type_;
67 bool success_; 68 bool success_;
68 }; 69 };
69 70
70 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ 71 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698