diff --git a/mobile/android/base/tests/robocop.ini b/mobile/android/base/tests/robocop.ini index ecb70d6d0e84..dff29c3d0da0 100644 --- a/mobile/android/base/tests/robocop.ini +++ b/mobile/android/base/tests/robocop.ini @@ -39,7 +39,6 @@ skip-if = android_version == "10" # disabled on x86 only; bug 927476 skip-if = processor == "x86" [testFormHistory] -[testGeckoMenu] [testGetUserMedia] # disabled on 2.3; bug 979620 skip-if = android_version == "10" diff --git a/mobile/android/base/tests/testGeckoMenu.java b/mobile/android/base/tests/testGeckoMenu.java deleted file mode 100644 index cae0d96d9b82..000000000000 --- a/mobile/android/base/tests/testGeckoMenu.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.AppConstants; -import org.mozilla.gecko.menu.GeckoMenu; -import org.mozilla.gecko.util.ThreadUtils; - -public class testGeckoMenu extends BaseTest { - - private volatile Exception exception; - private void setException(Exception e) { - this.exception = e; - } - - @Override - protected int getTestType() { - return TEST_MOCHITEST; - } - - public void testMenuThreading() throws InterruptedException { - final GeckoMenu menu = new GeckoMenu(mSolo.getCurrentActivity()); - final Object semaphore = new Object(); - - ThreadUtils.postToUiThread(new Runnable() { - @Override - public void run() { - try { - menu.add("test1"); - } catch (Exception e) { - setException(e); - } - - synchronized (semaphore) { - semaphore.notify(); - } - } - }); - synchronized (semaphore) { - semaphore.wait(); - } - mAsserter.is(exception, null, "No exception thrown if called on UI thread."); - - new Thread(new Runnable() { - @Override - public void run() { - try { - menu.add("test2"); - } catch (Exception e) { - setException(e); - } - - synchronized (semaphore) { - semaphore.notify(); - } - } - }).start(); - synchronized (semaphore) { - semaphore.wait(); - } - - if (AppConstants.RELEASE_BUILD) { - mAsserter.is(exception, null, "No exception was thrown: release build."); - return; - } - - mAsserter.is(exception != null, true, "An exception was thrown."); - mAsserter.is(exception.getClass(), IllegalThreadStateException.class, "An IllegalThreadStateException was thrown."); - } -}