Chromium Code Reviews| 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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6e27239ce7db6db0bbe4b0cf10616e14a4fab58d |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/dom/URLSearchParamsTest.cpp |
| @@ -0,0 +1,29 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "config.h" |
| +#include "core/dom/URLSearchParams.h" |
| + |
| +#include "platform/heap/Handle.h" |
|
horo
2015/11/18 03:40:52
remove
|
| +#include "platform/network/EncodedFormData.h" |
|
horo
2015/11/18 03:40:52
remove
|
| +#include <gmock/gmock.h> |
|
horo
2015/11/18 03:40:52
remove
|
| +#include <gtest/gtest.h> |
| + |
| +namespace blink { |
| + |
| +using URLSearchParamsTest = ::testing::Test; |
| + |
| +TEST_F(URLSearchParamsTest, EncodedFormData) |
| +{ |
| + URLSearchParams* params = new URLSearchParams(String()); |
| + EXPECT_EQ("", params->encodeFormData()->flattenToString()); |
| + |
| + params->append("name", "value"); |
| + EXPECT_EQ("name=value", params->encodeFormData()->flattenToString()); |
| + |
| + params->append("another name", "another value"); |
| + EXPECT_EQ("name=value&another+name=another+value", params->encodeFormData()->flattenToString()); |
| +} |
| + |
| +} // namespace blink |