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

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

Issue 6413036: Another big out-of-lining of test code. Hits a lot of gmock objects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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) 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 <stack> 5 #include <stack>
6 #include <vector> 6 #include <vector>
7 7
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
12 #include "base/string_number_conversions.h" 12 #include "base/string_number_conversions.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/string16.h" 14 #include "base/string16.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "chrome/browser/bookmarks/bookmark_model.h" 17 #include "chrome/browser/bookmarks/bookmark_model.h"
18 #include "chrome/browser/browser_thread.h" 18 #include "chrome/browser/browser_thread.h"
19 #include "chrome/browser/net/gaia/token_service.h" 19 #include "chrome/browser/net/gaia/token_service.h"
20 #include "chrome/browser/prefs/pref_service.h" 20 #include "chrome/browser/prefs/pref_service.h"
21 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/sync/abstract_profile_sync_service_test.h"
22 #include "chrome/browser/sync/engine/syncapi.h" 23 #include "chrome/browser/sync/engine/syncapi.h"
23 #include "chrome/browser/sync/glue/change_processor.h" 24 #include "chrome/browser/sync/glue/change_processor.h"
24 #include "chrome/browser/sync/glue/bookmark_change_processor.h" 25 #include "chrome/browser/sync/glue/bookmark_change_processor.h"
25 #include "chrome/browser/sync/glue/bookmark_data_type_controller.h" 26 #include "chrome/browser/sync/glue/bookmark_data_type_controller.h"
26 #include "chrome/browser/sync/glue/bookmark_model_associator.h" 27 #include "chrome/browser/sync/glue/bookmark_model_associator.h"
27 #include "chrome/browser/sync/glue/data_type_controller.h" 28 #include "chrome/browser/sync/glue/data_type_controller.h"
28 #include "chrome/browser/sync/glue/model_associator.h" 29 #include "chrome/browser/sync/glue/model_associator.h"
29 #include "chrome/browser/sync/glue/sync_backend_host.h" 30 #include "chrome/browser/sync/glue/sync_backend_host.h"
30 #include "chrome/browser/sync/glue/sync_backend_host_mock.h" 31 #include "chrome/browser/sync/glue/sync_backend_host_mock.h"
31 #include "chrome/browser/sync/js_arg_list.h" 32 #include "chrome/browser/sync/js_arg_list.h"
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 // This file should have been deleted when the whole directory was nuked. 1648 // This file should have been deleted when the whole directory was nuked.
1648 ASSERT_FALSE(file_util::PathExists(sync_file3)); 1649 ASSERT_FALSE(file_util::PathExists(sync_file3));
1649 ASSERT_FALSE(file_util::PathExists(sync_file1)); 1650 ASSERT_FALSE(file_util::PathExists(sync_file1));
1650 1651
1651 // This will still exist, but the text should have changed. 1652 // This will still exist, but the text should have changed.
1652 ASSERT_TRUE(file_util::PathExists(sync_file2)); 1653 ASSERT_TRUE(file_util::PathExists(sync_file2));
1653 std::string file2text; 1654 std::string file2text;
1654 file_util::ReadFileToString(sync_file2, &file2text); 1655 file_util::ReadFileToString(sync_file2, &file2text);
1655 ASSERT_FALSE(file2text.compare(nonsense2) == 0); 1656 ASSERT_FALSE(file2text.compare(nonsense2) == 0);
1656 } 1657 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698