Bug 990116 - Part 3: Use BROWSER_INTENT_CLASS in browser JUnit 3 tests. r=mcomella
authorNick Alexander <nalexander@mozilla.com>
Tue, 01 Apr 2014 22:00:46 -0700
changeset 176623 49cb824b0da407507cf912b80ddbdd8d50795c26
parent 176622 ee4e3900536c9f089f38c42e06eee902fc2ff749
child 176624 3a9374b328cfc88837361be37b09f0ef94bdd20e
push id26527
push usercbook@mozilla.com
push dateWed, 02 Apr 2014 13:56:22 +0000
treeherdermozilla-central@80dcb8e46964 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella
bugs990116
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 990116 - Part 3: Use BROWSER_INTENT_CLASS in browser JUnit 3 tests. r=mcomella
mobile/android/tests/browser/junit3/src/tests/BrowserTestCase.java
--- a/mobile/android/tests/browser/junit3/src/tests/BrowserTestCase.java
+++ b/mobile/android/tests/browser/junit3/src/tests/BrowserTestCase.java
@@ -8,30 +8,20 @@ import org.mozilla.gecko.AppConstants;
 import android.app.Activity;
 import android.content.Context;
 import android.test.ActivityInstrumentationTestCase2;
 
 /**
  * BrowserTestCase provides helper methods for testing.
  */
 public class BrowserTestCase extends ActivityInstrumentationTestCase2<Activity> {
+    @SuppressWarnings("unused")
     private static String LOG_TAG = "BrowserTestCase";
 
-    private static final String LAUNCHER_ACTIVITY = AppConstants.ANDROID_PACKAGE_NAME + ".App";
-
-    private final static Class<Activity> sLauncherActivityClass;
-
-    static {
-        try {
-            sLauncherActivityClass = (Class<Activity>) Class.forName(LAUNCHER_ACTIVITY);
-        } catch (ClassNotFoundException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
+    @SuppressWarnings("unchecked")
     public BrowserTestCase() {
-        super(sLauncherActivityClass);
+        super((Class<Activity>) AppConstants.BROWSER_INTENT_CLASS);
     }
 
     public Context getApplicationContext() {
         return this.getInstrumentation().getTargetContext().getApplicationContext();
     }
 }