| 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" | |
| 25 #include "chrome/browser/sync/engine/http_post_provider_interface.h" | |
| 26 #include "chrome/browser/sync/engine/model_safe_worker.h" | 24 #include "chrome/browser/sync/engine/model_safe_worker.h" |
| 27 #include "chrome/browser/sync/engine/nigori_util.h" | 25 #include "chrome/browser/sync/engine/nigori_util.h" |
| 26 #include "chrome/browser/sync/internal_api/http_post_provider_factory.h" |
| 27 #include "chrome/browser/sync/internal_api/http_post_provider_interface.h" |
| 28 #include "chrome/browser/sync/internal_api/read_node.h" | 28 #include "chrome/browser/sync/internal_api/read_node.h" |
| 29 #include "chrome/browser/sync/internal_api/read_transaction.h" | 29 #include "chrome/browser/sync/internal_api/read_transaction.h" |
| 30 #include "chrome/browser/sync/internal_api/sync_manager.h" | 30 #include "chrome/browser/sync/internal_api/sync_manager.h" |
| 31 #include "chrome/browser/sync/internal_api/write_node.h" | 31 #include "chrome/browser/sync/internal_api/write_node.h" |
| 32 #include "chrome/browser/sync/internal_api/write_transaction.h" | 32 #include "chrome/browser/sync/internal_api/write_transaction.h" |
| 33 #include "chrome/browser/sync/js/js_arg_list.h" | 33 #include "chrome/browser/sync/js/js_arg_list.h" |
| 34 #include "chrome/browser/sync/js/js_backend.h" | 34 #include "chrome/browser/sync/js/js_backend.h" |
| 35 #include "chrome/browser/sync/js/js_event_handler.h" | 35 #include "chrome/browser/sync/js/js_event_handler.h" |
| 36 #include "chrome/browser/sync/js/js_reply_handler.h" | 36 #include "chrome/browser/sync/js/js_reply_handler.h" |
| 37 #include "chrome/browser/sync/js/js_test_util.h" | 37 #include "chrome/browser/sync/js/js_test_util.h" |
| (...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1492 ReadNode node(&trans); | 1492 ReadNode node(&trans); |
| 1493 EXPECT_TRUE(node.InitByIdLookup(node1)); | 1493 EXPECT_TRUE(node.InitByIdLookup(node1)); |
| 1494 EXPECT_EQ(syncable::BOOKMARKS, node.GetModelType()); | 1494 EXPECT_EQ(syncable::BOOKMARKS, node.GetModelType()); |
| 1495 EXPECT_EQ(title, node.GetTitle()); | 1495 EXPECT_EQ(title, node.GetTitle()); |
| 1496 EXPECT_EQ(title, node.GetBookmarkSpecifics().title()); | 1496 EXPECT_EQ(title, node.GetBookmarkSpecifics().title()); |
| 1497 EXPECT_EQ(url, node.GetBookmarkSpecifics().url()); | 1497 EXPECT_EQ(url, node.GetBookmarkSpecifics().url()); |
| 1498 } | 1498 } |
| 1499 } | 1499 } |
| 1500 | 1500 |
| 1501 } // namespace browser_sync | 1501 } // namespace browser_sync |
| OLD | NEW |