OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "core/testing/UnionTypesTest.h" | 5 #include "core/testing/UnionTypesTest.h" |
6 | 6 |
7 #include "wtf/text/StringBuilder.h" | 7 #include "platform/wtf/text/StringBuilder.h" |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
11 void UnionTypesTest::doubleOrStringOrStringArrayAttribute( | 11 void UnionTypesTest::doubleOrStringOrStringArrayAttribute( |
12 DoubleOrStringOrStringArray& double_or_string_or_string_array) { | 12 DoubleOrStringOrStringArray& double_or_string_or_string_array) { |
13 switch (attribute_type_) { | 13 switch (attribute_type_) { |
14 case kSpecificTypeNone: | 14 case kSpecificTypeNone: |
15 // Default value is zero (of double). | 15 // Default value is zero (of double). |
16 double_or_string_or_string_array.setDouble(0); | 16 double_or_string_or_string_array.setDouble(0); |
17 break; | 17 break; |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 builder.Append("sequence: ["); | 164 builder.Append("sequence: ["); |
165 for (const String& item : sequence) { | 165 for (const String& item : sequence) { |
166 DCHECK(!item.IsNull()); | 166 DCHECK(!item.IsNull()); |
167 builder.Append(item); | 167 builder.Append(item); |
168 builder.Append(", "); | 168 builder.Append(", "); |
169 } | 169 } |
170 return builder.Substring(0, builder.length() - 2) + "]"; | 170 return builder.Substring(0, builder.length() - 2) + "]"; |
171 } | 171 } |
172 | 172 |
173 } // namespace blink | 173 } // namespace blink |
OLD | NEW |