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

Unified Diff: ios/chrome/browser/reading_list/offline_url_utils_unittest.cc

Issue 2514333003: Componentize Reading List (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/reading_list/offline_url_utils_unittest.cc
diff --git a/ios/chrome/browser/reading_list/offline_url_utils_unittest.cc b/ios/chrome/browser/reading_list/offline_url_utils_unittest.cc
index bc4586eb3d57419a7305e740630dd04ece53ae8d..cb3bd9b0f86d77f0d622a48aa54b91d14bde0551 100644
--- a/ios/chrome/browser/reading_list/offline_url_utils_unittest.cc
+++ b/ios/chrome/browser/reading_list/offline_url_utils_unittest.cc
@@ -10,52 +10,6 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
-// Checks the root directory of offline pages.
-TEST(OfflineURLUtilsTest, OfflineRootDirectoryPathTest) {
- base::FilePath profile_path("/profile_path");
- base::FilePath offline_directory =
- reading_list::OfflineRootDirectoryPath(profile_path);
- EXPECT_EQ("/profile_path/Offline", offline_directory.value());
-}
-
-// Checks the offline page directory is the MD5 of the URL
-TEST(OfflineURLUtilsTest, OfflineURLDirectoryIDTest) {
- GURL url("http://www.google.com/test");
- // MD5 of "http://www.google.com/test"
- std::string md5 = "0090071ef710946a1263c276284bb3b8";
- std::string directory_id = reading_list::OfflineURLDirectoryID(url);
- EXPECT_EQ(md5, directory_id);
-}
-
-// Checks the offline page directory is
-// |profile_path|/Offline/OfflineURLDirectoryID;
-TEST(OfflineURLUtilsTest, OfflineURLDirectoryAbsolutePathTest) {
- base::FilePath profile_path("/profile_path");
- GURL url("http://www.google.com/test");
- base::FilePath offline_directory =
- reading_list::OfflineURLDirectoryAbsolutePath(profile_path, url);
- EXPECT_EQ("/profile_path/Offline/0090071ef710946a1263c276284bb3b8",
- offline_directory.value());
-}
-
-// Checks the offline page absolute path is
-// |profile_path|/Offline/OfflineURLDirectoryID/page.html;
-TEST(OfflineURLUtilsTest, OfflinePageAbsolutePathTest) {
- base::FilePath profile_path("/profile_path");
- GURL url("http://www.google.com/test");
- base::FilePath offline_page =
- reading_list::OfflinePageAbsolutePath(profile_path, url);
- EXPECT_EQ("/profile_path/Offline/0090071ef710946a1263c276284bb3b8/page.html",
- offline_page.value());
-}
-
-// Checks the offline page path is OfflineURLDirectoryID/page.html;
-TEST(OfflineURLUtilsTest, OfflinePagePathTest) {
- GURL url("http://www.google.com/test");
- base::FilePath offline_page = reading_list::OfflinePagePath(url);
- EXPECT_EQ("0090071ef710946a1263c276284bb3b8/page.html", offline_page.value());
-}
-
// Checks the distilled URL for the page is chrome://offline/MD5/page.html;
TEST(OfflineURLUtilsTest, DistilledURLForPathTest) {
base::FilePath page_path("MD5/page.html");
« no previous file with comments | « ios/chrome/browser/reading_list/offline_url_utils.cc ('k') | ios/chrome/browser/reading_list/proto/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698