[KSS-checkins] r50403 - in kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes: . kukit tests

reebalazs at codespeak.net reebalazs at codespeak.net
Sun Jan 6 17:19:56 CET 2008


Author: reebalazs
Date: Sun Jan  6 17:19:55 2008
New Revision: 50403

Modified:
   kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/   (props changed)
   kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/forms.js
   kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/kssparser.js
   kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/resourcedata.js
   kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/tests/test_kssparser.js
Log:
Rename formquery -> formdata

Modified: kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/forms.js
==============================================================================
--- kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/forms.js	(original)
+++ kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/forms.js	Sun Jan  6 17:19:55 2008
@@ -310,7 +310,7 @@
 //
 // form, currentForm will fetch an entire form for marshalling.
 // This is needed because duplications and order must be preserved.
-// The returnType of them will be registered as "formquery". This
+// The returnType of them will be registered as "formdata". This
 // represents a list of (key, value) tuples that need to be marshalled.
 // This assures to preserve order of keys, which is important
 // for multi-values.
@@ -335,7 +335,7 @@
         return fo.getAllFormVars(locator, collector);
     }
 };
-kukit.pprovidersGlobalRegistry.register('form', _FormValueProvider, 'formquery');
+kukit.pprovidersGlobalRegistry.register('form', _FormValueProvider, 'formdata');
 
 /*
 *
@@ -355,7 +355,7 @@
         return fo.getAllFormVars(locator, collector);
     }
 };
-kukit.pprovidersGlobalRegistry.register('currentForm', _CurrentFormValueProvider, 'formquery');
+kukit.pprovidersGlobalRegistry.register('currentForm', _CurrentFormValueProvider, 'formdata');
 
 /* BBB. To be deprecated on 2008-06-15 */
 

Modified: kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/kssparser.js
==============================================================================
--- kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/kssparser.js	(original)
+++ kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/kssparser.js	Sun Jan  6 17:19:55 2008
@@ -236,7 +236,7 @@
     // preprocess values
     var allowedReturnTypes;
 ;;; if (actionType == 'S') {
-;;;     allowedReturnTypes = {string: true, formquery: true, url: true};
+;;;     allowedReturnTypes = {string: true, formdata: true, url: true};
 ;;; } else {
 ;;;     allowedReturnTypes = {string: true, selection: true};
 ;;; }
@@ -317,13 +317,13 @@
 ;;;     // (not needed in production mode, since we have the value already)
 ;;;     var allowedReturnTypes = {};
 ;;;     if (key == 'kssSelector') {
-;;;         // for kssSelector, one of string or formquery expected
+;;;         // for kssSelector, one of string or selection is expected
 ;;;         allowedReturnTypes = {string: true, selection: true};
 ;;;     } else if (key == 'kssSubmitForm') {
-;;;         // for kssSubmitForm string or formquery expected
-;;;         allowedReturnTypes = {string: true, formquery: true};
+;;;         // for kssSubmitForm, one of string or formdata is expected
+;;;         allowedReturnTypes = {string: true, formdata: true};
 ;;;     } else if (key == 'kssUrl') {
-;;;         // for string or url expected
+;;;         // for kssUrl, one of string or url is expected
 ;;;         allowedReturnTypes = {string: true, url: true};
 ;;;     }
 ;;;     // We ignore actual results here, and just check. 

Modified: kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/resourcedata.js
==============================================================================
--- kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/resourcedata.js	(original)
+++ kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/resourcedata.js	Sun Jan  6 17:19:55 2008
@@ -529,8 +529,8 @@
     if (valuesByReturnType.selection) {
         action.parms.kssSelector = valuesByReturnType.selection;
     }
