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

Side by Side Diff: Source/core/html/DOMFormDataTest.cpp

Issue 1308183006: Move FormDataList::deleteEntry() and hasEntry() to DOMFormData. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/html/DOMFormData.h" 6 #include "core/html/DOMFormData.h"
7 7
8 #include "core/html/FormDataList.h" 8 #include "core/html/FormDataList.h"
9 #include <gtest/gtest.h> 9 #include <gtest/gtest.h>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // Internal interface should be uneffected. 56 // Internal interface should be uneffected.
57 EXPECT_EQ(1u, fd->size()); 57 EXPECT_EQ(1u, fd->size());
58 } 58 }
59 59
60 TEST(DOMFormDataTest, opacityHas) 60 TEST(DOMFormDataTest, opacityHas)
61 { 61 {
62 DOMFormData* fd = DOMFormData::create(UTF8Encoding()); 62 DOMFormData* fd = DOMFormData::create(UTF8Encoding());
63 fd->append("name1", "value1"); 63 fd->append("name1", "value1");
64 64
65 EXPECT_TRUE(fd->has("name1")); 65 EXPECT_TRUE(fd->has("name1"));
66 EXPECT_TRUE(fd->hasEntry("name1")); 66 EXPECT_EQ(1u, fd->size());
67 67
68 fd->makeOpaque(); 68 fd->makeOpaque();
69 69
70 // Web-exposed interface should be opaque. 70 // Web-exposed interface should be opaque.
71 EXPECT_FALSE(fd->has("name1")); 71 EXPECT_FALSE(fd->has("name1"));
72 72
73 // Internal interface should be uneffected. 73 // Internal collection should be uneffected.
74 EXPECT_TRUE(fd->hasEntry("name1")); 74 EXPECT_EQ(1u, fd->size());
75 } 75 }
76 76
77 } // namespace blink 77 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698