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

Unified Diff: Source/platform/weborigin/KURLTest.cpp

Issue 234853002: Fix KURL::copy such that it also copies m_innerURL when available (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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
« Source/platform/weborigin/KURL.cpp ('K') | « Source/platform/weborigin/KURL.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/weborigin/KURLTest.cpp
diff --git a/Source/platform/weborigin/KURLTest.cpp b/Source/platform/weborigin/KURLTest.cpp
index 27c2e81165ef29b92f0e12d2ac902c1ecea90594..9d5d7510208256dd6efd091fc5e075d8be8e58de 100644
--- a/Source/platform/weborigin/KURLTest.cpp
+++ b/Source/platform/weborigin/KURLTest.cpp
@@ -601,6 +601,18 @@ TEST(KURLTest, DeepCopy)
EXPECT_NE(dest.string().impl(), src.string().impl());
}
+TEST(KURLTest, DeepCopyInnerURL)
+{
+ const char url[] = "filesystem:http://www.google.com/temporary/test.txt";
+ const char innerURL[] = "http://www.google.com/temporary";
+ WebCore::KURL src(WebCore::ParsedURLString, url);
+ EXPECT_TRUE(src.string() == url);
+ EXPECT_TRUE(src.innerURL()->string() == innerURL);
+ WebCore::KURL dest = src.copy();
+ EXPECT_TRUE(dest.string() == url);
+ EXPECT_TRUE(dest.innerURL()->string() == innerURL);
+}
+
TEST(KURLTest, LastPathComponent)
{
WebCore::KURL url1(WebCore::ParsedURLString, "http://host/path/to/file.txt");
« Source/platform/weborigin/KURL.cpp ('K') | « Source/platform/weborigin/KURL.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698