Bug 905591 - Use Tabs.loadUrl() instead of Tabs.loadUrlInTab() in JavascriptTest (r=nalexander)
authorLucas Rocha <lucasr@mozilla.com>
Mon, 19 Aug 2013 21:33:49 +0100
changeset 143565 63f9dbf0e3923e152e819fe6f00dd7370953aa7f
parent 143564 20273eaf47db49bdf84dbb1f2042c1e85035ddd4
child 143566 1efcc5f4d314f361183bab9498e4d60c0bf0914c
push id25130
push userlrocha@mozilla.com
push dateWed, 21 Aug 2013 09:41:27 +0000
treeherdermozilla-central@b2486721572e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs905591
milestone26.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 905591 - Use Tabs.loadUrl() instead of Tabs.loadUrlInTab() in JavascriptTest (r=nalexander)
mobile/android/base/tests/BaseTest.java.in
mobile/android/base/tests/JavascriptTest.java.in
--- a/mobile/android/base/tests/BaseTest.java.in
+++ b/mobile/android/base/tests/BaseTest.java.in
@@ -251,26 +251,26 @@ abstract class BaseTest extends Activity
 
     /**
      * Load <code>url</code> using reflection and the internal
      * <code>org.mozilla.gecko.Tabs</code> API.
      *
      * This method does not wait for any confirmation from Gecko before
      * returning.
      */
-    protected final void loadUrlInTab(final String url) {
+    protected final void loadUrl(final String url) {
         try {
             ClassLoader classLoader = getActivity().getClassLoader();
             Class tabsClass = classLoader.loadClass("org.mozilla.gecko.Tabs");
             Method getInstance = tabsClass.getMethod("getInstance");
-            Method loadUrlInTab = tabsClass.getMethod("loadUrlInTab", String.class);
+            Method loadUrl = tabsClass.getMethod("loadUrl", String.class);
             Object tabs = getInstance.invoke(null);
-            loadUrlInTab.invoke(tabs, new Object[] { url });
+            loadUrl.invoke(tabs, new Object[] { url });
         } catch (Exception e) {
-            mAsserter.dumpLog("Exception in loadUrlInTab", e);
+            mAsserter.dumpLog("Exception in loadUrl", e);
             throw new RuntimeException(e);
         }
     }
 
     public final void verifyUrl(String url) {
         Element urlEditText = mDriver.findElement(mActivity, URL_EDIT_TEXT_ID);
         String urlBarText = null;
         if (urlEditText != null) {
--- a/mobile/android/base/tests/JavascriptTest.java.in
+++ b/mobile/android/base/tests/JavascriptTest.java.in
@@ -99,17 +99,17 @@ public class JavascriptTest extends Base
         // because the test harness runs each test in the suite (and possibly
         // completes testing) before the page load event is fired.
         final Actions.EventExpecter expecter = mActions.expectGeckoEvent("Robocop:Status");
         mAsserter.dumpLog("Registered listener for Robocop:Status");
 
         final String url = getAbsoluteUrl("/robocop/robocop_javascript.html?path=" + javascriptUrl);
         mAsserter.dumpLog("Loading JavaScript test from " + url);
 
-        loadUrlInTab(url);
+        loadUrl(url);
 
         final JavascriptTestMessageParser testMessageParser =
             new JavascriptTestMessageParser(mAsserter);
 
         try {
             while (true) {
                 if (Log.isLoggable(LOGTAG, Log.VERBOSE)) {
                     Log.v(LOGTAG, "Waiting for Robocop:Status");