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

Side by Side Diff: sync/internal_api/sync_manager_impl_unittest.cc

Issue 10989063: Changed DB to store node positions as Ordinals. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Ordinal default ctor now creates invalid Ordinals Created 8 years, 2 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
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 // Unit tests for the SyncApi. Note that a lot of the underlying 5 // Unit tests for the SyncApi. Note that a lot of the underlying
6 // functionality is provided by the Syncable layer, which has its own 6 // functionality is provided by the Syncable layer, which has its own
7 // unit tests. We'll test SyncApi specific things in this harness. 7 // unit tests. We'll test SyncApi specific things in this harness.
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <map> 10 #include <map>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/format_macros.h" 15 #include "base/format_macros.h"
16 #include "base/location.h" 16 #include "base/location.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/message_loop.h" 18 #include "base/message_loop.h"
19 #include "base/message_loop_proxy.h" 19 #include "base/message_loop_proxy.h"
20 #include "base/scoped_temp_dir.h" 20 #include "base/scoped_temp_dir.h"
21 #include "base/string_number_conversions.h" 21 #include "base/string_number_conversions.h"
22 #include "base/stringprintf.h" 22 #include "base/stringprintf.h"
23 #include "base/test/values_test_util.h" 23 #include "base/test/values_test_util.h"
24 #include "base/utf_string_conversions.h" 24 #include "base/utf_string_conversions.h"
25 #include "base/values.h" 25 #include "base/values.h"
26 #include "sync/engine/sync_scheduler.h" 26 #include "sync/engine/sync_scheduler.h"
27 #include "sync/internal_api/public/base/model_type_test_util.h" 27 #include "sync/internal_api/public/base/model_type_test_util.h"
28 #include "sync/internal_api/public/base/node_ordinal.h"
akalin 2012/10/05 22:40:27 still needed?
vishwath 2012/10/08 20:17:49 Done.
28 #include "sync/internal_api/public/change_record.h" 29 #include "sync/internal_api/public/change_record.h"
29 #include "sync/internal_api/public/engine/model_safe_worker.h" 30 #include "sync/internal_api/public/engine/model_safe_worker.h"
30 #include "sync/internal_api/public/engine/polling_constants.h" 31 #include "sync/internal_api/public/engine/polling_constants.h"
31 #include "sync/internal_api/public/http_post_provider_factory.h" 32 #include "sync/internal_api/public/http_post_provider_factory.h"
32 #include "sync/internal_api/public/http_post_provider_interface.h" 33 #include "sync/internal_api/public/http_post_provider_interface.h"
33 #include "sync/internal_api/public/read_node.h" 34 #include "sync/internal_api/public/read_node.h"
34 #include "sync/internal_api/public/read_transaction.h" 35 #include "sync/internal_api/public/read_transaction.h"
35 #include "sync/internal_api/public/test/test_internal_components_factory.h" 36 #include "sync/internal_api/public/test/test_internal_components_factory.h"
36 #include "sync/internal_api/public/test/test_user_share.h" 37 #include "sync/internal_api/public/test/test_user_share.h"
37 #include "sync/internal_api/public/write_node.h" 38 #include "sync/internal_api/public/write_node.h"
(...skipping 2844 matching lines...) Expand 10 before | Expand all | Expand 10 after
2882 2883
2883 // Verify only the non-disabled types remain after cleanup. 2884 // Verify only the non-disabled types remain after cleanup.
2884 sync_manager_.PurgeDisabledTypes(enabled_types, new_enabled_types); 2885 sync_manager_.PurgeDisabledTypes(enabled_types, new_enabled_types);
2885 EXPECT_TRUE(new_enabled_types.Equals( 2886 EXPECT_TRUE(new_enabled_types.Equals(
2886 Union(sync_manager_.InitialSyncEndedTypes(), partial_enabled_types))); 2887 Union(sync_manager_.InitialSyncEndedTypes(), partial_enabled_types)));
2887 EXPECT_TRUE(disabled_types.Equals( 2888 EXPECT_TRUE(disabled_types.Equals(
2888 sync_manager_.GetTypesWithEmptyProgressMarkerToken(ModelTypeSet::All()))); 2889 sync_manager_.GetTypesWithEmptyProgressMarkerToken(ModelTypeSet::All())));
2889 } 2890 }
2890 2891
2891 } // namespace 2892 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698