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

Side by Side Diff: components/offline_pages/client_policy_controller_unittest.cc

Issue 2473953006: Enable downloads UI for NTP-saved pages. (Closed)
Patch Set: Tests now pass. Created 4 years, 1 month 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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698