| 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/offline_pages/client_policy_controller.h" | 5 #include "components/offline_pages/client_policy_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 ExpectRecentTab(kDownloadNamespace, false); | 135 ExpectRecentTab(kDownloadNamespace, false); |
| 136 ExpectOnlyOriginalTab(kDownloadNamespace, false); | 136 ExpectOnlyOriginalTab(kDownloadNamespace, false); |
| 137 } | 137 } |
| 138 | 138 |
| 139 TEST_F(ClientPolicyControllerTest, CheckNTPSuggestionsDefined) { | 139 TEST_F(ClientPolicyControllerTest, CheckNTPSuggestionsDefined) { |
| 140 OfflinePageClientPolicy policy = | 140 OfflinePageClientPolicy policy = |
| 141 controller()->GetPolicy(kNTPSuggestionsNamespace); | 141 controller()->GetPolicy(kNTPSuggestionsNamespace); |
| 142 EXPECT_EQ(policy.name_space, kNTPSuggestionsNamespace); | 142 EXPECT_EQ(policy.name_space, kNTPSuggestionsNamespace); |
| 143 EXPECT_FALSE(isTemporary(policy)); | 143 EXPECT_FALSE(isTemporary(policy)); |
| 144 EXPECT_TRUE(controller()->IsRemovedOnCacheReset(kNTPSuggestionsNamespace)); | 144 EXPECT_TRUE(controller()->IsRemovedOnCacheReset(kNTPSuggestionsNamespace)); |
| 145 ExpectDownloadSupport(kNTPSuggestionsNamespace, false); | 145 ExpectDownloadSupport(kNTPSuggestionsNamespace, true); |
| 146 ExpectRecentTab(kNTPSuggestionsNamespace, false); | 146 ExpectRecentTab(kNTPSuggestionsNamespace, false); |
| 147 ExpectOnlyOriginalTab(kNTPSuggestionsNamespace, false); | 147 ExpectOnlyOriginalTab(kNTPSuggestionsNamespace, false); |
| 148 } | 148 } |
| 149 | 149 |
| 150 } // namespace offline_pages | 150 } // namespace offline_pages |
| OLD | NEW |