-    if (valuesByReturnType.formquery) {
-        action.parms.kssSubmitForm = valuesByReturnType.formquery;
+    if (valuesByReturnType.formdata) {
+        action.parms.kssSubmitForm = valuesByReturnType.formdata;
     }
     if (valuesByReturnType.url) {
         action.parms.kssUrl = valuesByReturnType.url;

Modified: kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/tests/test_kssparser.js
==============================================================================
--- kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/tests/test_kssparser.js	(original)
+++ kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/tests/test_kssparser.js	Sun Jan  6 17:19:55 2008
@@ -894,7 +894,13 @@
     // Different tests to see if the syntax type check of
     // the value providers is working correctly.
     // At the moment we have the following return value types:
-    //     string, selection, formquery
+    //
+    //   string:     almost all normal providers return string
+    //   selection:  a selector provider returns a list of nodes
+    //   formdata:   a form provider returns an ordered list
+    //               of key-value pairs to be marshalled
+    //   url:        the return type of the url() provider
+    //
     // We do not check the actual evaluation here, as we
     // have no DOM at hand.
     //
@@ -952,7 +958,7 @@
             'Error in value for action parameter [message] : Error: Expected string value and got [selection] in argument #[1] of provider [nodeAttr].., at row 1, column 11');
     };
 
-    this.testNormalProviderRejectsFormQuery = function() {
+    this.testNormalProviderRejectsFormData = function() {
         // normal providers do not accept form query
         //
         // This test can only run in development mode, pass otherwise.
@@ -966,7 +972,7 @@
             Error);
     };
  
-    this.testNormalProviderRejectsFormQueryFullRule = function() {
+    this.testNormalProviderRejectsFormDataFullRule = function() {
         // normal providers do not accept form query
         // full rule
         //
@@ -980,7 +986,7 @@
         var cursor = new kukit.tk.Cursor(txt);
         this.assertParsingError(kukit.kssp.Document, cursor, null, true,
             // XXX This error message will be fixed in service-layer branch
-            'Error in value for action parameter [message] : Error: Expected string value and got [formquery] in argument #[1] of provider [nodeAttr].., at row 1, column 11');
+            'Error in value for action parameter [message] : Error: Expected string value and got [formdata] in argument #[1] of provider [nodeAttr].., at row 1, column 11');
     };
 
     this.testNormalParameterRejectsSelectorInItself = function() {
@@ -999,7 +1005,7 @@
             'Missing [string] value in the action parameter [message]., at row 1, column 11');
     };
 
-    this.testNormalParameterRejectsFormQuery = function() {
+    this.testNormalParameterRejectsFormData = function() {
         // normal parameters do not accept form query
         //
         // This test can only run in development mode, pass otherwise.
@@ -1012,7 +1018,7 @@
         var cursor = new kukit.tk.Cursor(txt);
         this.assertParsingError(kukit.kssp.Document, cursor, null, true,
             // XXX This error message will be fixed in service-layer branch
-            'Provider result type [formquery] not allowed in the action parameter [message]., at row 1, column 1');
+            'Provider result type [formdata] not allowed in the action parameter [message]., at row 1, column 1');
     };
 
     this.testKssSelectorAcceptsSelector = function() {
@@ -1050,7 +1056,7 @@
         this.assertEquals(parser.finished, true);
     };
 
-    this.testKssSelectorRejectsFormQuery = function() {
+    this.testKssSelectorRejectsFormData = function() {
         // kssSelector rejects form query
         //
         // This test can only run in development mode, pass otherwise.
@@ -1065,10 +1071,10 @@
         var cursor = new kukit.tk.Cursor(txt);
         this.assertParsingError(kukit.kssp.Document, cursor, null, true,
             // XXX This error message will be fixed in service-layer branch
-            'Provider result type [formquery] not allowed in the kss action parameter [kssSelector]., at row 1, column 11');
+            'Provider result type [formdata] not allowed in the kss action parameter [kssSelector]., at row 1, column 11');
     };
 
-    this.testKssSubmitFormAcceptsFormQuery = function() {
+    this.testKssSubmitFormAcceptsFormData = function() {
         // kssSubmitForm accepts form query
         //
         // This test can only run in development mode, pass otherwise.
@@ -1129,7 +1135,7 @@
         this.assertEquals(parser.finished, true);
     };
 
-    this.testCombinedClientActionRejectsFormQuery = function() {
+    this.testCombinedClientActionRejectsFormData = function() {
         // Client action rejects form query.
         //
         // This test can only run in development mode, pass otherwise.


More information about the Kukit-checkins mailing list