| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/reading_list/ios/reading_list_store.h" | 5 #include "components/reading_list/core/reading_list_store.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 14 #include "base/test/simple_test_clock.h" | 14 #include "base/test/simple_test_clock.h" |
| 15 #include "components/reading_list/ios/reading_list_model_impl.h" | 15 #include "components/reading_list/core/reading_list_model_impl.h" |
| 16 #include "components/sync/model/fake_model_type_change_processor.h" | 16 #include "components/sync/model/fake_model_type_change_processor.h" |
| 17 #include "components/sync/model/model_type_store_test_util.h" | 17 #include "components/sync/model/model_type_store_test_util.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 // Tests that the transition from |entryA| to |entryB| is possible (|possible| | 22 // Tests that the transition from |entryA| to |entryB| is possible (|possible| |
| 23 // is true) or not. | 23 // is true) or not. |
| 24 void ExpectAB(const sync_pb::ReadingListSpecifics& entryA, | 24 void ExpectAB(const sync_pb::ReadingListSpecifics& entryA, |
| 25 const sync_pb::ReadingListSpecifics& entryB, | 25 const sync_pb::ReadingListSpecifics& entryB, |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 entryB.set_status(status_oder[index_a]); | 449 entryB.set_status(status_oder[index_a]); |
| 450 ExpectAB(entryA, entryB, true); | 450 ExpectAB(entryA, entryB, true); |
| 451 ExpectAB(entryB, entryA, true); | 451 ExpectAB(entryB, entryA, true); |
| 452 for (int index_b = index_a + 1; index_b < 3; index_b++) { | 452 for (int index_b = index_a + 1; index_b < 3; index_b++) { |
| 453 entryB.set_status(status_oder[index_b]); | 453 entryB.set_status(status_oder[index_b]); |
| 454 ExpectAB(entryA, entryB, true); | 454 ExpectAB(entryA, entryB, true); |
| 455 ExpectAB(entryB, entryA, false); | 455 ExpectAB(entryB, entryA, false); |
| 456 } | 456 } |
| 457 } | 457 } |
| 458 } | 458 } |
| OLD | NEW |