blob: b8bef086caae37f15cebfa128f6b4d54c478f0a2 [file] [log] [blame]
/*
* Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
enum TestEnum {"", "EnumValue1", "EnumValue2", "EnumValue3"};
interface TestObjectPython {
// TestInterfaceEmpty is used as a stub interface type, for testing behavior
// that should not depend on particular type (beyond "interface or not").
readonly attribute Date readonlyDateAttribute;
readonly attribute DOMString readonlyStringAttribute;
readonly attribute DOMTimeStamp readonlyDOMTimeStampAttribute;
readonly attribute boolean readonlyBooleanAttribute;
readonly attribute byte readonlyByteAttribute;
readonly attribute double readonlyDoubleAttribute;
readonly attribute float readonlyFloatAttribute;
readonly attribute long readonlyLongAttribute;
readonly attribute long long readonlyLongLongAttribute;
readonly attribute octet readonlyOctetAttribute;
readonly attribute short readonlyShortAttribute;
readonly attribute unsigned long readonlyUnsignedLongAttribute;
readonly attribute unsigned long long readonlyUnsignedLongLongAttribute;
readonly attribute unsigned short readonlyUnsignedShortAttribute;
// Non-wrapper types
readonly attribute NodeFilter readonlyNodeFilterAttribute;
readonly attribute SerializedScriptValue readonlySerializedScriptValueAttribute;
readonly attribute any readonlyAnyAttribute;
// DOM Node types
readonly attribute Document readonlyDocumentAttribute;
readonly attribute DocumentFragment readonlyDocumentFragmentAttribute;
readonly attribute DocumentType readonlyDocumentTypeAttribute;
readonly attribute Element readonlyElementAttribute;
readonly attribute Entity readonlyEntityAttribute;
readonly attribute Node readonlyNodeAttribute;
readonly attribute ShadowRoot readonlyShadowRootAttribute;
// Typed arrays
readonly attribute ArrayBuffer readonlyArrayBufferAttribute;
readonly attribute Float32Array readonlyFloat32ArrayAttribute;
readonly attribute Uint8Array readonlyUint8ArrayAttribute;
// Usual case for is_keep_alive_for_gc
readonly attribute TestInterfaceEmpty readonlyTestInterfaceEmptyAttribute;
// Exceptions for is_keep_alive_for_gc
readonly attribute TestInterfaceEmpty self;
readonly attribute Window readonlyWindowAttribute;
readonly attribute HTMLCollection readonlyHTMLCollectionAttribute;
readonly attribute HTMLElement readonlyHTMLElementAttribute;
// arrays
readonly attribute DOMString[] readonlyStringArrayAttribute;
readonly attribute TestInterfaceEmpty[] readonlyTestInterfaceEmptyArrayAttribute;
readonly attribute float[] readonlyFloatArrayAttribute;
// Nullable attributes
readonly attribute DOMString? readonlyNullableStringAttribute;
readonly attribute long? readonlyNullableLongAttribute;
// Enumerations
readonly attribute TestEnum readonlyTestEnumAttribute;
// Static attributes (Blink extension)
static readonly attribute DOMString staticReadonlyStringAttribute;
static readonly attribute long staticReadonlyLongAttribute;
// Miscellaneous special types
readonly attribute EventHandler readonlyEventHandlerAttribute;
readonly attribute Promise readonlyPromiseAttribute;
// Extended attributes
[ActivityLogging=Access] readonly attribute long activityLogAccessReadonlyLongAttribute;
[ActivityLogging=Getter] readonly attribute long activityLogGetterReadonlyLongAttribute;
[CachedAttribute=isValueDirty] readonly attribute any cachedAttributeReadonlyAnyAttribute;
[CallWith=ExecutionContext] readonly attribute any callWithExecutionContextReadonlyAnyAttribute;
[CheckSecurityForNode] readonly attribute Document checkSecurityForNodeReadonlyDocumentAttribute;
[Conditional=Condition] readonly attribute long conditionalReadonlyLongAttribute;
[Conditional=Condition1&Condition2] readonly attribute long conditionalAndReadonlyLongAttribute;
[Conditional=Condition1|Condition2] readonly attribute long conditionalOrReadonlyLongAttribute;
[Custom] readonly attribute long customReadonlyLongAttribute;
[CustomGetter] readonly attribute long customGetterReadonlyLongAttribute;
[Conditional=Condition, Custom] readonly attribute long customReadonlyLongAttribute;
[Conditional=Condition, CustomGetter] readonly attribute long customGetterReadonlyLongAttribute;
[CustomElementCallbacks] readonly attribute long customElementsCallbacksReadonlyLongAttribute;
[DeprecateAs=ReadonlyLongAttribute] readonly attribute long deprecatedReadonlyLongAttribute;
// FIXME: move to TestActiveDOMObject.idl (=> TestCheckSecurity) once
// methods are implemented
[DoNotCheckSecurity] readonly attribute long doNotCheckSecurityReadonlyLongAttribute;
// [DoNotCheckSecurity] readonly attribute long doNotCheckSecurityReadonlyLongAttribute; // FIXME: separate readonly attribute once implement setters
[DoNotCheckSecurityOnGetter] readonly attribute long doNotCheckSecurityOnGetterReadonlyLongAttribute;
[DoNotCheckSecurityOnSetter] readonly attribute long doNotCheckSecurityOnSetterReadonlyLongAttribute;
[EnforceRange] readonly attribute long enforceRangeReadonlyLongAttribute; // FIXME: properly MUST NOT appear on read only attribute; will correct when implement setters
[GetterRaisesException] readonly attribute long getterRaisesExceptionReadonlyLongAttribute;
[ImplementedAs=implementedAsName] readonly attribute long implementedAsReadonlyLongAttribute;
[Custom, ImplementedAs=implementedAsNameWithCustom] readonly attribute long customImplementedAsReadonlyLongAttribute;
[CustomGetter, ImplementedAs=implementedAsNameWithCustomGetter] readonly attribute long customGetterImplementedAsReadonlyLongAttribute;
[KeepAttributeAliveForGC] readonly attribute DocumentFragment readonlyDocumentFragmentAttribute;
[MeasureAs=TestFeature] readonly attribute long measureAsReadonlyLongAttribute;
[NotEnumerable] readonly attribute long notEnumerableReadonlyLongAttribute;
[RaisesException] readonly attribute long raisesExceptionReadonlyLongAttribute;
[RuntimeEnabled=FeatureName] readonly attribute long enabledAtRuntimeReadonlyLongAttribute;
[Conditional=Condition, RuntimeEnabled=FeatureName] readonly attribute long conditionalEnabledAtRuntimeReadonlyLongAttribute;
};