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

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

Issue 7744039: Switch ChromeTestSuite to the same convention as ContentTestSuite: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixing 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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/net/gaia/token_service.h" 9 #include "chrome/browser/net/gaia/token_service.h"
10 #include "chrome/browser/sync/glue/bookmark_data_type_controller.h" 10 #include "chrome/browser/sync/glue/bookmark_data_type_controller.h"
11 #include "chrome/browser/sync/glue/data_type_controller.h" 11 #include "chrome/browser/sync/glue/data_type_controller.h"
12 #include "chrome/browser/sync/js/js_arg_list.h" 12 #include "chrome/browser/sync/js/js_arg_list.h"
13 #include "chrome/browser/sync/js/js_event_details.h" 13 #include "chrome/browser/sync/js/js_event_details.h"
14 #include "chrome/browser/sync/js/js_test_util.h" 14 #include "chrome/browser/sync/js/js_test_util.h"
15 #include "chrome/browser/sync/profile_sync_factory_mock.h" 15 #include "chrome/browser/sync/profile_sync_factory_mock.h"
16 #include "chrome/browser/sync/test_profile_sync_service.h" 16 #include "chrome/browser/sync/test_profile_sync_service.h"
17 #include "chrome/common/net/gaia/gaia_constants.h" 17 #include "chrome/common/net/gaia/gaia_constants.h"
18 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
19 #include "chrome/test/base/testing_browser_process_test.h"
20 #include "chrome/test/base/testing_pref_service.h" 19 #include "chrome/test/base/testing_pref_service.h"
21 #include "chrome/test/base/testing_profile.h" 20 #include "chrome/test/base/testing_profile.h"
22 #include "content/browser/browser_thread.h" 21 #include "content/browser/browser_thread.h"
23 #include "testing/gmock/include/gmock/gmock.h" 22 #include "testing/gmock/include/gmock/gmock.h"
24 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
25 24
26 // TODO(akalin): Add tests here that exercise the whole 25 // TODO(akalin): Add tests here that exercise the whole
27 // ProfileSyncService/SyncBackendHost stack while mocking out as 26 // ProfileSyncService/SyncBackendHost stack while mocking out as
28 // little as possible. 27 // little as possible.
29 28
30 namespace browser_sync { 29 namespace browser_sync {
31 30
32 namespace { 31 namespace {
33 32
34 using testing::_; 33 using testing::_;
35 using testing::AtLeast; 34 using testing::AtLeast;
36 using testing::AtMost; 35 using testing::AtMost;
37 using testing::Return; 36 using testing::Return;
38 using testing::StrictMock; 37 using testing::StrictMock;
39 38
40 class ProfileSyncServiceTest : public TestingBrowserProcessTest { 39 class ProfileSyncServiceTest : public testing::Test {
41 protected: 40 protected:
42 ProfileSyncServiceTest() 41 ProfileSyncServiceTest()
43 : ui_thread_(BrowserThread::UI, &ui_loop_), 42 : ui_thread_(BrowserThread::UI, &ui_loop_),
44 io_thread_(BrowserThread::IO) {} 43 io_thread_(BrowserThread::IO) {}
45 44
46 virtual ~ProfileSyncServiceTest() {} 45 virtual ~ProfileSyncServiceTest() {}
47 46
48 virtual void SetUp() { 47 virtual void SetUp() {
49 base::Thread::Options options; 48 base::Thread::Options options;
50 options.message_loop_type = MessageLoop::TYPE_IO; 49 options.message_loop_type = MessageLoop::TYPE_IO;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // This will still exist, but the text should have changed. 261 // This will still exist, but the text should have changed.
263 ASSERT_TRUE(file_util::PathExists(sync_file2)); 262 ASSERT_TRUE(file_util::PathExists(sync_file2));
264 std::string file2text; 263 std::string file2text;
265 ASSERT_TRUE(file_util::ReadFileToString(sync_file2, &file2text)); 264 ASSERT_TRUE(file_util::ReadFileToString(sync_file2, &file2text));
266 ASSERT_NE(file2text.compare(nonsense2), 0); 265 ASSERT_NE(file2text.compare(nonsense2), 0);
267 } 266 }
268 267
269 } // namespace 268 } // namespace
270 269
271 } // namespace browser_sync 270 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698