Bug 705957. (Bv2) test_bug_511615.html: Improve the spelling of "priviledged". r=ehsan.
authorSerge Gautherie <sgautherie.bz@free.fr>
Thu, 05 Jan 2012 14:19:14 +0100
changeset 85027 8d341b0d890400c803281415dc0bccd0c687c52e
parent 85026 5413ba3ed406e2caa85af69d3ace66fd45ae8d27
child 85028 2c8e6bd39c55fa2c549e7385aa330f647b491f08
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs705957
milestone12.0a1
Bug 705957. (Bv2) test_bug_511615.html: Improve the spelling of "priviledged". r=ehsan. DONTBUILD (test-only, spelling-only).
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
@@ -69,17 +69,17 @@ function checkPopupOpen(isOpen, expected
             autocompletePopup.openPopup();
         else
             autocompletePopup.closePopup();
     }
     if (isOpen && actualIndex != expectedIndex)
         autocompletePopup.selectedIndex = expectedIndex;
 }
 
-function doKeyUnpriviledged(key) {
+function doKeyUnprivileged(key) {
     var keyName = "DOM_VK_" + key.toUpperCase();
     var keycode, charcode, alwaysVal;
 
     if (key.length == 1) {
         keycode = 0;
         charcode = key.charCodeAt(0);
         alwaysval = charcode;
     } else {
@@ -98,17 +98,17 @@ function doKeyUnpriviledged(key) {
     prEvent.initKeyEvent("keypress", true, true, null, false, false, false, false, keycode, charcode);
     upEvent.initKeyEvent("keyup",    true, true, null, false, false, false, false, alwaysval, 0);
 
     input.dispatchEvent(dnEvent);
     input.dispatchEvent(prEvent);
     input.dispatchEvent(upEvent);
 }
 
-function doClickUnpriviledged() {
+function doClickUnprivileged() {
     var dnEvent = document.createEvent('MouseEvent');
     var upEvent = document.createEvent('MouseEvent');
     var ckEvent = document.createEvent('MouseEvent');
 
     dnEvent.initMouseEvent("mousedown",  true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
     upEvent.initMouseEvent("mouseup",    true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
     ckEvent.initMouseEvent("mouseclick", true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
 
@@ -125,17 +125,17 @@ function doClickUnpriviledged() {
  * setTimeout() calls. The case statements are executed in order, one per
  * timeout.
  */
 var nextTestPrivledged = true;
 function runTest(testNum) {
   ok(true, "Starting test #" + testNum);
 
   if (nextTestPrivledged) {
-      ok(true, "This test is priviledged.");
+      ok(true, "This test is privileged.");
       netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
       nextTestPrivledged = false;
   }
 
   switch(testNum) {
     //
     // Check initial state
     //
@@ -163,81 +163,81 @@ function runTest(testNum) {
         nextTestPrivledged = true;
         break;
     case 5:
         checkPopupOpen(false);
         checkForm("");
         break;
     // try a mouseclick event
     case 6:
-        doClickUnpriviledged();
+        doClickUnprivileged();
         nextTestPrivledged = true;
         break;
     case 7:
         checkPopupOpen(false);
         checkForm("");
         break;
     // try a down-arrow
     case 8:
-        doKeyUnpriviledged("down");
+        doKeyUnprivileged("down");
         nextTestPrivledged = true;
         break;
     case 9:
         checkPopupOpen(false);
         checkForm("");
         break;
     // try a page-down
     case 10:
-        doKeyUnpriviledged("page_down");
+        doKeyUnprivileged("page_down");
         nextTestPrivledged = true;
         break;
     case 11:
         checkPopupOpen(false);
         checkForm("");
         break;
     // try a return
     case 12:
 // XXX this causes later tests to fail for some reason.
-//        doKeyUnpriviledged("return"); // not "enter"!
+//        doKeyUnprivileged("return"); // not "enter"!
         nextTestPrivledged = true;
         break;
     case 13:
         checkPopupOpen(false);
         checkForm("");
         break;
     // try a keypress
     case 14:
-        doKeyUnpriviledged('v');
+        doKeyUnprivileged('v');
         nextTestPrivledged = true;
         break;
     case 15:
         checkPopupOpen(false);
         checkForm("");
         break;
     // try a space
     case 16:
-        doKeyUnpriviledged(" ");
+        doKeyUnprivileged(" ");
         nextTestPrivledged = true;
         break;
     case 17:
         checkPopupOpen(false);
         checkForm("");
         break;
     // backspace
     case 18:
-        doKeyUnpriviledged("back_space");
+        doKeyUnprivileged("back_space");
         nextTestPrivledged = true;
         break;
     case 19:
         checkPopupOpen(false);
         checkForm("");
         nextTestPrivledged = true;
         break;
     case 20:
-        // We're priviledged for this test, so open the popup.
+        // We're privileged for this test, so open the popup.
         checkPopupOpen(false);
         checkForm("");
         doKey("down");
         nextTestPrivledged = true;
         break;
     case 21:
         checkPopupOpen(true, -1);
         checkForm("");
@@ -245,97 +245,97 @@ function runTest(testNum) {
         break;
 
     //
     // Try to change the selected autocomplete item from untrusted events
     //
 
     // try a down-arrow
     case 100:
-        doKeyUnpriviledged("down");
+        doKeyUnprivileged("down");
         nextTestPrivledged = true;
         break;
     case 101:
         checkPopupOpen(true, -1);
         checkForm("");
         break;
     // try a page-down
     case 102:
-        doKeyUnpriviledged("page_down");
+        doKeyUnprivileged("page_down");
         nextTestPrivledged = true;
         break;
     case 103:
         checkPopupOpen(true, -1);
         checkForm("");
         nextTestPrivledged = true;
         break;
     // really adjust the index
     case 104:
-        // (We're priviledged for this test.) Try a priviledged down-arrow.
+        // (We're privileged for this test.) Try a privileged down-arrow.
         doKey("down");
         nextTestPrivledged = true;
         break;
     case 105:
         checkPopupOpen(true, 0);
         checkForm("");
         break;
     // try a down-arrow
     case 106:
-        doKeyUnpriviledged("down");
+        doKeyUnprivileged("down");
         nextTestPrivledged = true;
         break;
     case 107:
         checkPopupOpen(true, 0);
         checkForm("");
         break;
     // try a page-down
     case 108:
-        doKeyUnpriviledged("page_down");
+        doKeyUnprivileged("page_down");
         nextTestPrivledged = true;
         break;
     case 109:
         checkPopupOpen(true, 0);
         checkForm("");
     // try a keypress
     case 110:
         // XXX this causes the popup to close, and makes the value "vaa" (sic)
-        //doKeyUnpriviledged('a');
+        //doKeyUnprivileged('a');
         nextTestPrivledged = true;
         break;
     case 111:
         checkPopupOpen(true, 0);
         checkForm("");
         testNum = 199;
         break;
 
     //
     // Try to use the selected autocomplete item from untrusted events
     //
     // try a right-arrow
     case 200:
-        doKeyUnpriviledged("right");
+        doKeyUnprivileged("right");
         nextTestPrivledged = true;
         break;
     case 201:
         checkPopupOpen(true, 0);
         checkForm("");
         break;
     // try a space
     case 202:
-        doKeyUnpriviledged(" ");
+        doKeyUnprivileged(" ");
         nextTestPrivledged = true;
         break;
     case 203:
         // XXX we should ignore this input while popup is open?
         checkPopupOpen(true, 0);
         checkForm("");
         break;
     // backspace
     case 204:
-        doKeyUnpriviledged("back_space");
+        doKeyUnprivileged("back_space");
         nextTestPrivledged = true;
         break;
     case 205:
         // XXX we should ignore this input while popup is open?
         checkPopupOpen(true, 0);
         checkForm("");
         nextTestPrivledged = true;
         break;
@@ -345,26 +345,26 @@ function runTest(testNum) {
         break;
     case 207:
         checkPopupOpen(true, 0);
         checkForm("");
         break;
     // try a return
     case 208:
 // XXX this seems to cause problems with reliably closing the popup
-//        doKeyUnpriviledged("return"); // not "enter"!
+//        doKeyUnprivileged("return"); // not "enter"!
         nextTestPrivledged = true;
         break;
     case 209:
         checkPopupOpen(true, 0);
         checkForm("");
         break;
     // Send a real Escape to ensure popup closed at end of test.
     case 210:
-        // Need to use doKey(), even though this test is not priviledged.
+        // Need to use doKey(), even though this test is not privileged.
         doKey("escape");
         nextTestPrivledged = true;
         break;
     case 211:
         checkPopupOpen(false);
         checkForm("");
 
         SimpleTest.finish();