| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "components/offline_pages/client_namespace_constants.h" | 9 #include "components/offline_pages/client_namespace_constants.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 EXPECT_FALSE(controller()->IsRemovedOnCacheReset(kDownloadNamespace)); | 88 EXPECT_FALSE(controller()->IsRemovedOnCacheReset(kDownloadNamespace)); |
| 89 EXPECT_TRUE(controller()->IsSupportedByDownload(kDownloadNamespace)); | 89 EXPECT_TRUE(controller()->IsSupportedByDownload(kDownloadNamespace)); |
| 90 } | 90 } |
| 91 | 91 |
| 92 TEST_F(ClientPolicyControllerTest, CheckNTPSuggestionsDefined) { | 92 TEST_F(ClientPolicyControllerTest, CheckNTPSuggestionsDefined) { |
| 93 OfflinePageClientPolicy policy = | 93 OfflinePageClientPolicy policy = |
| 94 controller()->GetPolicy(kNTPSuggestionsNamespace); | 94 controller()->GetPolicy(kNTPSuggestionsNamespace); |
| 95 EXPECT_EQ(policy.name_space, kNTPSuggestionsNamespace); | 95 EXPECT_EQ(policy.name_space, kNTPSuggestionsNamespace); |
| 96 EXPECT_FALSE(isTemporary(policy)); | 96 EXPECT_FALSE(isTemporary(policy)); |
| 97 EXPECT_TRUE(controller()->IsRemovedOnCacheReset(kNTPSuggestionsNamespace)); | 97 EXPECT_TRUE(controller()->IsRemovedOnCacheReset(kNTPSuggestionsNamespace)); |
| 98 EXPECT_FALSE(controller()->IsSupportedByDownload(kNTPSuggestionsNamespace)); | 98 EXPECT_TRUE(controller()->IsSupportedByDownload(kNTPSuggestionsNamespace)); |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace offline_pages | 101 } // namespace offline_pages |
| OLD | NEW |