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

Unified Diff: third_party/WebKit/Source/core/dom/URLSearchParamsTest.cpp

Issue 1998563002: Fix URLSearchParams to use the right encoding algorithm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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
Index: third_party/WebKit/Source/core/dom/URLSearchParamsTest.cpp
diff --git a/third_party/WebKit/Source/core/dom/URLSearchParamsTest.cpp b/third_party/WebKit/Source/core/dom/URLSearchParamsTest.cpp
index 70915d0f17f43dba16351b49b7aafcbe47e6d6cd..e5e1d19080c481f60cdf41c9f10570adf01179df 100644
--- a/third_party/WebKit/Source/core/dom/URLSearchParamsTest.cpp
+++ b/third_party/WebKit/Source/core/dom/URLSearchParamsTest.cpp
@@ -10,16 +10,16 @@ namespace blink {
using URLSearchParamsTest = ::testing::Test;
-TEST_F(URLSearchParamsTest, EncodedFormData)
+TEST_F(URLSearchParamsTest, ToEncodedFormData)
{
- URLSearchParams* params = new URLSearchParams(String());
- EXPECT_EQ("", params->encodeFormData()->flattenToString());
+ URLSearchParams* params = URLSearchParams::create(String());
+ EXPECT_EQ("", params->toEncodedFormData()->flattenToString());
params->append("name", "value");
- EXPECT_EQ("name=value", params->encodeFormData()->flattenToString());
+ EXPECT_EQ("name=value", params->toEncodedFormData()->flattenToString());
params->append("another name", "another value");
- EXPECT_EQ("name=value&another+name=another+value", params->encodeFormData()->flattenToString());
+ EXPECT_EQ("name=value&another+name=another+value", params->toEncodedFormData()->flattenToString());
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/dom/URLSearchParams.cpp ('k') | third_party/WebKit/Source/core/loader/FormSubmission.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698