Index: components/reading_list/offline_url_utils_unittest.cc |
diff --git a/ios/chrome/browser/reading_list/offline_url_utils_unittest.cc b/components/reading_list/offline_url_utils_unittest.cc |
similarity index 59% |
copy from ios/chrome/browser/reading_list/offline_url_utils_unittest.cc |
copy to components/reading_list/offline_url_utils_unittest.cc |
index bc4586eb3d57419a7305e740630dd04ece53ae8d..7a371d3a56e72f72685c8a85b2d86a230e3b8780 100644 |
--- a/ios/chrome/browser/reading_list/offline_url_utils_unittest.cc |
+++ b/components/reading_list/offline_url_utils_unittest.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "ios/chrome/browser/reading_list/offline_url_utils.h" |
+#include "components/reading_list/offline_url_utils.h" |
#include <string> |
@@ -55,35 +55,3 @@ TEST(OfflineURLUtilsTest, OfflinePagePathTest) { |
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"); |
- GURL distilled_url = reading_list::DistilledURLForPath(page_path); |
- EXPECT_EQ("chrome://offline/MD5/page.html", distilled_url.spec()); |
-} |
- |
-// Checks the file path for chrome://offline/MD5/page.html is |
-// file://profile_path/Offline/MD5/page.html. |
-// Checks the resource root for chrome://offline/MD5/page.html is |
-// file://profile_path/Offline/MD5 |
-TEST(OfflineURLUtilsTest, FileURLForDistilledURLTest) { |
- base::FilePath profile_path("/profile_path"); |
- GURL file_url = |
- reading_list::FileURLForDistilledURL(GURL(), profile_path, nullptr); |
- EXPECT_FALSE(file_url.is_valid()); |
- |
- GURL distilled_url("chrome://offline/MD5/page.html"); |
- file_url = reading_list::FileURLForDistilledURL(distilled_url, profile_path, |
- nullptr); |
- EXPECT_TRUE(file_url.is_valid()); |
- EXPECT_TRUE(file_url.SchemeIsFile()); |
- EXPECT_EQ("/profile_path/Offline/MD5/page.html", file_url.path()); |
- |
- GURL resource_url; |
- file_url = reading_list::FileURLForDistilledURL(distilled_url, profile_path, |
- &resource_url); |
- EXPECT_TRUE(resource_url.is_valid()); |
- EXPECT_TRUE(resource_url.SchemeIsFile()); |
- EXPECT_EQ("/profile_path/Offline/MD5/", resource_url.path()); |
-} |