OLD | NEW |
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/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/message_loop.h" | 16 #include "base/message_loop.h" |
17 #include "base/scoped_temp_dir.h" | 17 #include "base/scoped_temp_dir.h" |
18 #include "base/string_number_conversions.h" | 18 #include "base/string_number_conversions.h" |
19 #include "base/stringprintf.h" | 19 #include "base/stringprintf.h" |
20 #include "base/tracked.h" | 20 #include "base/tracked.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/http_post_provider_factory.h" | 24 #include "chrome/browser/sync/engine/http_post_provider_factory.h" |
25 #include "chrome/browser/sync/engine/http_post_provider_interface.h" | 25 #include "chrome/browser/sync/engine/http_post_provider_interface.h" |
26 #include "chrome/browser/sync/engine/model_safe_worker.h" | 26 #include "chrome/browser/sync/engine/model_safe_worker.h" |
| 27 #include "chrome/browser/sync/engine/nigori_util.h" |
27 #include "chrome/browser/sync/engine/syncapi.h" | 28 #include "chrome/browser/sync/engine/syncapi.h" |
28 #include "chrome/browser/sync/js/js_arg_list.h" | 29 #include "chrome/browser/sync/js/js_arg_list.h" |
29 #include "chrome/browser/sync/js/js_backend.h" | 30 #include "chrome/browser/sync/js/js_backend.h" |
30 #include "chrome/browser/sync/js/js_event_handler.h" | 31 #include "chrome/browser/sync/js/js_event_handler.h" |
31 #include "chrome/browser/sync/js/js_reply_handler.h" | 32 #include "chrome/browser/sync/js/js_reply_handler.h" |
32 #include "chrome/browser/sync/js/js_test_util.h" | 33 #include "chrome/browser/sync/js/js_test_util.h" |
33 #include "chrome/browser/sync/notifier/sync_notifier.h" | 34 #include "chrome/browser/sync/notifier/sync_notifier.h" |
34 #include "chrome/browser/sync/notifier/sync_notifier_observer.h" | 35 #include "chrome/browser/sync/notifier/sync_notifier_observer.h" |
35 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h" | 36 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h" |
36 #include "chrome/browser/sync/protocol/password_specifics.pb.h" | 37 #include "chrome/browser/sync/protocol/password_specifics.pb.h" |
37 #include "chrome/browser/sync/protocol/sync.pb.h" | 38 #include "chrome/browser/sync/protocol/sync.pb.h" |
38 #include "chrome/browser/sync/protocol/proto_value_conversions.h" | 39 #include "chrome/browser/sync/protocol/proto_value_conversions.h" |
39 #include "chrome/browser/sync/sessions/sync_session.h" | 40 #include "chrome/browser/sync/sessions/sync_session.h" |
40 #include "chrome/browser/sync/syncable/directory_manager.h" | 41 #include "chrome/browser/sync/syncable/directory_manager.h" |
41 #include "chrome/browser/sync/syncable/nigori_util.h" | |
42 #include "chrome/browser/sync/syncable/syncable.h" | 42 #include "chrome/browser/sync/syncable/syncable.h" |
43 #include "chrome/browser/sync/syncable/syncable_id.h" | 43 #include "chrome/browser/sync/syncable/syncable_id.h" |
44 #include "chrome/browser/sync/util/cryptographer.h" | 44 #include "chrome/browser/sync/util/cryptographer.h" |
45 #include "chrome/test/base/values_test_util.h" | 45 #include "chrome/test/base/values_test_util.h" |
46 #include "chrome/test/sync/engine/test_user_share.h" | 46 #include "chrome/test/sync/engine/test_user_share.h" |
47 #include "content/browser/browser_thread.h" | 47 #include "content/browser/browser_thread.h" |
48 #include "testing/gmock/include/gmock/gmock.h" | 48 #include "testing/gmock/include/gmock/gmock.h" |
49 #include "testing/gtest/include/gtest/gtest.h" | 49 #include "testing/gtest/include/gtest/gtest.h" |
50 | 50 |
51 using browser_sync::Cryptographer; | 51 using browser_sync::Cryptographer; |
(...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1423 { | 1423 { |
1424 ReadTransaction trans(FROM_HERE, sync_manager_.GetUserShare()); | 1424 ReadTransaction trans(FROM_HERE, sync_manager_.GetUserShare()); |
1425 ReadNode password_node(&trans); | 1425 ReadNode password_node(&trans); |
1426 EXPECT_FALSE(password_node.InitByIdLookup(node_id)); | 1426 EXPECT_FALSE(password_node.InitByIdLookup(node_id)); |
1427 } | 1427 } |
1428 } | 1428 } |
1429 | 1429 |
1430 } // namespace | 1430 } // namespace |
1431 | 1431 |
1432 } // namespace browser_sync | 1432 } // namespace browser_sync |
OLD | NEW |