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

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

Issue 2503853004: Support getting offline pages also by original URL (Closed)
Patch Set: Make NTP redirect work per comment 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/offline_page_metadata_store.h" 5 #include "components/offline_pages/offline_page_metadata_store.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 statement.BindInt(4, 1); 214 statement.BindInt(4, 1);
215 statement.BindCString(5, kTestClientNamespace); 215 statement.BindCString(5, kTestClientNamespace);
216 statement.BindString(6, kTestClientId2.id); 216 statement.BindString(6, kTestClientId2.id);
217 statement.BindCString(7, kTestURL); 217 statement.BindCString(7, kTestURL);
218 statement.BindString(8, base::FilePath(kFilePath).MaybeAsASCII()); 218 statement.BindString(8, base::FilePath(kFilePath).MaybeAsASCII());
219 statement.BindInt64(9, base::Time::Now().ToInternalValue()); 219 statement.BindInt64(9, base::Time::Now().ToInternalValue());
220 statement.BindString16(10, base::UTF8ToUTF16("Test title")); 220 statement.BindString16(10, base::UTF8ToUTF16("Test title"));
221 ASSERT_TRUE(statement.Run()); 221 ASSERT_TRUE(statement.Run());
222 ASSERT_TRUE(connection.DoesTableExist(OFFLINE_PAGES_TABLE_V1)); 222 ASSERT_TRUE(connection.DoesTableExist(OFFLINE_PAGES_TABLE_V1));
223 ASSERT_TRUE(connection.DoesColumnExist(OFFLINE_PAGES_TABLE_V1, "title")); 223 ASSERT_TRUE(connection.DoesColumnExist(OFFLINE_PAGES_TABLE_V1, "title"));
224 ASSERT_FALSE(
225 connection.DoesColumnExist(OFFLINE_PAGES_TABLE_V1, "original_url"));
224 } 226 }
225 227
226 class OfflinePageMetadataStoreFactory { 228 class OfflinePageMetadataStoreFactory {
227 public: 229 public:
228 OfflinePageMetadataStore* BuildStore(const base::FilePath& file_path) { 230 OfflinePageMetadataStore* BuildStore(const base::FilePath& file_path) {
229 OfflinePageMetadataStoreSQL* store = new OfflinePageMetadataStoreSQL( 231 OfflinePageMetadataStoreSQL* store = new OfflinePageMetadataStoreSQL(
230 base::ThreadTaskRunnerHandle::Get(), file_path); 232 base::ThreadTaskRunnerHandle::Get(), file_path);
231 return store; 233 return store;
232 } 234 }
233 235
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 base::Unretained(this))); 880 base::Unretained(this)));
879 PumpLoop(); 881 PumpLoop();
880 882
881 EXPECT_EQ(LOAD, last_called_callback_); 883 EXPECT_EQ(LOAD, last_called_callback_);
882 EXPECT_EQ(STATUS_TRUE, last_status_); 884 EXPECT_EQ(STATUS_TRUE, last_status_);
883 ASSERT_EQ(0U, offline_pages_.size()); 885 ASSERT_EQ(0U, offline_pages_.size());
884 } 886 }
885 887
886 } // namespace 888 } // namespace
887 } // namespace offline_pages 889 } // namespace offline_pages
OLDNEW
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_utils.cc ('k') | components/offline_pages/offline_page_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698