[Checkins] SVN: zc.testbrowser/branches/sweh-mozlab0.1.9/src/zc/testbrowser/ Fix inability for controls to have names which are substrings of others

Graham Stratton gns24 at beasts.org
Sun Jul 20 03:27:42 EDT 2008


Log message for revision 88640:
  Fix inability for controls to have names which are substrings of others

Changed:
  U   zc.testbrowser/branches/sweh-mozlab0.1.9/src/zc/testbrowser/ftests/controls.html
  U   zc.testbrowser/branches/sweh-mozlab0.1.9/src/zc/testbrowser/real.js

-=-
Modified: zc.testbrowser/branches/sweh-mozlab0.1.9/src/zc/testbrowser/ftests/controls.html
===================================================================
--- zc.testbrowser/branches/sweh-mozlab0.1.9/src/zc/testbrowser/ftests/controls.html	2008-07-20 02:46:57 UTC (rev 88639)
+++ zc.testbrowser/branches/sweh-mozlab0.1.9/src/zc/testbrowser/ftests/controls.html	2008-07-20 07:27:40 UTC (rev 88640)
@@ -193,6 +193,12 @@
         </select>
       </div>
 
+      <div>
+        <label for="image-value-superstring">Control names should be able to be
+                                             superstrings of others</label>
+        <input type="text" name="image-value-superstring"
+               id="image-value-superstring" />
+      </div>
 
     </form>
 

Modified: zc.testbrowser/branches/sweh-mozlab0.1.9/src/zc/testbrowser/real.js
===================================================================
--- zc.testbrowser/branches/sweh-mozlab0.1.9/src/zc/testbrowser/real.js	2008-07-20 02:46:57 UTC (rev 88639)
+++ zc.testbrowser/branches/sweh-mozlab0.1.9/src/zc/testbrowser/real.js	2008-07-20 07:27:40 UTC (rev 88640)
@@ -295,7 +295,7 @@
     return tb_get_control_by_predicate(
         function (control) {
             var controlName = control.getAttribute('name');
-            return controlName != null && controlName.indexOf(name) != -1;
+            return controlName != null && controlName == name;
         }, index, true, tb_tokens[contextToken], xpath)
 }
 



More information about the Checkins mailing list