⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 127032 in webkit


Ignore:
Timestamp:
Aug 29, 2012, 12:50:15 PM (14 years ago)
Author:
jberlin@webkit.org
Message:

run-bindings-tests failing on Apple Mountain Lion Testers.
https://bugs.webkit.org/show_bug.cgi?id=95354

Reviewed by Eric Seidel.

The binding tests were expecting incorrect results on Mac. The versions using the @property
syntax are correct for Leopard and above. CodeGeneratorObjC.pm was determining which syntax
to use based on the value of MACOSX_DEPLOYMENT_TARGET, which might not be set in the
environment the tests get run in but is correctly set by xcodebuild.

  • bindings/scripts/CodeGeneratorObjC.pm:

(GenerateHeader):
Remove the code to support Tiger and earlier and the reliance on MACOSX_DEPLOYMENT_TARGET.

  • bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:

Update the expectations to expect the @property syntax (done with --reset-results).

  • bindings/scripts/test/ObjC/DOMTestEventConstructor.h:

Ditto.

  • bindings/scripts/test/ObjC/DOMTestException.h:

Ditto.

  • bindings/scripts/test/ObjC/DOMTestInterface.h:

Ditto.

  • bindings/scripts/test/ObjC/DOMTestObj.h:

Ditto.

  • bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:

Ditto.

