[Qaa-cvs-commit] [qaa] src/chrome/content/qaagent

aducou at users.labs.libre-entreprise.org aducou at users.labs.libre-entreprise.org
Fri Jun 24 12:22:05 CEST 2005


Changement dans le répertoire qaa/src/chrome/content/qaagent:
---
Handling of the FIXMEs before releasing.
---  (par aducou)

Fichiers affectés:
-----------------
definitionByExample.js modifié     (1.7 -> 1.8)
editState.js         modifié     (1.2 -> 1.3)
editState.xul        modifié     (1.2 -> 1.3)
functions.js         modifié     (1.2 -> 1.3)
loadAndSave.js       modifié     (1.2 -> 1.3)
-------------- next part --------------
Index: qaa/src/chrome/content/qaagent/definitionByExample.js
diff -u qaa/src/chrome/content/qaagent/definitionByExample.js:1.7 qaa/src/chrome/content/qaagent/definitionByExample.js:1.8
--- qaa/src/chrome/content/qaagent/definitionByExample.js:1.7	Tue Jun  7 14:25:40 2005
+++ qaa/src/chrome/content/qaagent/definitionByExample.js	Fri Jun 24 10:22:00 2005
@@ -74,8 +74,8 @@
 
 function newFillValue(event) {
 // FIXME: debug purpose only
-  log("newFillValue on a "+event.target.nodeName+" element\n");
-  debugVal = event;
+//  log("newFillValue on a "+event.target.nodeName+" element\n");
+//  debugVal = event;
 
 
   switch(event.target.nodeName) {
@@ -109,8 +109,8 @@
 
 function newClick(event) {
 // FIXME: debug purpose only
-  log("newClick on a "+event.target.nodeName+" element\n");
-  debugVal = event;
+//  log("newClick on a "+event.target.nodeName+" element\n");
+//  debugVal = event;
 
   var action = [];
 
@@ -261,7 +261,7 @@
     do {
       //ret = prompt("Name the new state", "New State");
       ret = "New State";  // FIXME: temporary, as long as the firefox prompt bug is not resolved in Debian Sarge.
-                          //    https://bugzilla.mozilla.org/show_bug.cgi?id=272455
+                            //    https://bugzilla.mozilla.org/show_bug.cgi?id=272455
 
       if (ret) {
         newState.name = ret;

Index: qaa/src/chrome/content/qaagent/editState.js
diff -u qaa/src/chrome/content/qaagent/editState.js:1.2 qaa/src/chrome/content/qaagent/editState.js:1.3
--- qaa/src/chrome/content/qaagent/editState.js:1.2	Wed Mar 16 11:04:08 2005
+++ qaa/src/chrome/content/qaagent/editState.js	Fri Jun 24 10:22:00 2005
@@ -106,8 +106,9 @@
 }
 
 function deleteAction() {
-// FIXME
-  alert('not yet implemented')
+  for (var i in actionListbox.selectedItems) {
+    actionListbox.removeItemAt(actionListbox.getIndexOfItem(actionListbox.selectedItems[i])+1);
+  }
 }
 
 

Index: qaa/src/chrome/content/qaagent/editState.xul
diff -u qaa/src/chrome/content/qaagent/editState.xul:1.2 qaa/src/chrome/content/qaagent/editState.xul:1.3
--- qaa/src/chrome/content/qaagent/editState.xul:1.2	Wed Mar 16 11:04:08 2005
+++ qaa/src/chrome/content/qaagent/editState.xul	Fri Jun 24 10:22:00 2005
@@ -59,7 +59,7 @@
    <textbox id="stateName"/>
 
    <label value="Actions"/>
-   <listbox id="actions" flex="3"  context="editStateActionContextualMenu">
+   <listbox id="actions" flex="3"  context="editStateActionContextualMenu" seltype="multiple">
     <listhead>
      <listheader label="Type"/>
      <listheader label="XPath"/>

Index: qaa/src/chrome/content/qaagent/functions.js
diff -u qaa/src/chrome/content/qaagent/functions.js:1.2 qaa/src/chrome/content/qaagent/functions.js:1.3
--- qaa/src/chrome/content/qaagent/functions.js:1.2	Fri Feb 18 15:32:32 2005
+++ qaa/src/chrome/content/qaagent/functions.js	Fri Jun 24 10:22:00 2005
@@ -95,9 +95,9 @@
 
 }
 
-function obs(val) {
+function obs(val,limit) {
+  if(typeof(limit)=="undefined") limit=10;
   txt = '';
-  limit = 10;
   n = 0;
   for (var i in val) {
     txt += "val["+i+"]="+val[i]+"\n";
@@ -110,6 +110,24 @@
   return txt;
 }
 
+function diff(val1, val2) {
+  txt = '';
+  n = 0;
+  limit=10;
+  for (var i in val1) {
+    if (val1[i]!=val2[i]) {
+     txt += "val1["+i+"]="+val1[i]+" != ";
+     txt += "val2["+i+"]="+val2[i]+"\n";
+    }
+    n++;
+    if (n>limit) {
+      txt += "Too many children, stopping !";
+      break; 
+    }
+  }
+  return txt;
+}
+
 function obsTreeLog(states, prof, logPanelName) {
 
   log(obsTree(states, prof), logPanelName);
@@ -147,6 +165,13 @@
 }
 
 
+/* Prompt function simulation to workaround firefox 1.0.1 bug
+ *     https://bugzilla.mozilla.org/show_bug.cgi?id=272455   
+
+function prompt(question, answer) {
+  window.openDialog('chrome://qaagent/content/prompt.xul', 'prompt', 'chrome', question, answer);
+}
+*/
 
 
 /* Fonctions de Log */

Index: qaa/src/chrome/content/qaagent/loadAndSave.js
diff -u qaa/src/chrome/content/qaagent/loadAndSave.js:1.2 qaa/src/chrome/content/qaagent/loadAndSave.js:1.3
--- qaa/src/chrome/content/qaagent/loadAndSave.js:1.2	Fri Mar 25 10:23:43 2005
+++ qaa/src/chrome/content/qaagent/loadAndSave.js	Fri Jun 24 10:22:00 2005
@@ -22,6 +22,8 @@
 
   var debugLoadAndSave = false;
 
+//var qaaDirectory = "/home/tonux/svn/adhes2/QA/qaagent/src/chrome/content/qaagent/";
+
 function loadTestTree(filename) {
  try {
   var thefile;
@@ -35,7 +37,9 @@
     fp.appendFilters(nsIFilePicker.filterAll);
 
     var directory = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
-    directory.initWithPath("/home/tonux/svn/adhes2/QA/qaagent/src/chrome/content/qaagent/"); // FIXME: supposed to be the current or last opened directory
+    if (typeof(qaaDirectory)!="undefined") {
+      directory.initWithPath(qaaDirectory); // FIXME: supposed to be the current or last opened directory
+    }
     fp.displayDirectory = directory;
 
     var res = fp.show();
@@ -43,6 +47,7 @@
       thefile = fp.file;
     }
     else {
+      return;
       //raise("File picker error");
     }
   } 
@@ -75,7 +80,7 @@
 function XMLtoStateTree(node, prof) {
   // empty StateTree
 
-var debug = false; // FIXME
+var debug = false;
 
 if(debug) {
 
@@ -180,7 +185,9 @@
   fp.appendFilters(nsIFilePicker.filterAll);
 
   var directory = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
-  directory.initWithPath("/home/tonux/svn/adhes2/QA/qaagent/src/chrome/content/qaagent/"); // FIXME: supposed to be the current or last opened directory
+  if (typeof(qaaDirectory)!="undefined") {
+    directory.initWithPath("/home/tonux/svn/adhes2/QA/qaagent/src/chrome/content/qaagent/"); // FIXME: supposed to be the current or last opened directory
+  }
   fp.displayDirectory = directory;
 
   var res = fp.show();


More information about the Qaa-cvs-commit mailing list