Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / tests / idls / TestObjectPython.idl
index 94760c0..597d9fa 100644 (file)
@@ -67,7 +67,7 @@ interface TestObjectPython {
     // Basic types
     attribute Date dateAttribute;
     attribute DOMString stringAttribute;
-    readonly attribute DOMTimeStamp readonlyDOMTimeStampAttribute;  // FIXME: Perl CG doesn't translate typedef DOMTimeStamp -> unsigned long long; remove readonly once moved to Python-only
+    readonly attribute DOMTimeStamp readonlyDOMTimeStampAttribute; // FIXME: Perl CG doesn't translate typedef DOMTimeStamp -> unsigned long long; remove readonly once moved to Python-only
     attribute boolean booleanAttribute;
     attribute byte byteAttribute;
     attribute double doubleAttribute;
@@ -103,7 +103,6 @@ interface TestObjectPython {
     attribute DocumentFragment documentFragmentAttribute;
     attribute DocumentType documentTypeAttribute;
     attribute Element elementAttribute;
-    attribute Entity entityAttribute;
     attribute Node nodeAttribute;
     attribute ShadowRoot shadowRootAttribute;
     // Typed arrays
@@ -140,7 +139,7 @@ interface TestObjectPython {
     [ActivityLogging=SetterForAllWorlds] attribute long activityLoggingSetterForAllWorldsLongAttribute;
     [CachedAttribute=isValueDirty] attribute any cachedAttributeAnyAttribute;
     [CallWith=ExecutionContext] attribute any callWithExecutionContextAnyAttribute;
-    [CheckSecurity=Node] readonly attribute Document checkSecurityForNodeReadonlyDocumentAttribute;  // All uses are read only
+    [CheckSecurity=Node] readonly attribute Document checkSecurityForNodeReadonlyDocumentAttribute; // All uses are read only
     [Conditional=CONDITION] attribute long conditionalLongAttribute;
     [Conditional=CONDITION_1&CONDITION_2] attribute long conditionalAndLongAttribute;
     [Conditional=CONDITION_1|CONDITION_2] attribute long conditionalOrLongAttribute;
@@ -153,24 +152,29 @@ interface TestObjectPython {
     [DeprecateAs=LongAttribute] attribute long deprecatedLongAttribute;
     [EnforceRange] attribute long enforceRangeLongAttribute;
     [ExposeJSAccessors] attribute long exposeJSAccessorsLongAttribute;
-    [RaisesException=Getter] attribute long getterRaisesExceptionLongAttribute;
     [ImplementedAs=implementedAsName] attribute long implementedAsLongAttribute;
     [Custom, ImplementedAs=implementedAsNameWithCustom] attribute long customImplementedAsLongAttribute;
-    attribute TestInterfacePython testInterfacePythonAttribute;  // interface type that itself has [ImplementedAs] (not self; self-reference test at TestInterfacePython)
     [Custom=Getter, ImplementedAs=implementedAsNameWithCustomGetter] attribute long customGetterImplementedAsLongAttribute;
     [Custom=Setter, ImplementedAs=implementedAsNameWithCustomGetter] attribute long customSetterImplementedAsLongAttribute;
     [MeasureAs=TestFeature] attribute long measureAsLongAttribute;
     [NotEnumerable] attribute long notEnumerableLongAttribute;
     [PerContextEnabled=FeatureName] attribute long perContextEnabledLongAttribute;
     [PerWorldBindings] attribute long perWorldBindingsLongAttribute;
-    [PerWorldBindings] readonly attribute long perWorldBindingsReadonlyLongAttribute;  // Separate read only attribute to check attribute configuration
+    [PerWorldBindings] readonly attribute long perWorldBindingsReadonlyLongAttribute; // Separate read only attribute to check attribute configuration
+    [PerWorldBindings] readonly attribute TestInterfaceEmpty perWorldBindingsReadonlyTestInterfaceEmptyAttribute;
     [ActivityLogging=ForAllWorlds, PerWorldBindings] attribute long activityLoggingAccessPerWorldBindingsLongAttribute;
     [ActivityLogging=ForIsolatedWorlds, PerWorldBindings] attribute long activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute;
     [ActivityLogging=GetterForAllWorlds, PerWorldBindings] attribute long activityLoggingGetterPerWorldBindingsLongAttribute;
     [ActivityLogging=GetterForIsolatedWorlds, PerWorldBindings] attribute long activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute;
     [PutForwards=href] readonly attribute TestNode location;
     [PutForwards=hrefThrows] readonly attribute TestNode locationWithException;
+    [PutForwards=hrefCallWith] readonly attribute TestNode locationWithCallWith;
+    [PerWorldBindings, PutForwards=href] readonly attribute TestNode locationWithPerWorldBindings;
     [RaisesException] attribute long raisesExceptionLongAttribute;
+    [RaisesException=Getter] attribute long raisesExceptionGetterLongAttribute;
+    [RaisesException=Setter] attribute long setterRaisesExceptionLongAttribute;
+    [RaisesException] attribute TestInterfaceEmpty raisesExceptionTestInterfaceEmptyAttribute;
+    [CachedAttribute=isValueDirty, RaisesException] attribute any cachedAttributeRaisesExceptionGetterAnyAttribute;
     [Reflect] attribute TestInterface reflectTestInterfaceAttribute;
     [Reflect=reflectedNameAttribute] attribute TestInterface reflectReflectedNameAttributeTestAttribute;
     // [Reflect] exceptional types: exceptional getters, exceptional setters,
@@ -186,12 +190,23 @@ interface TestObjectPython {
     [Reflect=id] attribute DOMString reflectedId;
     [Reflect=name] attribute DOMString reflectedName;
     [Reflect=class] attribute DOMString reflectedClass;
+    // Limited value attributes and enumerated attributes
+    [Reflect, ReflectOnly="unique"] attribute DOMString limitedToOnlyOneAttribute;
+    [Reflect, ReflectOnly="Per"|"Paal"|"Espen"] attribute DOMString limitedToOnlyAttribute;
+    [Reflect=Other, ReflectOnly="Value1"|"Value2" ] attribute DOMString limitedToOnlyOtherAttribute;
+    [Reflect, ReflectOnly="rsa"|"dsa", ReflectMissing="rsa"] attribute DOMString limitedWithMissingDefaultAttribute;
+    [Reflect, ReflectOnly="ltr"|"rtl"|"auto", ReflectMissing="auto", ReflectInvalid="ltr"] attribute DOMString limitedWithInvalidMissingDefaultAttribute;
+    [Reflect, ReflectOnly="anonymous"|"use-credentials", ReflectEmpty="anonymous", ReflectInvalid="anonymous"] readonly attribute DOMString corsSettingAttribute;
+    [Reflect, ReflectOnly="empty"|"missing"|"invalid"|"a-normal", ReflectEmpty="empty", ReflectMissing="missing", ReflectInvalid="invalid"] readonly attribute DOMString limitedWithEmptyMissingInvalidAttribute;
+
     [Replaceable] readonly attribute long replaceableReadonlyLongAttribute;
+    [Replaceable, PutForwards=href] readonly attribute TestNode locationReplaceable;
     [RuntimeEnabled=FeatureName] attribute long runtimeEnabledLongAttribute;
+    [PerContextEnabled=FeatureName, RuntimeEnabled=FeatureName] attribute long perContextEnabledRuntimeEnabledLongAttribute;
     [Conditional=CONDITION, RuntimeEnabled=FeatureName] attribute long conditionalRuntimeEnabledLongAttribute;
     [SetterCallWith=ActiveWindow&FirstWindow] attribute DOMString setterCallWithActiveWindowAndFirstWindowStringAttribute;
-    [RaisesException=Setter] attribute long setterRaisesExceptionLongAttribute;
-    [StrictTypeChecking] attribute float strictTypeCheckingFloatAttribute;  // nop for non-interface types
+    [SetterCallWith=ExecutionContext] attribute DOMString setterCallWithExecutionContextStringAttribute;
+    [StrictTypeChecking] attribute float strictTypeCheckingFloatAttribute; // nop for non-interface types
     [StrictTypeChecking] attribute TestInterface strictTypeCheckingTestInterfaceAttribute;
     [TreatNullAs=NullString] attribute DOMString treatNullAsNullStringStringAttribute;
     [TreatReturnedNullStringAs=Null] attribute DOMString treatReturnedNullStringAsNullStringAttribute;
@@ -225,7 +240,7 @@ interface TestObjectPython {
 
     void voidMethodDateArg(Date dateArg);
     void voidMethodStringArg(DOMString stringArg);
-    // void voidMethodDOMTimeStampArg(DOMTimeStamp domTimeStampArg);  // FIXME: Perl CG doesn't translate typedef DOMTimeStamp -> unsigned long long; uncomment once moved to Python-only
+    // void voidMethodDOMTimeStampArg(DOMTimeStamp domTimeStampArg); // FIXME: Perl CG doesn't translate typedef DOMTimeStamp -> unsigned long long; uncomment once moved to Python-only
     void voidMethodBooleanArg(boolean booleanArg);
     void voidMethodByteArg(byte byteArg);
     void voidMethodDoubleArg(double doubleArg);
@@ -249,8 +264,9 @@ interface TestObjectPython {
     // Custom type conversions
     CompareHow compareHowMethod();
     any anyMethod();
-    void voidMethodMediaQueryListListenerArg(MediaQueryListListener mediaQueryListListenerArg);
     void voidMethodCompareHowArg(CompareHow compareHowArg);
+    void voidMethodEventTargetArg(EventTarget eventTargetArg);
+    void voidMethodMediaQueryListListenerArg(MediaQueryListListener mediaQueryListListenerArg);
     void voidMethodAnyArg(any anyArg);
     // DOM node types
     void voidMethodAttrArg(Attr attrArg);
@@ -359,6 +375,7 @@ interface TestObjectPython {
     void removeEventListener(DOMString type,
                              EventListener listener,
                              optional boolean useCapture);
+    [RaisesException] boolean dispatchEvent(Event event);
 
     // Extended attributes for arguments
     // [Clamp]
@@ -399,9 +416,9 @@ interface TestObjectPython {
     [NotEnumerable] void notEnumerableVoidMethod();
     [PerContextEnabled=FeatureName] void perContextEnabledVoidMethod();
     [PerWorldBindings] void perWorldBindingsVoidMethod();
+    [PerWorldBindings] void perWorldBindingsVoidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg);
     [ActivityLogging=ForAllWorlds, PerWorldBindings] void activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
     [ActivityLogging=ForIsolatedWorlds, PerWorldBindings] void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod();
-    [PerWorldBindings] void perWorldBindingsVoidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg);
     [RaisesException] void raisesExceptionVoidMethod();
     [RaisesException] DOMString raisesExceptionStringMethod();
     [RaisesException] void raisesExceptionVoidMethodOptionalLongArg(optional long optionalLongArg);
@@ -417,4 +434,9 @@ interface TestObjectPython {
     [TreatReturnedNullStringAs=Null] DOMString treatReturnedNullStringAsNullStringMethod();
     [TreatReturnedNullStringAs=Undefined] DOMString treatReturnedNullStringAsUndefinedStringMethod();
     [Unforgeable] void unforgeableVoidMethod();
+
+    // Extended attributes on referenced interfaces
+    // (not self; self-reference tests at interface themselves)
+    attribute TestInterfacePython testInterfacePythonAttribute; // [ImplementedAs]
+    attribute TestInterfaceWillBeGarbageCollected? testInterfaceWillBeGarbageCollectedAttribute; // [WillBeGarbageCollected]
 };