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

Side by Side Diff: chrome/browser/sync/internal_api/syncapi_unittest.cc

Issue 9668028: [Sync] Create new top-level sync/ directory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head Created 8 years, 9 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) 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>
(...skipping 25 matching lines...) Expand all
36 #include "chrome/browser/sync/internal_api/sync_manager.h" 36 #include "chrome/browser/sync/internal_api/sync_manager.h"
37 #include "chrome/browser/sync/internal_api/write_node.h" 37 #include "chrome/browser/sync/internal_api/write_node.h"
38 #include "chrome/browser/sync/internal_api/write_transaction.h" 38 #include "chrome/browser/sync/internal_api/write_transaction.h"
39 #include "chrome/browser/sync/js/js_arg_list.h" 39 #include "chrome/browser/sync/js/js_arg_list.h"
40 #include "chrome/browser/sync/js/js_backend.h" 40 #include "chrome/browser/sync/js/js_backend.h"
41 #include "chrome/browser/sync/js/js_event_handler.h" 41 #include "chrome/browser/sync/js/js_event_handler.h"
42 #include "chrome/browser/sync/js/js_reply_handler.h" 42 #include "chrome/browser/sync/js/js_reply_handler.h"
43 #include "chrome/browser/sync/js/js_test_util.h" 43 #include "chrome/browser/sync/js/js_test_util.h"
44 #include "chrome/browser/sync/notifier/sync_notifier.h" 44 #include "chrome/browser/sync/notifier/sync_notifier.h"
45 #include "chrome/browser/sync/notifier/sync_notifier_observer.h" 45 #include "chrome/browser/sync/notifier/sync_notifier_observer.h"
46 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h"
47 #include "chrome/browser/sync/protocol/encryption.pb.h"
48 #include "chrome/browser/sync/protocol/extension_specifics.pb.h"
49 #include "chrome/browser/sync/protocol/password_specifics.pb.h"
50 #include "chrome/browser/sync/protocol/preference_specifics.pb.h"
51 #include "chrome/browser/sync/protocol/proto_value_conversions.h" 46 #include "chrome/browser/sync/protocol/proto_value_conversions.h"
52 #include "chrome/browser/sync/protocol/sync.pb.h"
53 #include "chrome/browser/sync/sessions/sync_session.h" 47 #include "chrome/browser/sync/sessions/sync_session.h"
54 #include "chrome/browser/sync/syncable/model_type_test_util.h" 48 #include "chrome/browser/sync/syncable/model_type_test_util.h"
55 #include "chrome/browser/sync/syncable/syncable.h" 49 #include "chrome/browser/sync/syncable/syncable.h"
56 #include "chrome/browser/sync/syncable/syncable_id.h" 50 #include "chrome/browser/sync/syncable/syncable_id.h"
57 #include "chrome/browser/sync/test/engine/test_user_share.h" 51 #include "chrome/browser/sync/test/engine/test_user_share.h"
58 #include "chrome/browser/sync/test/fake_encryptor.h" 52 #include "chrome/browser/sync/test/fake_encryptor.h"
59 #include "chrome/browser/sync/test/fake_extensions_activity_monitor.h" 53 #include "chrome/browser/sync/test/fake_extensions_activity_monitor.h"
60 #include "chrome/browser/sync/util/cryptographer.h" 54 #include "chrome/browser/sync/util/cryptographer.h"
61 #include "chrome/browser/sync/util/extensions_activity_monitor.h" 55 #include "chrome/browser/sync/util/extensions_activity_monitor.h"
62 #include "chrome/browser/sync/util/time.h" 56 #include "chrome/browser/sync/util/time.h"
57 #include "sync/protocol/bookmark_specifics.pb.h"
58 #include "sync/protocol/encryption.pb.h"
59 #include "sync/protocol/extension_specifics.pb.h"
60 #include "sync/protocol/password_specifics.pb.h"
61 #include "sync/protocol/preference_specifics.pb.h"
62 #include "sync/protocol/sync.pb.h"
63 #include "testing/gmock/include/gmock/gmock.h" 63 #include "testing/gmock/include/gmock/gmock.h"
64 #include "testing/gtest/include/gtest/gtest.h" 64 #include "testing/gtest/include/gtest/gtest.h"
65 65
66 using base::ExpectDictStringValue; 66 using base::ExpectDictStringValue;
67 using browser_sync::Cryptographer; 67 using browser_sync::Cryptographer;
68 using browser_sync::FakeEncryptor; 68 using browser_sync::FakeEncryptor;
69 using browser_sync::FakeExtensionsActivityMonitor; 69 using browser_sync::FakeExtensionsActivityMonitor;
70 using browser_sync::HasArgsAsList; 70 using browser_sync::HasArgsAsList;
71 using browser_sync::HasDetailsAsDictionary; 71 using browser_sync::HasDetailsAsDictionary;
72 using browser_sync::KeyParams; 72 using browser_sync::KeyParams;
(...skipping 2326 matching lines...) Expand 10 before | Expand all | Expand 10 after
2399 EXPECT_EQ(title, node.GetTitle()); 2399 EXPECT_EQ(title, node.GetTitle());
2400 EXPECT_EQ(GURL(url2), node.GetURL()); 2400 EXPECT_EQ(GURL(url2), node.GetURL());
2401 const syncable::Entry* node_entry = node.GetEntry(); 2401 const syncable::Entry* node_entry = node.GetEntry();
2402 EXPECT_EQ(kEncryptedString, node_entry->Get(NON_UNIQUE_NAME)); 2402 EXPECT_EQ(kEncryptedString, node_entry->Get(NON_UNIQUE_NAME));
2403 const sync_pb::EntitySpecifics& specifics = node_entry->Get(SPECIFICS); 2403 const sync_pb::EntitySpecifics& specifics = node_entry->Get(SPECIFICS);
2404 EXPECT_TRUE(specifics.has_encrypted()); 2404 EXPECT_TRUE(specifics.has_encrypted());
2405 } 2405 }
2406 } 2406 }
2407 2407
2408 } // namespace browser_sync 2408 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/internal_api/sync_manager.cc ('k') | chrome/browser/sync/internal_api/write_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698