--- a/mobile/android/tests/browser/robocop/assets/README
+++ b/mobile/android/tests/browser/robocop/assets/README
@@ -1,4 +1,4 @@
You can place test assets in this file.
-They can be read as raw InputStreams with the getAsset() method in BaseTest.
+They can be read as raw InputStreams with the getAsset() method in OldBaseTest.
(This file is a placeholder to ensure that the assets/ directory exists, as it is referenced in the robocop Makefile.)
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/AboutHomeTest.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/AboutHomeTest.java
@@ -17,20 +17,20 @@ import android.view.ViewGroup;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TabWidget;
import android.widget.TextView;
import com.robotium.solo.Condition;
/**
- * This class is an extension of BaseTest that helps with interaction with about:home
+ * This class is an extension of OldBaseTest that helps with interaction with about:home
* This class contains methods that access the different tabs from about:home, methods that get information like history and bookmarks from the database, edit and remove bookmarks and history items
* The purpose of this class is to collect all the logically connected methods that deal with about:home
- * To use any of these methods in your test make sure it extends AboutHomeTest instead of BaseTest
+ * To use any of these methods in your test make sure it extends AboutHomeTest instead of OldBaseTest
*/
abstract class AboutHomeTest extends PixelTest {
protected enum AboutHomeTabs {
RECENT_TABS,
HISTORY,
TOP_SITES,
BOOKMARKS,
};
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/ContentProviderTest.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/ContentProviderTest.java
@@ -20,42 +20,41 @@ import android.content.Context;
import android.content.OperationApplicationException;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.content.res.AssetManager;
import android.content.res.Resources;
import android.database.ContentObserver;
import android.database.Cursor;
import android.net.Uri;
-import android.os.Build;
import android.test.IsolatedContext;
import android.test.RenamingDelegatingContext;
import android.test.mock.MockContentResolver;
import android.test.mock.MockContext;
/*
* ContentProviderTest provides the infrastructure to run content provider
* tests in an controlled/isolated environment, guaranteeing that your tests
* will not affect or be affected by any UI-related code. This is basically
* a heavily adapted port of Android's ProviderTestCase2 to work on Mozilla's
* infrastructure.
*
* For some tests, we need to have access to UI parts, or at least launch
* the activity so the assets with test data become available, which requires
- * that we derive this test from BaseTest and consequently pull in some more
+ * that we derive this test from OldBaseTest and consequently pull in some more
* UI code than we'd ideally want. Furthermore, we need to pass the
* Activity and not the instrumentation Context for the UI part to find some
* of its required resources.
* Similarly, we need to pass the Activity instead of the Instrumentation
* Context down to some of our users (still wrapped in the Delegating Provider)
* because they will stop working correctly if we do not. A typical problem
* is that databases used in the ContentProvider will be attempted to be
* opened twice.
*/
-abstract class ContentProviderTest extends BaseTest {
+abstract class ContentProviderTest extends OldBaseTest {
protected ContentProvider mProvider;
protected ChangeRecordingMockContentResolver mResolver;
protected ArrayList<Runnable> mTests;
protected String mDatabaseName;
protected String mProviderAuthority;
protected IsolatedContext mProviderContext;
private class ContentProviderMockContext extends MockContext {
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/JavascriptTest.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/JavascriptTest.java
@@ -13,17 +13,17 @@ import android.util.Log;
/**
* Extended to test stand-alone Javascript in automation. If you're looking to test JS interactions
* with Java, see {@link JavascriptBridgeTest}.
*
* There are also other tests that run stand-alone javascript but are more difficult for the mobile
* team to run (e.g. xpcshell).
*/
-public class JavascriptTest extends BaseTest {
+public class JavascriptTest extends OldBaseTest {
private static final String LOGTAG = "JavascriptTest";
private static final String EVENT_TYPE = JavascriptBridge.EVENT_TYPE;
// Calculate these once, at initialization. isLoggable is too expensive to
// have in-line in each log call.
private static final boolean logDebug = Log.isLoggable(LOGTAG, Log.DEBUG);
private static final boolean logVerbose = Log.isLoggable(LOGTAG, Log.VERBOSE);
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/MediaPlaybackTest.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/MediaPlaybackTest.java
@@ -1,35 +1,33 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.tests;
-import org.mozilla.gecko.Actions;
import org.mozilla.gecko.R;
import org.mozilla.gecko.Tab;
import org.mozilla.gecko.Tabs;
import org.mozilla.gecko.media.AudioFocusAgent;
import org.mozilla.gecko.media.AudioFocusAgent.State;
import org.mozilla.gecko.media.MediaControlService;
import org.mozilla.gecko.tests.helpers.JavascriptBridge;
import android.content.Intent;
import android.content.Context;
import android.app.Notification;
import android.app.NotificationManager;
-import android.graphics.drawable.Icon;
import android.os.Build;
import android.service.notification.StatusBarNotification;
import com.robotium.solo.Condition;
-abstract class MediaPlaybackTest extends BaseTest {
+abstract class MediaPlaybackTest extends OldBaseTest {
private Context mContext;
private int mPrevIcon = 0;
protected String mPrevURL = "";
private JavascriptBridge mJs;
private static final int UI_CHANGED_WAIT_MS = 6000;
private static final int MEDIA_PLAYBACK_CHANGED_WAIT_MS = 15000;
rename from mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/BaseTest.java
rename to mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/OldBaseTest.java
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/BaseTest.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/OldBaseTest.java
@@ -46,17 +46,17 @@ import com.robotium.solo.Timeout;
/**
* A convenient base class suitable for most Robocop tests.
*
* This class is <strong>deprecated</strong>: please use {@link UITest} instead.
*/
@SuppressWarnings("unchecked")
@Deprecated
-abstract class BaseTest extends BaseRobocopTest {
+abstract class OldBaseTest extends BaseRobocopTest {
private static final int VERIFY_URL_TIMEOUT = 2000;
private static final int MAX_WAIT_ENABLED_TEXT_MS = 15000;
private static final int MAX_WAIT_HOME_PAGER_HIDDEN_MS = 15000;
private static final int MAX_WAIT_VERIFY_PAGE_TITLE_MS = 15000;
public static final int MAX_WAIT_MS = 4500;
public static final int LONG_PRESS_TIME = 6000;
private static final int GECKO_READY_WAIT_MS = 180000;
@@ -739,17 +739,17 @@ abstract class BaseTest extends BaseRobo
ensureMenuClosed();
}
pageShowExpecter.blockForEvent();
pageShowExpecter.unregisterListener();
}
// DEPRECATED!
- // Use BaseTest.toggleBookmark() in new code.
+ // Use OldBaseTest.toggleBookmark() in new code.
public void bookmark() {
mActions.sendSpecialKey(Actions.SpecialKey.MENU);
waitForText("^New Tab$");
if (mSolo.searchText("^Bookmark$")) {
// This is the Android 2.x so the button has text
mSolo.clickOnText("^Bookmark$");
} else {
Element bookmarkBtn = mDriver.findElement(getActivity(), R.id.bookmark);
@@ -825,17 +825,17 @@ abstract class BaseTest extends BaseRobo
return view;
}
}
return null;
}
/**
- * Abstract class for running small test cases within a BaseTest.
+ * Abstract class for running small test cases within a OldBaseTest.
*/
abstract class TestCase implements Runnable {
/**
* Implement tests here. setUp and tearDown for the test case
* should be handled by the parent test. This is so we can avoid the
* overhead of starting Gecko and creating profiles.
*/
protected abstract void test() throws Exception;
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/PixelTest.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/PixelTest.java
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.tests;
import org.mozilla.gecko.Actions;
import org.mozilla.gecko.PaintedSurface;
-abstract class PixelTest extends BaseTest {
+abstract class PixelTest extends OldBaseTest {
private static final long PAINT_CLEAR_DELAY = 10000; // milliseconds
protected final PaintedSurface loadAndGetPainted(String url) {
Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint();
loadUrlAndWait(url);
verifyHomePagerHidden();
paintExpecter.blockUntilClear(PAINT_CLEAR_DELAY);
paintExpecter.unregisterListener();
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/UITest.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/UITest.java
@@ -16,17 +16,17 @@ import org.mozilla.gecko.tests.component
import org.mozilla.gecko.tests.components.TabsPanelComponent;
import org.mozilla.gecko.tests.components.ToolbarComponent;
import org.mozilla.gecko.tests.helpers.HelperInitializer;
import com.robotium.solo.Solo;
/**
* A base test class for Robocop (UI-centric) tests. This and the related classes attempt to
- * provide a framework to improve upon the issues discovered with the previous BaseTest
+ * provide a framework to improve upon the issues discovered with the previous OldBaseTest
* implementation by providing simple test authorship and framework extension, consistency,
* and reliability.
*
* For documentation on writing tests and extending the framework, see
* https://wiki.mozilla.org/Mobile/Fennec/Android/UITest
*/
abstract class UITest extends BaseRobocopTest
implements UITestContext {
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testANRReporter.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testANRReporter.java
@@ -15,17 +15,17 @@ import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import org.json.JSONObject;
/**
* Tests the proper operation of the ANR reporter.
*/
-public class testANRReporter extends BaseTest {
+public class testANRReporter extends OldBaseTest {
private static final String ANR_ACTION = "android.intent.action.ANR";
private static final String PING_DIR = "saved-telemetry-pings";
private static final int WAIT_FOR_PING_TIMEOUT = 60000;
private static final String ANR_PATH = "/data/anr/traces.txt";
private static final String SAMPLE_ANR
= "----- pid 1 at 2014-01-15 18:55:51 -----\n"
+ "Cmd line: " + AppConstants.ANDROID_PACKAGE_NAME + "\n"
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutHomePageNavigation.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutHomePageNavigation.java
@@ -68,17 +68,17 @@ public class testAboutHomePageNavigation
mAboutHome.assertCurrentPanel(PanelType.COMBINED_HISTORY);
mAboutHome.swipeToPanelOnRight();
mAboutHome.assertCurrentPanel(PanelType.TOP_SITES);
}
// TODO: bug 943706 - reimplement this old test code.
/*
- // Removed by Bug 896576 - [fig] Remove [getAllPagesList] from BaseTest
+ // Removed by Bug 896576 - [fig] Remove [getAllPagesList] from OldBaseTest
// ListView list = getAllPagesList("about:firefox");
// Test normal sliding of the list left and right
ViewPager pager = (ViewPager)mSolo.getView(ViewPager.class, 0);
mAsserter.is(pager.getCurrentItem(), 0, "All pages is selected");
int width = mDriver.getGeckoWidth() / 2;
int y = mDriver.getGeckoHeight() / 2;
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testActivityStreamContextMenu.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testActivityStreamContextMenu.java
@@ -25,17 +25,17 @@ import org.mozilla.gecko.db.DBUtils;
import org.mozilla.gecko.activitystream.homepanel.menu.ActivityStreamContextMenu;
import org.mozilla.gecko.activitystream.homepanel.model.Highlight;
import org.mozilla.gecko.activitystream.homepanel.model.TopSite;
/**
* This test is unfortunately closely coupled to the current implementation, however it is still
* useful in that it tests the bookmark/history/pinned state specific menu items for correctness.
*/
-public class testActivityStreamContextMenu extends BaseTest {
+public class testActivityStreamContextMenu extends OldBaseTest {
private static final String TEST_URL = "http://example.com/test/url";
private BrowserDB db;
private ContentResolver contentResolver;
@Override
public void setUp() throws Exception {
super.setUp();
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarklets.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarklets.java
@@ -4,17 +4,17 @@
package org.mozilla.gecko.tests;
import org.mozilla.gecko.Actions;
import com.robotium.solo.Condition;
-public class testBookmarklets extends BaseTest {
+public class testBookmarklets extends OldBaseTest {
public void testBookmarklets() {
final String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL);
final String title = "alertBookmarklet";
final String js = "javascript:alert(12 + 10)";
final String expected = "22";
boolean alerted;
blockForGeckoReady();
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserSearchVisibility.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserSearchVisibility.java
@@ -10,17 +10,17 @@ import android.view.View;
import com.robotium.solo.Condition;
/**
* Test for browser search visibility.
* Sends queries from url bar input and verifies that browser search
* visibility is correct.
*/
-public class testBrowserSearchVisibility extends BaseTest {
+public class testBrowserSearchVisibility extends OldBaseTest {
public void testSearchSuggestions() {
blockForGeckoReady();
focusUrlBar();
// search should not be visible when editing mode starts
assertBrowserSearchVisibility(false);
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBug1217581.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBug1217581.java
@@ -3,17 +3,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.tests;
import org.mozilla.gecko.Telemetry;
-public class testBug1217581 extends BaseTest {
+public class testBug1217581 extends OldBaseTest {
// Take arbitrary histogram names used by Fennec.
private static final String TEST_HISTOGRAM_NAME = "FENNEC_SYNC_NUMBER_OF_SYNCS_COMPLETED";
private static final String TEST_KEYED_HISTOGRAM_NAME = "FX_MIGRATION_ERRORS";
private static final String TEST_KEY_NAME = "testBug1217581";
public void testBug1217581() {
blockForGeckoReady();
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testDBUtils.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testDBUtils.java
@@ -8,17 +8,17 @@ package org.mozilla.gecko.tests;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import org.mozilla.gecko.db.DBUtils;
import java.io.File;
import java.io.IOException;
-public class testDBUtils extends BaseTest {
+public class testDBUtils extends OldBaseTest {
public void testDBUtils() throws IOException {
final File cacheDir = getInstrumentation().getContext().getCacheDir();
final File dbFile = File.createTempFile("testDBUtils", ".db", cacheDir);
final SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(dbFile, null);
try {
mAsserter.ok(db != null, "Created DB.", null);
db.execSQL("CREATE TABLE foo (x INTEGER NOT NULL DEFAULT 0, y TEXT)");
final ContentValues v = new ContentValues();
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testDoorHanger.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testDoorHanger.java
@@ -12,17 +12,17 @@ import org.mozilla.gecko.util.GeckoBundl
/* This test will test if doorhangers are displayed and dismissed
The test will test:
* geolocation doorhangers - sharing and not sharing the location dismisses the doorhanger
* opening a new tab hides the doorhanger
* offline storage permission doorhangers - allowing and not allowing offline storage dismisses the doorhanger
* Password Manager doorhangers - Remember and Not Now options dismiss the doorhanger
*/
-public class testDoorHanger extends BaseTest {
+public class testDoorHanger extends OldBaseTest {
private boolean offlineAllowedByDefault = true;
public void testDoorHanger() {
String GEO_URL = getAbsoluteUrl(mStringHelper.ROBOCOP_GEOLOCATION_URL);
String BLANK_URL = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL);
String OFFLINE_STORAGE_URL = getAbsoluteUrl(mStringHelper.ROBOCOP_OFFLINE_STORAGE_URL);
blockForGeckoReady();
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFormHistory.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFormHistory.java
@@ -15,17 +15,17 @@ import android.net.Uri;
/**
* A basic form history contentprovider test.
* - inserts an element in form history when it is not yet set up
* - inserts an element in form history
* - updates an element in form history
* - deletes an element in form history
*/
-public class testFormHistory extends BaseTest {
+public class testFormHistory extends OldBaseTest {
private static final String DB_NAME = "formhistory.sqlite";
public void testFormHistory() {
Context context = (Context)getActivity();
ContentResolver cr = context.getContentResolver();
ContentValues[] cvs = new ContentValues[1];
cvs[0] = new ContentValues();
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testGetUserMedia.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testGetUserMedia.java
@@ -8,17 +8,17 @@ import org.mozilla.gecko.AppConstants;
import android.widget.Spinner;
import android.view.View;
import com.robotium.solo.Condition;
import android.hardware.Camera;
-public class testGetUserMedia extends BaseTest {
+public class testGetUserMedia extends OldBaseTest {
private static final String LOGTAG = testGetUserMedia.class.getSimpleName();
private static final String GUM_MESSAGE = "Would you like to share your camera and microphone with";
private static final String GUM_ALLOW = "^Share$";
private static final String GUM_DENY = "^Don't Share$";
private static final String GUM_BACK_CAMERA = "Back facing camera";
private static final String GUM_SELECT_TAB = "Choose a tab to stream";
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testInputUrlBar.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testInputUrlBar.java
@@ -10,17 +10,17 @@ import org.mozilla.gecko.R;
import android.widget.EditText;
/**
* Basic test of text editing within the editing mode.
* - Enter some text, move the cursor around, and modifying some text.
* - Check that all edit entry text is selected after switching about:home tabs.
*/
-public final class testInputUrlBar extends BaseTest {
+public final class testInputUrlBar extends OldBaseTest {
private Element mUrlBarEditElement;
private EditText mUrlBarEditView;
public void testInputUrlBar() {
blockForGeckoReady();
startEditingMode();
assertUrlBarText("");
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testJarReader.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testJarReader.java
@@ -10,17 +10,17 @@ import org.mozilla.gecko.AppConstants;
import org.mozilla.gecko.util.GeckoJarReader;
import android.content.Context;
/**
* A basic jar reader test. Tests reading a png from fennec's apk, as well
* as loading some invalid jar urls.
*/
-public class testJarReader extends BaseTest {
+public class testJarReader extends OldBaseTest {
public void testJarReader() {
// Invalid characters are escaped.
final String s = GeckoJarReader.computeJarURI("some[1].apk", "something/else");
mAsserter.ok(!s.contains("["), "Illegal characters are escaped away.", null);
mAsserter.ok(!s.toLowerCase().contains("%2f"), "Path characters aren't escaped.", null);
final Context context = getInstrumentation().getTargetContext().getApplicationContext();
String appPath = getActivity().getApplication().getPackageResourcePath();
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testNewTab.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testNewTab.java
@@ -3,22 +3,21 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.tests;
import org.mozilla.gecko.Element;
import org.mozilla.gecko.R;
import android.app.Activity;
-import android.view.View;
import com.robotium.solo.Condition;
/* A simple test that creates 2 new tabs and checks that the tab count increases. */
-public class testNewTab extends BaseTest {
+public class testNewTab extends OldBaseTest {
private Element tabCount = null;
private Element tabs = null;
private final Element closeTab = null;
private int tabCountInt = 0;
public void testNewTab() {
String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL);
String url2 = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_02_URL);
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testOSLocale.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testOSLocale.java
@@ -10,17 +10,17 @@ import org.mozilla.gecko.BrowserLocaleMa
import org.mozilla.gecko.GeckoSharedPrefs;
import org.mozilla.gecko.GeckoThread;
import org.mozilla.gecko.Locales;
import org.mozilla.gecko.PrefsHelper;
import android.content.SharedPreferences;
-public class testOSLocale extends BaseTest {
+public class testOSLocale extends OldBaseTest {
@Override
public void setUp() throws Exception {
super.setUp();
// Clear per-profile SharedPreferences as a workaround for Bug 1069687.
// We're trying to exercise logic that only applies on first onCreate!
// We can't rely on this occurring prior to the first broadcast, though,
// so see the main test method for more logic.
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPasswordEncrypt.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPasswordEncrypt.java
@@ -1,27 +1,26 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.tests;
import java.io.File;
-import org.json.JSONObject;
import org.mozilla.gecko.NSSBridge;
import org.mozilla.gecko.db.BrowserContract;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
-public class testPasswordEncrypt extends BaseTest {
+public class testPasswordEncrypt extends OldBaseTest {
public void testPasswordEncrypt() {
Context context = (Context)getActivity();
ContentResolver cr = context.getContentResolver();
mAsserter.isnot(cr, null, "Found a content resolver");
ContentValues cvs = new ContentValues();
blockForGeckoReady();
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPasswordProvider.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPasswordProvider.java
@@ -1,17 +1,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.tests;
import java.io.File;
-import org.mozilla.gecko.db.BrowserContract;
import org.mozilla.gecko.db.BrowserContract.GeckoDisabledHosts;
import org.mozilla.gecko.db.BrowserContract.Passwords;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
@@ -20,17 +19,17 @@ import android.net.Uri;
* A basic password contentprovider test.
* - inserts a password when the database is not yet set up
* - inserts a password
* - updates a password
* - deletes a password
* - inserts a disabled host
* - queries for disabled host
*/
-public class testPasswordProvider extends BaseTest {
+public class testPasswordProvider extends OldBaseTest {
private static final String DB_NAME = "signons.sqlite";
public void testPasswordProvider() {
Context context = (Context)getActivity();
ContentResolver cr = context.getContentResolver();
ContentValues[] cvs = new ContentValues[1];
cvs[0] = new ContentValues();
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPrefsObserver.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPrefsObserver.java
@@ -7,17 +7,17 @@ package org.mozilla.gecko.tests;
import org.mozilla.gecko.Actions;
/**
* Basic test to check bounce-back from overscroll.
* - Load the page and verify it draws
* - Drag page downwards by 100 pixels into overscroll, verify it snaps back.
* - Drag page rightwards by 100 pixels into overscroll, verify it snaps back.
*/
-public class testPrefsObserver extends BaseTest {
+public class testPrefsObserver extends OldBaseTest {
private static final String PREF_TEST_PREF = "robocop.tests.dummy";
private Actions.PrefWaiter prefWaiter;
private boolean prefValue;
public void setPref(boolean value) {
mAsserter.dumpLog("Setting pref");
mActions.setPref(PREF_TEST_PREF, value, /* flush */ false);
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPromptGridInput.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPromptGridInput.java
@@ -1,15 +1,15 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.tests;
-public class testPromptGridInput extends BaseTest {
+public class testPromptGridInput extends OldBaseTest {
protected int index = 1;
public void testPromptGridInput() {
blockForGeckoReady();
test(1);
testGridItem("Icon 1");
testGridItem("Icon 2");
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSearchSuggestions.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSearchSuggestions.java
@@ -14,17 +14,17 @@ import android.widget.TextView;
import com.robotium.solo.Condition;
/**
* Test for search suggestions.
* Sends queries from AwesomeBar input and verifies that suggestions match
* expected values.
*/
-public class testSearchSuggestions extends BaseTest {
+public class testSearchSuggestions extends OldBaseTest {
private static final int SUGGESTION_MAX = 3;
private static final int SUGGESTION_TIMEOUT = 15000;
private static final String TEST_QUERY = "foo barz";
private static final String SUGGESTION_TEMPLATE = "/robocop/robocop_suggestions.sjs?query=__searchTerms__";
public void testSearchSuggestions() {
// Mock the search system.
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSettingsPages.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSettingsPages.java
@@ -3,17 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.tests;
/* Tests the working of Settings menu:
* Traverses through every setting item and tests it.
*/
-public class testSettingsPages extends BaseTest {
+public class testSettingsPages extends OldBaseTest {
public void testSettingsPages() {
blockForGeckoReady();
// Open Settings Menu
selectMenuItem(mStringHelper.SETTINGS_LABEL);
// Assert that we are inside the Settings screen by checking if "General" section label is present and enabled
String itemName = "^" + mStringHelper.GENERAL_SECTION_LABEL + "$";
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testStumblerSetting.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testStumblerSetting.java
@@ -1,29 +1,28 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* * License, v. 2.0. If a copy of the MPL was not distributed with this
* * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.tests;
import org.mozilla.gecko.AppConstants;
-import org.mozilla.gecko.preferences.GeckoPreferences;
import org.mozilla.mozstumbler.service.AppGlobals;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import com.robotium.solo.Condition;
/*
* This test enables (checkbox checked) the Fennec setting to contribute to MLS, then waits for
* a response Intent from the stumbler service to confirm it has started. Then, it disables the
* service in the setting, and waits for confirmation that the servie has stopped.
*/
-public class testStumblerSetting extends BaseTest {
+public class testStumblerSetting extends OldBaseTest {
boolean mIsEnabled;
public void testStumblerSetting() {
if (!AppConstants.MOZ_STUMBLER_BUILD_TIME_ENABLED) {
mAsserter.info("Checking stumbler build config.", "Skipping test as Stumbler is not enabled in this build.");
return;
}
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testThumbnails.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testThumbnails.java
@@ -10,17 +10,17 @@ import com.robotium.solo.Condition;
/**
* Test for thumbnail updates.
* - loads 2 pages, each of which yield an HTTP 200
* - verifies thumbnails are updated for both pages
* - loads pages again; first page yields HTTP 200, second yields HTTP 404
* - verifies thumbnail is updated for HTTP 200, but not HTTP 404
* - finally, test that BrowserDB.removeThumbnails drops the thumbnails
*/
-public class testThumbnails extends BaseTest {
+public class testThumbnails extends OldBaseTest {
public void testThumbnails() {
final String site1Url = getAbsoluteUrl("/robocop/robocop_404.sjs?type=changeColor");
final String site2Url = getAbsoluteUrl("/robocop/robocop_404.sjs?type=do404");
final String site1Title = "changeColor";
final String site2Title = "do404";
// the session snapshot runnable is run 500ms after document stop. a
// 3000ms delay gives us 2.5 seconds to take the screenshot, which