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

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

Issue 8468023: Move encryption related files from util folder to encryption folder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 9 years, 1 month 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 // 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/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/format_macros.h" 14 #include "base/format_macros.h"
15 #include "base/location.h" 15 #include "base/location.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/message_loop.h" 17 #include "base/message_loop.h"
18 #include "base/scoped_temp_dir.h" 18 #include "base/scoped_temp_dir.h"
19 #include "base/string_number_conversions.h" 19 #include "base/string_number_conversions.h"
20 #include "base/stringprintf.h" 20 #include "base/stringprintf.h"
21 #include "base/utf_string_conversions.h" 21 #include "base/utf_string_conversions.h"
22 #include "base/values.h" 22 #include "base/values.h"
23 #include "chrome/browser/password_manager/encryptor.h" 23 #include "chrome/browser/password_manager/encryptor.h"
24 #include "chrome/browser/sync/engine/model_safe_worker.h" 24 #include "chrome/browser/sync/engine/model_safe_worker.h"
25 #include "chrome/browser/sync/engine/nigori_util.h" 25 #include "chrome/browser/sync/encryption/nigori_util.h"
26 #include "chrome/browser/sync/engine/syncapi_internal.h" 26 #include "chrome/browser/sync/engine/syncapi_internal.h"
27 #include "chrome/browser/sync/internal_api/change_record.h" 27 #include "chrome/browser/sync/internal_api/change_record.h"
28 #include "chrome/browser/sync/internal_api/http_post_provider_factory.h" 28 #include "chrome/browser/sync/internal_api/http_post_provider_factory.h"
29 #include "chrome/browser/sync/internal_api/http_post_provider_interface.h" 29 #include "chrome/browser/sync/internal_api/http_post_provider_interface.h"
30 #include "chrome/browser/sync/internal_api/read_node.h" 30 #include "chrome/browser/sync/internal_api/read_node.h"
31 #include "chrome/browser/sync/internal_api/read_transaction.h" 31 #include "chrome/browser/sync/internal_api/read_transaction.h"
32 #include "chrome/browser/sync/internal_api/sync_manager.h" 32 #include "chrome/browser/sync/internal_api/sync_manager.h"
33 #include "chrome/browser/sync/internal_api/write_node.h" 33 #include "chrome/browser/sync/internal_api/write_node.h"
34 #include "chrome/browser/sync/internal_api/write_transaction.h" 34 #include "chrome/browser/sync/internal_api/write_transaction.h"
35 #include "chrome/browser/sync/js/js_arg_list.h" 35 #include "chrome/browser/sync/js/js_arg_list.h"
36 #include "chrome/browser/sync/js/js_backend.h" 36 #include "chrome/browser/sync/js/js_backend.h"
37 #include "chrome/browser/sync/js/js_event_handler.h" 37 #include "chrome/browser/sync/js/js_event_handler.h"
38 #include "chrome/browser/sync/js/js_reply_handler.h" 38 #include "chrome/browser/sync/js/js_reply_handler.h"
39 #include "chrome/browser/sync/js/js_test_util.h" 39 #include "chrome/browser/sync/js/js_test_util.h"
40 #include "chrome/browser/sync/notifier/sync_notifier.h" 40 #include "chrome/browser/sync/notifier/sync_notifier.h"
41 #include "chrome/browser/sync/notifier/sync_notifier_observer.h" 41 #include "chrome/browser/sync/notifier/sync_notifier_observer.h"
42 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h" 42 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h"
43 #include "chrome/browser/sync/protocol/extension_specifics.pb.h" 43 #include "chrome/browser/sync/protocol/extension_specifics.pb.h"
44 #include "chrome/browser/sync/protocol/password_specifics.pb.h" 44 #include "chrome/browser/sync/protocol/password_specifics.pb.h"
45 #include "chrome/browser/sync/protocol/proto_value_conversions.h" 45 #include "chrome/browser/sync/protocol/proto_value_conversions.h"
46 #include "chrome/browser/sync/protocol/sync.pb.h" 46 #include "chrome/browser/sync/protocol/sync.pb.h"
47 #include "chrome/browser/sync/sessions/sync_session.h" 47 #include "chrome/browser/sync/sessions/sync_session.h"
48 #include "chrome/browser/sync/syncable/directory_manager.h" 48 #include "chrome/browser/sync/syncable/directory_manager.h"
49 #include "chrome/browser/sync/syncable/syncable.h" 49 #include "chrome/browser/sync/syncable/syncable.h"
50 #include "chrome/browser/sync/syncable/syncable_id.h" 50 #include "chrome/browser/sync/syncable/syncable_id.h"
51 #include "chrome/browser/sync/test/engine/test_user_share.h" 51 #include "chrome/browser/sync/test/engine/test_user_share.h"
52 #include "chrome/browser/sync/util/cryptographer.h" 52 #include "chrome/browser/sync/encryption/cryptographer.h"
53 #include "chrome/browser/sync/util/time.h" 53 #include "chrome/browser/sync/util/time.h"
54 #include "chrome/test/base/values_test_util.h" 54 #include "chrome/test/base/values_test_util.h"
55 #include "content/test/test_browser_thread.h" 55 #include "content/test/test_browser_thread.h"
56 #include "testing/gmock/include/gmock/gmock.h" 56 #include "testing/gmock/include/gmock/gmock.h"
57 #include "testing/gtest/include/gtest/gtest.h" 57 #include "testing/gtest/include/gtest/gtest.h"
58 58
59 using browser_sync::Cryptographer; 59 using browser_sync::Cryptographer;
60 using browser_sync::HasArgsAsList; 60 using browser_sync::HasArgsAsList;
61 using browser_sync::HasDetailsAsDictionary; 61 using browser_sync::HasDetailsAsDictionary;
62 using browser_sync::KeyParams; 62 using browser_sync::KeyParams;
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1530 EXPECT_EQ(syncable::BOOKMARKS, node2.GetModelType()); 1530 EXPECT_EQ(syncable::BOOKMARKS, node2.GetModelType());
1531 // We should de-canonicalize the title in GetTitle(), but the title in the 1531 // We should de-canonicalize the title in GetTitle(), but the title in the
1532 // specifics should be stored in the server legal form. 1532 // specifics should be stored in the server legal form.
1533 EXPECT_EQ(raw_title2, node2.GetTitle()); 1533 EXPECT_EQ(raw_title2, node2.GetTitle());
1534 EXPECT_EQ(title2, node2.GetBookmarkSpecifics().title()); 1534 EXPECT_EQ(title2, node2.GetBookmarkSpecifics().title());
1535 EXPECT_EQ(url2, node2.GetBookmarkSpecifics().url()); 1535 EXPECT_EQ(url2, node2.GetBookmarkSpecifics().url());
1536 } 1536 }
1537 } 1537 }
1538 1538
1539 } // namespace browser_sync 1539 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698