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

Unified Diff: components/offline_pages/core/downloads/download_ui_adapter_unittest.cc

Issue 2560573003: [Offline Pages] Convert Download UI Adapter to using OfflinePageAdded (Closed)
Patch Set: rebase Created 4 years 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/core/downloads/download_ui_adapter.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/core/downloads/download_ui_adapter_unittest.cc
diff --git a/components/offline_pages/core/downloads/download_ui_adapter_unittest.cc b/components/offline_pages/core/downloads/download_ui_adapter_unittest.cc
index 8ad39c5b0e34365e9edec0199d4664813498eef0..c65dc37d075320fa2d36345da55abcef813f3af7 100644
--- a/components/offline_pages/core/downloads/download_ui_adapter_unittest.cc
+++ b/components/offline_pages/core/downloads/download_ui_adapter_unittest.cc
@@ -242,20 +242,14 @@ TEST_F(DownloadUIAdapterTest, ItemWithWrongNamespace) {
EXPECT_EQ(0UL, added_guids.size());
}
-TEST_F(DownloadUIAdapterTest, ItemUpdated) {
+TEST_F(DownloadUIAdapterTest, ItemAdded) {
PumpLoop();
// Clear the initial page and replace it with updated one.
model->pages.clear();
- // Add page with the same offline_id/guid, notify adapter.
- // This should generate 'updated' notification.
- OfflinePageItem page1(GURL(kTestUrl), kTestOfflineId1, kTestClientId1,
- base::FilePath(kTestFilePath), kFileSize,
- kTestCreationTime);
// Add a new page which did not exist before.
OfflinePageItem page2(GURL(kTestUrl), kTestOfflineId2, kTestClientId2,
base::FilePath(kTestFilePath), kFileSize,
kTestCreationTime);
- model->AddPageAndNotifyAdapter(page1);
model->AddPageAndNotifyAdapter(page2);
PumpLoop();
EXPECT_EQ(1UL, added_guids.size());
« no previous file with comments | « components/offline_pages/core/downloads/download_ui_adapter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698