Bug 527935 - Part 2: Fix some unit tests to deal with the changes in the input event; r=dolske a=blocking-final+
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 17 Dec 2010 14:47:09 -0800
changeset 59461 839bb8d210a9b62a1728386cdcd579fa429eb8e8
parent 59460 83f76e76d7803b8f2a6ca1a72bbd1263875c4fab
child 59462 d52d8f50d2cfebf0b77cc976fab1d7525eaff2b1
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersdolske, blocking-final
bugs527935
milestone2.0b9pre
Bug 527935 - Part 2: Fix some unit tests to deal with the changes in the input event; r=dolske a=blocking-final+
toolkit/components/satchel/test/test_bug_511615.html
--- a/toolkit/components/satchel/test/test_bug_511615.html
+++ b/toolkit/components/satchel/test/test_bug_511615.html
@@ -205,49 +205,43 @@ function runTest(testNum) {
         checkForm("");
         break;
     // try a keypress
     case 14:
         doKeyUnprivledged('v');
         nextTestPrivledged = true;
         break;
     case 15:
-        // XXX even with patch the popup is still opened.
-        // the keypress triggers a form input oninput / onchange
-        todo(false, "popup should be closed");
-        checkPopupOpen(true, -1);
+        checkPopupOpen(false);
         checkForm("v");
         break;
     // try a space
     case 16:
         doKeyUnprivledged(" ");
         nextTestPrivledged = true;
         break;
     case 17:
-        todo(false, "popup should be closed");
-        checkPopupOpen(true, -1);
+        checkPopupOpen(false);
         checkForm("v ");
         break;
     // backspace
     case 18:
         doKeyUnprivledged("back_space");
         nextTestPrivledged = true;
         break;
     case 19:
-        todo(false, "popup should be closed");
-        checkPopupOpen(true, -1);
+        checkPopupOpen(false);
         checkForm("v");
         nextTestPrivledged = true;
         break;
     case 20:
         // We're privledged for this test, so open the popup.
-        todo(false, "popup should be closed");
-        checkPopupOpen(true, -1);
+        checkPopupOpen(false);
         checkForm("v");
-//        doKey("down");
+        doKey("down");
         nextTestPrivledged = true;
         break;
     case 21:
         checkPopupOpen(true, -1);
         checkForm("v");
         testNum = 99;
         break;
 
@@ -326,33 +320,32 @@ function runTest(testNum) {
         break;
     // try a space
     case 202:
         doKeyUnprivledged(" ");
         nextTestPrivledged = true;
         break;
     case 203:
         // XXX we should ignore this input while popup is open?
-        checkPopupOpen(true, -1);
+        checkPopupOpen(true, 0);
         checkForm("v ");
         break;
     // backspace
     case 204:
         doKeyUnprivledged("back_space");
         nextTestPrivledged = true;
         break;
     case 205:
         // XXX we should ignore this input while popup is open?
-        checkPopupOpen(true, -1);
+        checkPopupOpen(true, 0);
         checkForm("v");
         nextTestPrivledged = true;
         break;
-    // Oops, reselect 1st entry
     case 206:
-        doKey("down");
+        // (this space intentionally left blank)
         nextTestPrivledged = true;
         break;
     case 207:
         checkPopupOpen(true, 0);
         checkForm("v");
         break;
     // try a return
     case 208:
@@ -366,17 +359,17 @@ function runTest(testNum) {
         break;
     // Send a real Escape to ensure popup closed at end of test.
     case 210:
         doKey("escape");
         nextTestPrivledged = true;
         break;
     case 211:
         checkPopupOpen(false);
-        checkForm("v");
+        checkForm("");
 
 
         SimpleTest.finish();
         return;
 
     default:
         ok(false, "Unexpected invocation of test #" + testNum);
         SimpleTest.finish();