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 "chrome/browser/ntp_snippets/download_suggestions_provider.h" | 5 #include "chrome/browser/ntp_snippets/download_suggestions_provider.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 break; | 69 break; |
70 case CategoryStatus::NOT_PROVIDED: | 70 case CategoryStatus::NOT_PROVIDED: |
71 os << "NOT_PROVIDED"; | 71 os << "NOT_PROVIDED"; |
72 break; | 72 break; |
73 case CategoryStatus::ALL_SUGGESTIONS_EXPLICITLY_DISABLED: | 73 case CategoryStatus::ALL_SUGGESTIONS_EXPLICITLY_DISABLED: |
74 os << "ALL_SUGGESTIONS_EXPLICITLY_DISABLED"; | 74 os << "ALL_SUGGESTIONS_EXPLICITLY_DISABLED"; |
75 break; | 75 break; |
76 case CategoryStatus::CATEGORY_EXPLICITLY_DISABLED: | 76 case CategoryStatus::CATEGORY_EXPLICITLY_DISABLED: |
77 os << "CATEGORY_EXPLICITLY_DISABLED"; | 77 os << "CATEGORY_EXPLICITLY_DISABLED"; |
78 break; | 78 break; |
79 case CategoryStatus::SIGNED_OUT: | |
80 os << "SIGNED_OUT"; | |
81 break; | |
82 case CategoryStatus::LOADING_ERROR: | 79 case CategoryStatus::LOADING_ERROR: |
83 os << "LOADING_ERROR"; | 80 os << "LOADING_ERROR"; |
84 break; | 81 break; |
85 } | 82 } |
86 return os; | 83 return os; |
87 } | 84 } |
88 | 85 |
89 } // namespace ntp_snippets | 86 } // namespace ntp_snippets |
90 | 87 |
91 namespace { | 88 namespace { |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1107 // it has been visited recently. | 1104 // it has been visited recently. |
1108 EXPECT_CALL( | 1105 EXPECT_CALL( |
1109 *observer(), | 1106 *observer(), |
1110 OnNewSuggestions(_, downloads_category(), | 1107 OnNewSuggestions(_, downloads_category(), |
1111 UnorderedElementsAre(HasUrl("http://dummy.com/0")))); | 1108 UnorderedElementsAre(HasUrl("http://dummy.com/0")))); |
1112 auto test_clock = base::MakeUnique<base::SimpleTestClock>(); | 1109 auto test_clock = base::MakeUnique<base::SimpleTestClock>(); |
1113 test_clock->SetNow(now); | 1110 test_clock->SetNow(now); |
1114 CreateProvider(/*show_assets=*/false, /*show_offline_pages=*/true, | 1111 CreateProvider(/*show_assets=*/false, /*show_offline_pages=*/true, |
1115 std::move(test_clock)); | 1112 std::move(test_clock)); |
1116 } | 1113 } |
OLD | NEW |