| 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/nigori_util.h" |
| 28 #include "chrome/browser/sync/engine/syncapi.h" | 28 #include "chrome/browser/sync/internal_api/read_node.h" |
| 29 #include "chrome/browser/sync/internal_api/read_transaction.h" |
| 30 #include "chrome/browser/sync/internal_api/syncapi_functions.h" |
| 31 #include "chrome/browser/sync/internal_api/sync_manager.h" |
| 32 #include "chrome/browser/sync/internal_api/write_node.h" |
| 33 #include "chrome/browser/sync/internal_api/write_transaction.h" |
| 29 #include "chrome/browser/sync/js/js_arg_list.h" | 34 #include "chrome/browser/sync/js/js_arg_list.h" |
| 30 #include "chrome/browser/sync/js/js_backend.h" | 35 #include "chrome/browser/sync/js/js_backend.h" |
| 31 #include "chrome/browser/sync/js/js_event_handler.h" | 36 #include "chrome/browser/sync/js/js_event_handler.h" |
| 32 #include "chrome/browser/sync/js/js_reply_handler.h" | 37 #include "chrome/browser/sync/js/js_reply_handler.h" |
| 33 #include "chrome/browser/sync/js/js_test_util.h" | 38 #include "chrome/browser/sync/js/js_test_util.h" |
| 34 #include "chrome/browser/sync/notifier/sync_notifier.h" | 39 #include "chrome/browser/sync/notifier/sync_notifier.h" |
| 35 #include "chrome/browser/sync/notifier/sync_notifier_observer.h" | 40 #include "chrome/browser/sync/notifier/sync_notifier_observer.h" |
| 36 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h" | 41 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h" |
| 37 #include "chrome/browser/sync/protocol/password_specifics.pb.h" | 42 #include "chrome/browser/sync/protocol/password_specifics.pb.h" |
| 43 #include "chrome/browser/sync/protocol/proto_value_conversions.h" |
| 38 #include "chrome/browser/sync/protocol/sync.pb.h" | 44 #include "chrome/browser/sync/protocol/sync.pb.h" |
| 39 #include "chrome/browser/sync/protocol/proto_value_conversions.h" | |
| 40 #include "chrome/browser/sync/sessions/sync_session.h" | 45 #include "chrome/browser/sync/sessions/sync_session.h" |
| 41 #include "chrome/browser/sync/syncable/directory_manager.h" | 46 #include "chrome/browser/sync/syncable/directory_manager.h" |
| 42 #include "chrome/browser/sync/syncable/syncable.h" | 47 #include "chrome/browser/sync/syncable/syncable.h" |
| 43 #include "chrome/browser/sync/syncable/syncable_id.h" | 48 #include "chrome/browser/sync/syncable/syncable_id.h" |
| 44 #include "chrome/browser/sync/util/cryptographer.h" | 49 #include "chrome/browser/sync/util/cryptographer.h" |
| 45 #include "chrome/test/base/values_test_util.h" | 50 #include "chrome/test/base/values_test_util.h" |
| 46 #include "chrome/test/sync/engine/test_user_share.h" | 51 #include "chrome/test/sync/engine/test_user_share.h" |
| 47 #include "content/browser/browser_thread.h" | 52 #include "content/browser/browser_thread.h" |
| 48 #include "testing/gmock/include/gmock/gmock.h" | 53 #include "testing/gmock/include/gmock/gmock.h" |
| 49 #include "testing/gtest/include/gtest/gtest.h" | 54 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1423 { | 1428 { |
| 1424 ReadTransaction trans(FROM_HERE, sync_manager_.GetUserShare()); | 1429 ReadTransaction trans(FROM_HERE, sync_manager_.GetUserShare()); |
| 1425 ReadNode password_node(&trans); | 1430 ReadNode password_node(&trans); |
| 1426 EXPECT_FALSE(password_node.InitByIdLookup(node_id)); | 1431 EXPECT_FALSE(password_node.InitByIdLookup(node_id)); |
| 1427 } | 1432 } |
| 1428 } | 1433 } |
| 1429 | 1434 |
| 1430 } // namespace | 1435 } // namespace |
| 1431 | 1436 |
| 1432 } // namespace browser_sync | 1437 } // namespace browser_sync |
| OLD | NEW |