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

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

Issue 2224193002: [Offline pages] Add ntp suggestions as a new namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad merge Created 4 years, 4 months 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 "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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 EXPECT_EQ(policy.name_space, kCCTNamespace); 70 EXPECT_EQ(policy.name_space, kCCTNamespace);
71 EXPECT_TRUE(isTemporary(policy)); 71 EXPECT_TRUE(isTemporary(policy));
72 } 72 }
73 73
74 TEST_F(ClientPolicyControllerTest, CheckDownloadDefined) { 74 TEST_F(ClientPolicyControllerTest, CheckDownloadDefined) {
75 OfflinePageClientPolicy policy = controller()->GetPolicy(kDownloadNamespace); 75 OfflinePageClientPolicy policy = controller()->GetPolicy(kDownloadNamespace);
76 EXPECT_EQ(policy.name_space, kDownloadNamespace); 76 EXPECT_EQ(policy.name_space, kDownloadNamespace);
77 EXPECT_FALSE(isTemporary(policy)); 77 EXPECT_FALSE(isTemporary(policy));
78 } 78 }
79 79
80 TEST_F(ClientPolicyControllerTest, CheckNTPSuggestionsDefined) {
81 OfflinePageClientPolicy policy =
82 controller()->GetPolicy(kNTPSuggestionsNamespace);
83 EXPECT_EQ(policy.name_space, kNTPSuggestionsNamespace);
84 EXPECT_FALSE(isTemporary(policy));
85 }
86
80 } // namespace offline_pages 87 } // namespace offline_pages
OLDNEW
« no previous file with comments | « components/offline_pages/client_policy_controller.cc ('k') | components/offline_pages/offline_page_model_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698