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

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: 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
« no previous file with comments | « components/offline_pages/downloads/download_notifying_observer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a14cb2decf2da7c8df7d5abaf17ea2444f2fd40a 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, VisibleInUI) {
fgorski 2016/08/30 16:21:29 nit: NamepsacesNotVisibleInUI
dewittj 2016/08/30 16:29:08 Done.
+ 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
« no previous file with comments | « components/offline_pages/downloads/download_notifying_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698