Location:
trunk/Source/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r127031 r127032  
     12012-08-29  Jessie Berlin  <jberlin@apple.com>
     2
     3        run-bindings-tests failing on Apple Mountain Lion Testers.
     4        https://bugs.webkit.org/show_bug.cgi?id=95354
     5
     6        Reviewed by Eric Seidel.
     7
     8        The binding tests were expecting incorrect results on Mac. The versions using the @property
     9        syntax are correct for Leopard and above. CodeGeneratorObjC.pm was determining which syntax
     10        to use based on the value of MACOSX_DEPLOYMENT_TARGET, which might not be set in the
     11        environment the tests get run in but is correctly set by xcodebuild.
     12
     13        * bindings/scripts/CodeGeneratorObjC.pm:
     14        (GenerateHeader):
     15        Remove the code to support Tiger and earlier and the reliance on MACOSX_DEPLOYMENT_TARGET.
     16        * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
     17        Update the expectations to expect the @property syntax (done with --reset-results).
     18        * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
     19        Ditto.
     20        * bindings/scripts/test/ObjC/DOMTestException.h:
     21        Ditto.
     22        * bindings/scripts/test/ObjC/DOMTestInterface.h:
     23        Ditto.
     24        * bindings/scripts/test/ObjC/DOMTestObj.h:
     25        Ditto.
     26        * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
     27        Ditto.
     28
    1292012-08-29  Vivek Galatage  <vivekgalatage@gmail.com>
    230
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm

    r125293 r127032  
    7979
    8080# Constants
    81 my $buildingForTigerOrEarlier = 1 if $ENV{"MACOSX_DEPLOYMENT_TARGET"} and $ENV{"MACOSX_DEPLOYMENT_TARGET"} <= 10.4;
    82 my $buildingForLeopardOrLater = 1 if $ENV{"MACOSX_DEPLOYMENT_TARGET"} and $ENV{"MACOSX_DEPLOYMENT_TARGET"} >= 10.5;
    8381my $exceptionInit = "WebCore::ExceptionCode ec = 0;";
    8482my $jsContextSetter = "WebCore::JSMainThreadNullState state;";
     
    818816            }
    819817
    820             $availabilityMacro = "WEBKIT_OBJC_METHOD_ANNOTATION($availabilityMacro)" if length $availabilityMacro and $buildingForTigerOrEarlier;
    821 
    822818            my $declarationSuffix = ";\n";
    823819            $declarationSuffix = " $availabilityMacro;\n" if length $availabilityMacro;
     
    842838            }
    843839
    844             if ($buildingForLeopardOrLater) {
    845                 $property .= $declarationSuffix;
    846                 push(@headerAttributes, $property) if $public;
    847                 push(@privateHeaderAttributes, $property) unless $public;
    848             } else {
    849                 my $attributeConditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
    850                 if ($attributeConditionalString) {
    851                     push(@headerAttributes, "#if ${attributeConditionalString}\n") if $public;
    852                     push(@privateHeaderAttributes, "#if ${attributeConditionalString}\n") unless $public;
    853                 }
    854 
    855                 # - GETTER
    856                 my $getter = "- (" . $attributeType . ")" . $attributeName . $declarationSuffix;
    857                 push(@headerAttributes, $getter) if $public;
    858                 push(@privateHeaderAttributes, $getter) unless $public;
    859 
    860                 # - SETTER
    861                 if (!$attributeIsReadonly) {
    862                     my $setter = "- (void)$setterName(" . $attributeType . ")new" . ucfirst($attributeName) . $declarationSuffix;
    863                     push(@headerAttributes, $setter) if $public;
    864                     push(@privateHeaderAttributes, $setter) unless $public;
    865                 }
    866 
    867                 if ($attributeConditionalString) {
    868                     push(@headerAttributes, "#endif\n") if $public;
    869                     push(@privateHeaderAttributes, "#endif\n") unless $public;
    870                 }
    871             }
     840            $property .= $declarationSuffix;
     841            push(@headerAttributes, $property) if $public;
     842            push(@privateHeaderAttributes, $property) unless $public;
    872843        }
    873844
     
    929900            }
    930901
    931             $availabilityMacro = "WEBKIT_OBJC_METHOD_ANNOTATION($availabilityMacro)" if length $availabilityMacro and $buildingForTigerOrEarlier;
    932 
    933902            my $functionDeclaration = $functionSig;
    934903            $functionDeclaration .= " " . $availabilityMacro if length $availabilityMacro;
     
    966935                }
    967936
    968                 $availabilityMacro = "WEBKIT_OBJC_METHOD_ANNOTATION($availabilityMacro)" if $buildingForTigerOrEarlier;
    969 
    970937                $functionDeclaration = "$deprecatedFunctionSig $availabilityMacro;\n";
    971938
     
    988955
    989956        if (@headerFunctions > 0) {
    990             push(@headerContent, "\n") if $buildingForLeopardOrLater and @headerAttributes > 0;
     957            push(@headerContent, "\n") if @headerAttributes > 0;
    991958            push(@headerContent, @headerFunctions);
    992959        }
     
    1023990        push(@privateHeaderContent, "\@interface $className (" . $className . "Private)\n");
    1024991        push(@privateHeaderContent, @privateHeaderAttributes) if @privateHeaderAttributes > 0;
    1025         push(@privateHeaderContent, "\n") if $buildingForLeopardOrLater and @privateHeaderAttributes > 0 and @privateHeaderFunctions > 0;
     992        push(@privateHeaderContent, "\n") if @privateHeaderAttributes > 0 and @privateHeaderFunctions > 0;
    1026993        push(@privateHeaderContent, @privateHeaderFunctions) if @privateHeaderFunctions > 0;
    1027994        push(@privateHeaderContent, "\@end\n");
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h

    r104526 r127032  
    3333
    3434@interface DOMTestActiveDOMObject : DOMObject
    35 - (int)excitingAttr;
     35@property(readonly) int excitingAttr;
     36
    3637- (void)excitingFunction:(DOMNode *)nextChild;
    3738- (void)postMessage:(NSString *)message;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestEventConstructor.h

    r99900 r127032  
    3232
    3333@interface DOMTestEventConstructor : DOMObject
    34 - (NSString *)attr1;
    35 - (NSString *)attr2;
     34@property(readonly, copy) NSString *attr1;
     35@property(readonly, copy) NSString *attr2;
    3636@end
    3737
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestException.h

    r116172 r127032  
    3232
    3333@interface DOMTestException : DOMObject
    34 - (NSString *)name;
     34@property(readonly, copy) NSString *name;
    3535@end
    3636
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.h

    r109515 r127032  
    4444
    4545@interface DOMTestInterface : DOMObject
    46 #if ENABLE(Condition11) || ENABLE(Condition12)
    47 - (NSString *)supplementalStr1;
    48 #endif
    49 #if ENABLE(Condition11) || ENABLE(Condition12)
    50 - (NSString *)supplementalStr2;
    51 - (void)setSupplementalStr2:(NSString *)newSupplementalStr2;
    52 #endif
    53 #if ENABLE(Condition11) || ENABLE(Condition12)
    54 - (NSString *)supplementalStr3;
    55 - (void)setSupplementalStr3:(NSString *)newSupplementalStr3;
    56 #endif
    57 #if ENABLE(Condition11) || ENABLE(Condition12)
    58 - (DOMNode *)supplementalNode;
    59 - (void)setSupplementalNode:(DOMNode *)newSupplementalNode;
    60 #endif
     46@property(readonly, copy) NSString *supplementalStr1;
     47@property(copy) NSString *supplementalStr2;
     48@property(copy) NSString *supplementalStr3;
     49@property(retain) DOMNode *supplementalNode;
     50
    6151#if ENABLE(Condition11) || ENABLE(Condition12)
    6252- (void)supplementalMethod1;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h

    r125484 r127032  
    6565
    6666@interface DOMTestObj : DOMObject
    67 - (int)readOnlyLongAttr;
    68 - (NSString *)readOnlyStringAttr;
    69 - (DOMTestObj *)readOnlyTestObjAttr;
    70 - (short)shortAttr;
    71 - (void)setShortAttr:(short)newShortAttr;
    72 - (unsigned short)unsignedShortAttr;
    73 - (void)setUnsignedShortAttr:(unsigned short)newUnsignedShortAttr;
    74 - (long long)Attr;
    75 - (void)setAttr:(long long)newAttr;
    76 - (long long)longLongAttr;
    77 - (void)setLongLongAttr:(long long)newLongLongAttr;
    78 - (unsigned long long)unsignedLongLongAttr;
    79 - (void)setUnsignedLongLongAttr:(unsigned long long)newUnsignedLongLongAttr;
    80 - (NSString *)stringAttr;
    81 - (void)setStringAttr:(NSString *)newStringAttr;
    82 - (DOMTestObj *)testObjAttr;
    83 - (void)setTestObjAttr:(DOMTestObj *)newTestObjAttr;
    84 - (DOMTestObj *)XMLObjAttr;
    85 - (void)setXMLObjAttr:(DOMTestObj *)newXMLObjAttr;
    86 - (BOOL)create;
    87 - (void)setCreate:(BOOL)newCreate;
    88 - (NSString *)reflectedStringAttr;
    89 - (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr;
    90 - (int)reflectedIntegralAttr;
    91 - (void)setReflectedIntegralAttr:(int)newReflectedIntegralAttr;
    92 - (unsigned)reflectedUnsignedIntegralAttr;
    93 - (void)setReflectedUnsignedIntegralAttr:(unsigned)newReflectedUnsignedIntegralAttr;
    94 - (BOOL)reflectedBooleanAttr;
    95 - (void)setReflectedBooleanAttr:(BOOL)newReflectedBooleanAttr;
    96 - (NSString *)reflectedURLAttr;
    97 - (void)setReflectedURLAttr:(NSString *)newReflectedURLAttr;
    98 - (NSString *)reflectedStringAttr;
    99 - (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr;
    100 - (int)reflectedCustomIntegralAttr;
    101 - (void)setReflectedCustomIntegralAttr:(int)newReflectedCustomIntegralAttr;
    102 - (BOOL)reflectedCustomBooleanAttr;
    103 - (void)setReflectedCustomBooleanAttr:(BOOL)newReflectedCustomBooleanAttr;
    104 - (NSString *)reflectedCustomURLAttr;
    105 - (void)setReflectedCustomURLAttr:(NSString *)newReflectedCustomURLAttr;
    106 - (int)attrWithGetterException;
    107 - (void)setAttrWithGetterException:(int)newAttrWithGetterException;
    108 - (int)attrWithSetterException;
    109 - (void)setAttrWithSetterException:(int)newAttrWithSetterException;
    110 - (NSString *)stringAttrWithGetterException;
    111 - (void)setStringAttrWithGetterException:(NSString *)newStringAttrWithGetterException;
    112 - (NSString *)stringAttrWithSetterException;
    113 - (void)setStringAttrWithSetterException:(NSString *)newStringAttrWithSetterException;
    114 - (int)customAttr;
    115 - (void)setCustomAttr:(int)newCustomAttr;
    116 - (int)withScriptStateAttribute;
    117 - (void)setWithScriptStateAttribute:(int)newWithScriptStateAttribute;
    118 - (DOMTestObj *)withScriptExecutionContextAttribute;
    119 - (void)setWithScriptExecutionContextAttribute:(DOMTestObj *)newWithScriptExecutionContextAttribute;
    120 - (DOMTestObj *)withScriptStateAttributeRaises;
    121 - (void)setWithScriptStateAttributeRaises:(DOMTestObj *)newWithScriptStateAttributeRaises;
    122 - (DOMTestObj *)withScriptExecutionContextAttributeRaises;
    123 - (void)setWithScriptExecutionContextAttributeRaises:(DOMTestObj *)newWithScriptExecutionContextAttributeRaises;
    124 - (DOMTestObj *)withScriptExecutionContextAndScriptStateAttribute;
    125 - (void)setWithScriptExecutionContextAndScriptStateAttribute:(DOMTestObj *)newWithScriptExecutionContextAndScriptStateAttribute;
    126 - (DOMTestObj *)withScriptExecutionContextAndScriptStateAttributeRaises;
    127 - (void)setWithScriptExecutionContextAndScriptStateAttributeRaises:(DOMTestObj *)newWithScriptExecutionContextAndScriptStateAttributeRaises;
    128 - (DOMTestObj *)withScriptExecutionContextAndScriptStateWithSpacesAttribute;
    129 - (void)setWithScriptExecutionContextAndScriptStateWithSpacesAttribute:(DOMTestObj *)newWithScriptExecutionContextAndScriptStateWithSpacesAttribute;
    130 - (DOMTestObj *)withScriptArgumentsAndCallStackAttribute;
    131 - (void)setWithScriptArgumentsAndCallStackAttribute:(DOMTestObj *)newWithScriptArgumentsAndCallStackAttribute;
    132 #if ENABLE(Condition1)
    133 - (int)conditionalAttr1;
    134 - (void)setConditionalAttr1:(int)newConditionalAttr1;
    135 #endif
    136 #if ENABLE(Condition1) && ENABLE(Condition2)
    137 - (int)conditionalAttr2;
    138 - (void)setConditionalAttr2:(int)newConditionalAttr2;
    139 #endif
    140 #if ENABLE(Condition1) || ENABLE(Condition2)
    141 - (int)conditionalAttr3;
    142 - (void)setConditionalAttr3:(int)newConditionalAttr3;
    143 #endif
    144 #if ENABLE(Condition1)
    145 - (DOMTestObjectAConstructor *)conditionalAttr4;
    146 - (void)setConditionalAttr4:(DOMTestObjectAConstructor *)newConditionalAttr4;
    147 #endif
    148 #if ENABLE(Condition1) && ENABLE(Condition2)
    149 - (DOMTestObjectBConstructor *)conditionalAttr5;
    150 - (void)setConditionalAttr5:(DOMTestObjectBConstructor *)newConditionalAttr5;
    151 #endif
    152 #if ENABLE(Condition1) || ENABLE(Condition2)
    153 - (DOMTestObjectCConstructor *)conditionalAttr6;
    154 - (void)setConditionalAttr6:(DOMTestObjectCConstructor *)newConditionalAttr6;
    155 #endif
    156 - (DOMDocument *)contentDocument;
    157 - (DOMSVGPoint *)mutablePoint;
    158 - (void)setMutablePoint:(DOMSVGPoint *)newMutablePoint;
    159 - (DOMSVGPoint *)immutablePoint;
    160 - (void)setImmutablePoint:(DOMSVGPoint *)newImmutablePoint;
    161 - (int)strawberry;
    162 - (void)setStrawberry:(int)newStrawberry;
    163 - (float)strictFloat;
    164 - (void)setStrictFloat:(float)newStrictFloat;
    165 - (int)descriptionName;
    166 - (int)idName;
    167 - (void)setIdName:(int)newIdName;
    168 - (NSString *)hashName;
    169 - (int)replaceableAttribute;
    170 - (void)setReplaceableAttribute:(int)newReplaceableAttribute;
     67@property(readonly) int readOnlyLongAttr;
     68@property(readonly, copy) NSString *readOnlyStringAttr;
     69@property(readonly, retain) DOMTestObj *readOnlyTestObjAttr;
     70@property short shortAttr;
     71@property unsigned short unsignedShortAttr;
     72@property long long Attr;
     73@property long long longLongAttr;
     74@property unsigned long long unsignedLongLongAttr;
     75@property(copy) NSString *stringAttr;
     76@property(retain) DOMTestObj *testObjAttr;
     77@property(retain) DOMTestObj *XMLObjAttr;
     78@property BOOL create;
     79@property(copy) NSString *reflectedStringAttr;
     80@property int reflectedIntegralAttr;
     81@property unsigned reflectedUnsignedIntegralAttr;
     82@property BOOL reflectedBooleanAttr;
     83@property(copy) NSString *reflectedURLAttr;
     84@property(copy) NSString *reflectedStringAttr;
     85@property int reflectedCustomIntegralAttr;
     86@property BOOL reflectedCustomBooleanAttr;
     87@property(copy) NSString *reflectedCustomURLAttr;
     88@property int attrWithGetterException;
     89@property int attrWithSetterException;
     90@property(copy) NSString *stringAttrWithGetterException;
     91@property(copy) NSString *stringAttrWithSetterException;
     92@property int customAttr;
     93@property int withScriptStateAttribute;
     94@property(retain) DOMTestObj *withScriptExecutionContextAttribute;
     95@property(retain) DOMTestObj *withScriptStateAttributeRaises;
     96@property(retain) DOMTestObj *withScriptExecutionContextAttributeRaises;
     97@property(retain) DOMTestObj *withScriptExecutionContextAndScriptStateAttribute;
     98@property(retain) DOMTestObj *withScriptExecutionContextAndScriptStateAttributeRaises;
     99@property(retain) DOMTestObj *withScriptExecutionContextAndScriptStateWithSpacesAttribute;
     100@property(retain) DOMTestObj *withScriptArgumentsAndCallStackAttribute;
     101@property int conditionalAttr1;
     102@property int conditionalAttr2;
     103@property int conditionalAttr3;
     104@property(retain) DOMTestObjectAConstructor *conditionalAttr4;
     105@property(retain) DOMTestObjectBConstructor *conditionalAttr5;
     106@property(retain) DOMTestObjectCConstructor *conditionalAttr6;
     107@property(readonly, retain) DOMDocument *contentDocument;
     108@property(retain) DOMSVGPoint *mutablePoint;
     109@property(retain) DOMSVGPoint *immutablePoint;
     110@property int strawberry;
     111@property float strictFloat;
     112@property(readonly) int descriptionName;
     113@property int idName;
     114@property(readonly, copy) NSString *hashName;
     115@property int replaceableAttribute;
     116
    171117- (void)voidMethod;
    172118- (void)voidMethodWithArgs:(long long)Arg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h

    r114319 r127032  
    3434
    3535@interface DOMTestSerializedScriptValueInterface : DOMObject
    36 - (NSString *)value;
    37 - (void)setValue:(NSString *)newValue;
    38 - (NSString *)readonlyValue;
    39 - (NSString *)cachedValue;
    40 - (void)setCachedValue:(NSString *)newCachedValue;
    41 - (DOMMessagePortArray *)ports;
    42 - (NSString *)cachedReadonlyValue;
     36@property(retain) NSString *value;
     37@property(readonly, retain) NSString *readonlyValue;
     38@property(retain) NSString *cachedValue;
     39@property(readonly, retain) DOMMessagePortArray *ports;
     40@property(readonly, retain) NSString *cachedReadonlyValue;
     41
    4342- (void)acceptTransferList:(NSString *)data transferList:(DOMArray *)transferList;
    4443- (void)multiTransferList:(NSString *)first tx:(DOMArray *)tx second:(NSString *)second txx:(DOMArray *)txx;
Note: See TracChangeset for help on using the changeset viewer.