manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1309626 - in /incubator/lcf/trunk: CHANGES.txt framework/core/src/test/resources/org/apache/manifoldcf/core/tests/Javascript.py
Date Wed, 04 Apr 2012 23:41:31 GMT
Author: kwright
Date: Wed Apr  4 23:41:31 2012
New Revision: 1309626

URL: http://svn.apache.org/viewvc?rev=1309626&view=rev
Log:
Fix for CONNECTORS-449.

Modified:
    incubator/lcf/trunk/CHANGES.txt
    incubator/lcf/trunk/framework/core/src/test/resources/org/apache/manifoldcf/core/tests/Javascript.py

Modified: incubator/lcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/CHANGES.txt?rev=1309626&r1=1309625&r2=1309626&view=diff
==============================================================================
--- incubator/lcf/trunk/CHANGES.txt (original)
+++ incubator/lcf/trunk/CHANGES.txt Wed Apr  4 23:41:31 2012
@@ -24,6 +24,9 @@ CONNECTORS-431: Update pom.xml versions.
 
 ======================= Release 0.5 =========================
 
+CONNECTORS-449: Fix browser simulator so that UI tests work again.
+(Karl Wright)
+
 CONNECTORS-448: Fix xerces build for Linux machines.
 (Karl Wright)
 

Modified: incubator/lcf/trunk/framework/core/src/test/resources/org/apache/manifoldcf/core/tests/Javascript.py
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/test/resources/org/apache/manifoldcf/core/tests/Javascript.py?rev=1309626&r1=1309625&r2=1309626&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/test/resources/org/apache/manifoldcf/core/tests/Javascript.py
(original)
+++ incubator/lcf/trunk/framework/core/src/test/resources/org/apache/manifoldcf/core/tests/Javascript.py
Wed Apr  4 23:41:31 2012
@@ -1447,7 +1447,7 @@ class JSTokenStream:
 
         token = self.peek( )
         if token != None and token.get_punc( ) == "=":
-                # Assignment operation
+            # Assignment operation
             self.advance( )
             value = self.evaluate_expr( context, place, parse_only )
             if value == None:
@@ -1456,11 +1456,31 @@ class JSTokenStream:
                 return JSNull()
             reference_object.set_referenced_object( value )
             return value
+        elif token != None and token.get_punc( ) == "+=":
+            # += operation
+            self.advance( )
+            value = self.evaluate_expr( context, place, parse_only )
+            if value == None:
+                raise Exception("Missing expression value in += in %s" % place)
+            if parse_only:
+                return JSNull()
+            reference_object.set_referenced_object( self.plus( reference_object.get_referenced_object(
), value ) )
+            return reference_object.get_referenced_object( )
+        elif token != None and token.get_punc( ) == "-=":
+            # -= operation
+            self.advance( )
+            value = self.evaluate_expr( context, place, parse_only )
+            if value == None:
+                raise Exception("Missing expression value in -= in %s" % place)
+            if parse_only:
+                return JSNull()
+            reference_object.set_referenced_object( self.minus( reference_object.get_referenced_object(
), value ) )
+            return reference_object.get_referenced_object( )
         else:
             # Just an object reference.  Look up the value
             if parse_only:
                 return JSNull()
-            return reference_object
+            return reference_object.get_referenced_object( )
 
 
     def evaluate_terminal_token( self, context, place, parse_only=False ):
@@ -1471,22 +1491,22 @@ class JSTokenStream:
 
         if token != None and token.get_symbol( ) == "true":
             self.advance( )
-            return JSBoolean( True )
+            return JSNonSettableReference( JSBoolean( True ) )
         if token != None and token.get_symbol( ) == "false":
             self.advance( )
-            return JSBoolean( False )
+            return JSNonSettableReference( JSBoolean( False ) )
         if token != None and token.get_symbol( ) == "null":
             self.advance( )
-            return JSNull( )
+            return JSNonSettableReferemce( JSNull( ) )
         if token != None and token.get_string( ) != None:
             self.advance( )
             return JSNonSettableReference( JSString( token.get_string( ) ) )
         if token != None and token.get_int( ) != None:
             self.advance( )
-            return JSNumber( token.get_int( ) )
+            return JSNonSettableReference( JSNumber( token.get_int( ) ) )
         if token != None and token.get_float( ) != None:
             self.advance( )
-            return JSNumber( token.get_float( ) )
+            return JSNonSettableReference( JSNumber( token.get_float( ) ) )
         if token != None and token.get_regexp( ) != None:
             self.advance( )
             return JSNonSettableReference( JSRegexp( token.get_regexp( ), token.get_regexp_global(
), token.get_regexp_insensitive( ) ) )



Mime
View raw message