| 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> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #include "chrome/browser/sync/notifier/sync_notifier.h" | 38 #include "chrome/browser/sync/notifier/sync_notifier.h" |
| 39 #include "chrome/browser/sync/notifier/sync_notifier_observer.h" | 39 #include "chrome/browser/sync/notifier/sync_notifier_observer.h" |
| 40 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h" | 40 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h" |
| 41 #include "chrome/browser/sync/protocol/password_specifics.pb.h" | 41 #include "chrome/browser/sync/protocol/password_specifics.pb.h" |
| 42 #include "chrome/browser/sync/protocol/proto_value_conversions.h" | 42 #include "chrome/browser/sync/protocol/proto_value_conversions.h" |
| 43 #include "chrome/browser/sync/protocol/sync.pb.h" | 43 #include "chrome/browser/sync/protocol/sync.pb.h" |
| 44 #include "chrome/browser/sync/sessions/sync_session.h" | 44 #include "chrome/browser/sync/sessions/sync_session.h" |
| 45 #include "chrome/browser/sync/syncable/directory_manager.h" | 45 #include "chrome/browser/sync/syncable/directory_manager.h" |
| 46 #include "chrome/browser/sync/syncable/syncable.h" | 46 #include "chrome/browser/sync/syncable/syncable.h" |
| 47 #include "chrome/browser/sync/syncable/syncable_id.h" | 47 #include "chrome/browser/sync/syncable/syncable_id.h" |
| 48 #include "chrome/browser/sync/test/engine/test_user_share.h" |
| 48 #include "chrome/browser/sync/util/cryptographer.h" | 49 #include "chrome/browser/sync/util/cryptographer.h" |
| 49 #include "chrome/test/base/values_test_util.h" | 50 #include "chrome/test/base/values_test_util.h" |
| 50 #include "chrome/test/sync/engine/test_user_share.h" | |
| 51 #include "content/browser/browser_thread.h" | 51 #include "content/browser/browser_thread.h" |
| 52 #include "testing/gmock/include/gmock/gmock.h" | 52 #include "testing/gmock/include/gmock/gmock.h" |
| 53 #include "testing/gtest/include/gtest/gtest.h" | 53 #include "testing/gtest/include/gtest/gtest.h" |
| 54 | 54 |
| 55 using browser_sync::Cryptographer; | 55 using browser_sync::Cryptographer; |
| 56 using browser_sync::HasArgsAsList; | 56 using browser_sync::HasArgsAsList; |
| 57 using browser_sync::HasDetailsAsDictionary; | 57 using browser_sync::HasDetailsAsDictionary; |
| 58 using browser_sync::KeyParams; | 58 using browser_sync::KeyParams; |
| 59 using browser_sync::JsArgList; | 59 using browser_sync::JsArgList; |
| 60 using browser_sync::JsBackend; | 60 using browser_sync::JsBackend; |
| (...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1514 ReadNode node(&trans); | 1514 ReadNode node(&trans); |
| 1515 EXPECT_TRUE(node.InitByIdLookup(node1)); | 1515 EXPECT_TRUE(node.InitByIdLookup(node1)); |
| 1516 EXPECT_EQ(syncable::BOOKMARKS, node.GetModelType()); | 1516 EXPECT_EQ(syncable::BOOKMARKS, node.GetModelType()); |
| 1517 EXPECT_EQ(title, node.GetTitle()); | 1517 EXPECT_EQ(title, node.GetTitle()); |
| 1518 EXPECT_EQ(title, node.GetBookmarkSpecifics().title()); | 1518 EXPECT_EQ(title, node.GetBookmarkSpecifics().title()); |
| 1519 EXPECT_EQ(url, node.GetBookmarkSpecifics().url()); | 1519 EXPECT_EQ(url, node.GetBookmarkSpecifics().url()); |
| 1520 } | 1520 } |
| 1521 } | 1521 } |
| 1522 | 1522 |
| 1523 } // namespace browser_sync | 1523 } // namespace browser_sync |
| OLD | NEW |