Bug 918494 - Show a toast only after a bookmark is added and re-enable testLinkContextMenu. r=mfinkle, a=lmandel
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 11 Jun 2014 14:48:38 -0700
changeset 208235 75f28c2476327c40ef3436cf72f5f09cf8672379
parent 208234 1e6dd7f30a2b094fa744de6a91b62bfabf0995c3
child 208236 44ef5ff8a390466dfdf87cee2eb7ab7fc0e84f75
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, lmandel
bugs918494
milestone32.0a2
Bug 918494 - Show a toast only after a bookmark is added and re-enable testLinkContextMenu. r=mfinkle, a=lmandel
mobile/android/base/GeckoApp.java
mobile/android/base/tests/robocop.ini
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -533,24 +533,24 @@ public abstract class GeckoApp
                               final EventCallback callback) {
         if ("Accessibility:Ready".equals(event)) {
             GeckoAccessibility.updateAccessibilitySettings(this);
 
         } else if ("Bookmark:Insert".equals(event)) {
             final String url = message.getString("url");
             final String title = message.getString("title");
             final Context context = this;
-            ThreadUtils.postToUiThread(new Runnable() {
+            ThreadUtils.postToBackgroundThread(new Runnable() {
                 @Override
                 public void run() {
-                    Toast.makeText(context, R.string.bookmark_added, Toast.LENGTH_SHORT).show();
-                    ThreadUtils.postToBackgroundThread(new Runnable() {
+                    BrowserDB.addBookmark(getContentResolver(), title, url);
+                    ThreadUtils.postToUiThread(new Runnable() {
                         @Override
                         public void run() {
-                            BrowserDB.addBookmark(getContentResolver(), title, url);
+                            Toast.makeText(context, R.string.bookmark_added, Toast.LENGTH_SHORT).show();
                         }
                     });
                 }
             });
 
         } else if ("Contact:Add".equals(event)) {
             final String email = message.optString("email", null);
             final String phone = message.optString("phone", null);
--- a/mobile/android/base/tests/robocop.ini
+++ b/mobile/android/base/tests/robocop.ini
@@ -47,18 +47,16 @@ skip-if = android_version == "10"
 # disabled on x86 only; bug 957185
 skip-if = processor == "x86"
 [testImportFromAndroid]
 # disabled on x86 and 2.3; bug 900664, 979552
 skip-if = android_version == "10" || processor == "x86"
 [testInputUrlBar]
 [testJarReader]
 [testLinkContextMenu]
-# disabled on 2.3; bug 918494
-skip-if = android_version == "10"
 # [testHomeListsProvider] # see bug 952310
 [testHomeProvider]
 [testLoad]
 [testMailToContextMenu]
 [testMasterPassword]
 # disabled on 2.3; bug 979603
 # disabled on 4.0; bug 1006242
 skip-if = android_version == "10" || android_version == "15"