OLD | NEW |
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 Loading... |
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 |
OLD | NEW |