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

Unified Diff: Source/core/html/DOMFormDataTest.cpp

Issue 1325893005: Rename DOMFormData to FormData. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
« no previous file with comments | « Source/core/html/DOMFormData.cpp ('k') | Source/core/html/FormData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/DOMFormDataTest.cpp
diff --git a/Source/core/html/DOMFormDataTest.cpp b/Source/core/html/DOMFormDataTest.cpp
deleted file mode 100644
index 09d2107e65a606015d9b9b7e6740b309a76e2947..0000000000000000000000000000000000000000
--- a/Source/core/html/DOMFormDataTest.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-// 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/html/DOMFormData.h"
-
-#include "core/html/FormDataList.h"
-#include <gtest/gtest.h>
-
-namespace blink {
-
-TEST(DOMFormDataTest, opacityGet)
-{
- DOMFormData* fd = DOMFormData::create(UTF8Encoding());
- fd->append("name1", "value1");
-
- FileOrUSVString result;
- fd->get("name1", result);
- EXPECT_TRUE(result.isUSVString());
- EXPECT_EQ("value1", result.getAsUSVString());
-
- const FormDataList::Item& entry = fd->items()[0];
- EXPECT_STREQ("name1", entry.key().data());
- EXPECT_STREQ("value1", entry.data().data());
-
- fd->makeOpaque();
-
- // Web-exposed interface should be opaque.
- FileOrUSVString opaqueResult;
- fd->get("name1", opaqueResult);
- EXPECT_TRUE(opaqueResult.isNull());
-
- // Internal interface should be uneffected.
- const FormDataList::Item& entry2 = fd->items()[0];
- EXPECT_STREQ("name1", entry2.key().data());
- EXPECT_STREQ("value1", entry2.data().data());
-}
-
-TEST(DOMFormDataTest, opacityGetAll)
-{
- DOMFormData* fd = DOMFormData::create(UTF8Encoding());
- fd->append("name1", "value1");
-
- HeapVector<FormDataEntryValue> results = fd->getAll("name1");
- EXPECT_EQ(1u, results.size());
- EXPECT_TRUE(results[0].isUSVString());
- EXPECT_EQ("value1", results[0].getAsUSVString());
-
- EXPECT_EQ(1u, fd->size());
-
- fd->makeOpaque();
-
- // Web-exposed interface should be opaque.
- results = fd->getAll("name1");
- EXPECT_EQ(0u, results.size());
-
- // Internal interface should be uneffected.
- EXPECT_EQ(1u, fd->size());
-}
-
-TEST(DOMFormDataTest, opacityHas)
-{
- DOMFormData* fd = DOMFormData::create(UTF8Encoding());
- fd->append("name1", "value1");
-
- EXPECT_TRUE(fd->has("name1"));
- EXPECT_EQ(1u, fd->size());
-
- fd->makeOpaque();
-
- // Web-exposed interface should be opaque.
- EXPECT_FALSE(fd->has("name1"));
-
- // Internal collection should be uneffected.
- EXPECT_EQ(1u, fd->size());
-}
-
-} // namespace blink
« no previous file with comments | « Source/core/html/DOMFormData.cpp ('k') | Source/core/html/FormData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698