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

Unified Diff: components/offline_pages/downloads/download_notifying_observer_unittest.cc

Issue 2295593002: [Offline Pages] Check for the appropriate namespace when showing notifications. (Closed)
Patch Set: Add comment. 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 side-by-side diff with in-line comments
Download patch
Index: components/offline_pages/downloads/download_notifying_observer_unittest.cc
diff --git a/components/offline_pages/downloads/download_notifying_observer_unittest.cc b/components/offline_pages/downloads/download_notifying_observer_unittest.cc
index 3606f57a5cd0110789784ec2cb7aaf5ffe39e62d..bd49c3efaa4f4c9b899db08fe87c0f93055868a4 100644
--- a/components/offline_pages/downloads/download_notifying_observer_unittest.cc
+++ b/components/offline_pages/downloads/download_notifying_observer_unittest.cc
@@ -228,4 +228,18 @@ TEST_F(DownloadNotifyingObserverTest, OnCompletedFailure) {
EXPECT_EQ(kTestCreationTime, notifier()->download_item()->start_time);
}
+TEST_F(DownloadNotifyingObserverTest, NamespacesNotVisibleInUI) {
+ std::vector<std::string> name_spaces = {
+ kBookmarkNamespace, kLastNNamespace, kCCTNamespace,
+ kNTPSuggestionsNamespace, kDefaultNamespace};
+
+ for (auto name_space : name_spaces) {
+ ClientId invisible_client_id(name_space, kTestGuid);
+ SavePageRequest request(kTestOfflineId, GURL(kTestUrl), invisible_client_id,
+ kTestCreationTime, kTestUserRequested);
+ observer()->OnAdded(request);
+ EXPECT_EQ(LastNotificationType::NONE, notifier()->last_notification_type());
+ }
+}
+
} // namespace offline_pages

Powered by Google App Engine
This is Rietveld 408576698