Bug 948591 - Intermittent testClearPrivateData | Exception caught - junit.framework.AssertionFailedError: Text string: '^Settings$' is not found! r?mcomella draft
authorJonathan Almeida [:jonalmeida] <jalmeida@mozilla.com>
Tue, 21 Jul 2015 19:30:31 -0700
changeset 285433 16fafc3e6d0d971496ca630e2aef4a934eeb10c0
parent 284166 7a19194812eb767bee7cdf8fc36ba9a383c1bead
child 508381 8aa71e1cb243bbbc21b721aa7e56ccfbbf1cf15e
push id4440
push userjalmeida@mozilla.com
push dateSun, 16 Aug 2015 06:27:46 +0000
reviewersmcomella
bugs948591
milestone42.0a1
Bug 948591 - Intermittent testClearPrivateData | Exception caught - junit.framework.AssertionFailedError: Text string: '^Settings$' is not found! r?mcomella
build/mobile/robocop/Actions.java
build/mobile/robocop/FennecNativeActions.java
--- a/build/mobile/robocop/Actions.java
+++ b/build/mobile/robocop/Actions.java
@@ -10,21 +10,17 @@ public interface Actions {
     /** Special keys supported by sendSpecialKey() */
     public enum SpecialKey {
         DOWN,
         UP,
         LEFT,
         RIGHT,
         ENTER,
         MENU,
-        /**
-         * @deprecated Use Solo.goBack() in Robocop instead.
-         */
-        @Deprecated
-        BACK
+        DELETE,
     }
 
     public interface EventExpecter {
         /** Blocks until the event has been received. Subsequent calls will return immediately. */
         public void blockForEvent();
         public void blockForEvent(long millis, boolean failOnTimeout);
 
         /** Blocks until the event has been received and returns data associated with the event. */
--- a/build/mobile/robocop/FennecNativeActions.java
+++ b/build/mobile/robocop/FennecNativeActions.java
@@ -349,30 +349,30 @@ public class FennecNativeActions impleme
                 sendKeyCode(KeyEvent.KEYCODE_DPAD_RIGHT);
                 break;
             case ENTER:
                 sendKeyCode(KeyEvent.KEYCODE_ENTER);
                 break;
             case MENU:
                 sendKeyCode(KeyEvent.KEYCODE_MENU);
                 break;
-            case BACK:
-                sendKeyCode(KeyEvent.KEYCODE_BACK);
+            case DELETE:
+                sendKeyCode(KeyEvent.KEYCODE_DEL);
                 break;
             default:
                 mAsserter.ok(false, "sendSpecialKey", "Unknown SpecialKey " + button);
                 break;
         }
     }
 
     public void sendKeyCode(int keyCode) {
         if (keyCode <= 0 || keyCode > KeyEvent.getMaxKeyCode()) {
             mAsserter.ok(false, "sendKeyCode", "Unknown keyCode " + keyCode);
         }
-        mInstr.sendCharacterSync(keyCode);
+        mSolo.sendKey(keyCode);
     }
 
     @Override
     public void sendKeys(String input) {
         mInstr.sendStringSync(input);
     }
 
     public void drag(int startingX, int endingX, int startingY, int endingY) {