Bug 918494 - Show a toast only after a bookmark is added and re-enable testLinkContextMenu. r=mfinkle
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 11 Jun 2014 14:48:38 -0700
changeset 188181 8da1a657058f561c4b5d1ed9060936951eb3ccc5
parent 188180 83be53bc8db94d0ce08fbd52f21974af70457e52
child 188182 db5e9bc213dbb528fdfec6faae5a9a806e9c4ba1
push id7247
push usermichael.l.comella@gmail.com
push dateWed, 11 Jun 2014 21:47:35 +0000
treeherderfx-team@8da1a657058f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs918494
milestone33.0a1
Bug 918494 - Show a toast only after a bookmark is added and re-enable testLinkContextMenu. r=mfinkle
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"