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
3 // found in the LICENSE file.
5 #ifndef UnionTypesTest_h
6 #define UnionTypesTest_h
8 #include "bindings/core/v8/UnionTypesCore.h"
9 #include "wtf/text/WTFString.h"
13 class UnionTypesTest final : public GarbageCollectedFinalized<UnionTypesTest>, public ScriptWrappable {
14 DEFINE_WRAPPERTYPEINFO();
16 static UnionTypesTest* create()
18 return new UnionTypesTest();
20 virtual ~UnionTypesTest() { }
22 void doubleOrStringAttribute(DoubleOrString&);
23 void setDoubleOrStringAttribute(const DoubleOrString&);
25 String doubleOrStringArg(DoubleOrString&);
27 void trace(Visitor*) { }
31 : m_attributeType(SpecificTypeNone)
35 enum AttributeSpecificType {
40 AttributeSpecificType m_attributeType;
41 double m_attributeDouble;
42 String m_attributeString;
47 #endif // UnionTypesTest_h