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

Side by Side Diff: components/history/core/browser/typed_url_syncable_service_unittest.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 months 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "components/history/core/browser/typed_url_syncable_service.h" 5 #include "components/history/core/browser/typed_url_syncable_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
13 #include "base/files/scoped_temp_dir.h" 13 #include "base/files/scoped_temp_dir.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/message_loop/message_loop.h" 17 #include "base/message_loop/message_loop.h"
18 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
19 #include "base/threading/thread_task_runner_handle.h" 19 #include "base/threading/thread_task_runner_handle.h"
20 #include "components/history/core/browser/history_backend.h" 20 #include "components/history/core/browser/history_backend.h"
21 #include "components/history/core/browser/history_backend_client.h" 21 #include "components/history/core/browser/history_backend_client.h"
22 #include "components/history/core/browser/history_database_params.h" 22 #include "components/history/core/browser/history_database_params.h"
23 #include "components/history/core/browser/history_types.h" 23 #include "components/history/core/browser/history_types.h"
24 #include "components/history/core/browser/in_memory_history_backend.h" 24 #include "components/history/core/browser/in_memory_history_backend.h"
25 #include "components/history/core/test/test_history_database.h" 25 #include "components/history/core/test/test_history_database.h"
26 #include "sync/api/fake_sync_change_processor.h" 26 #include "components/sync/api/fake_sync_change_processor.h"
27 #include "sync/api/sync_change_processor_wrapper_for_test.h" 27 #include "components/sync/api/sync_change_processor_wrapper_for_test.h"
28 #include "sync/api/sync_error.h" 28 #include "components/sync/api/sync_error.h"
29 #include "sync/api/sync_error_factory_mock.h" 29 #include "components/sync/api/sync_error_factory_mock.h"
30 #include "sync/internal_api/public/attachments/attachment_service_proxy_for_test .h" 30 #include "components/sync/core/attachments/attachment_service_proxy_for_test.h"
31 #include "sync/protocol/sync.pb.h" 31 #include "components/sync/protocol/sync.pb.h"
32 #include "sync/protocol/typed_url_specifics.pb.h" 32 #include "components/sync/protocol/typed_url_specifics.pb.h"
33 #include "testing/gtest/include/gtest/gtest.h" 33 #include "testing/gtest/include/gtest/gtest.h"
34 34
35 using history::HistoryBackend; 35 using history::HistoryBackend;
36 using history::URLID; 36 using history::URLID;
37 using history::URLRow; 37 using history::URLRow;
38 using history::URLRows; 38 using history::URLRows;
39 using history::VisitRow; 39 using history::VisitRow;
40 using history::VisitVector; 40 using history::VisitVector;
41 41
42 namespace history { 42 namespace history {
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 // We should not sync the visit with timestamp #1 since it is earlier than 1539 // We should not sync the visit with timestamp #1 since it is earlier than
1540 // any other visit for this URL in the history DB. But we should sync visit 1540 // any other visit for this URL in the history DB. But we should sync visit
1541 // #4. 1541 // #4.
1542 EXPECT_EQ(3U, history_visits.size()); 1542 EXPECT_EQ(3U, history_visits.size());
1543 EXPECT_EQ(2U, history_visits[0].visit_time.ToInternalValue()); 1543 EXPECT_EQ(2U, history_visits[0].visit_time.ToInternalValue());
1544 EXPECT_EQ(3U, history_visits[1].visit_time.ToInternalValue()); 1544 EXPECT_EQ(3U, history_visits[1].visit_time.ToInternalValue());
1545 EXPECT_EQ(4U, history_visits[2].visit_time.ToInternalValue()); 1545 EXPECT_EQ(4U, history_visits[2].visit_time.ToInternalValue());
1546 } 1546 }
1547 1547
1548 } // namespace history 1548 } // namespace history
OLDNEW
« no previous file with comments | « components/history/core/browser/typed_url_syncable_service.cc ('k') | components/history/core/browser/web_history_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698