diff --git a/mobile/android/base/TabsAccessor.java b/mobile/android/base/TabsAccessor.java index d65d4bb37af..a09b7b24eef 100644 --- a/mobile/android/base/TabsAccessor.java +++ b/mobile/android/base/TabsAccessor.java @@ -21,7 +21,6 @@ import android.util.Log; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.regex.Pattern; public final class TabsAccessor { private static final String LOGTAG = "GeckoTabsAccessor"; @@ -50,7 +49,6 @@ public final class TabsAccessor { private static final String LOCAL_CLIENT_SELECTION = BrowserContract.Clients.GUID + " IS NULL"; private static final String LOCAL_TABS_SELECTION = BrowserContract.Tabs.CLIENT_GUID + " IS NULL"; - private static final Pattern FILTERED_URL_PATTERN = Pattern.compile("^(about|chrome|wyciwyg|file):.*$"); public static class RemoteTab { public String title; @@ -151,9 +149,9 @@ public final class TabsAccessor { int position = 0; for (Tab tab : tabs) { - // Skip this tab if it has a null URL or is in private browsing mode, or is a filtered URL. + // Skip this tab if it has a null URL or is in private browsing mode String url = tab.getURL(); - if (url == null || tab.isPrivate() || isFilteredURL(url)) + if (url == null || tab.isPrivate()) continue; ContentValues values = new ContentValues(); @@ -194,13 +192,4 @@ public final class TabsAccessor { insertLocalTabs(cr, tabs); updateLocalClient(cr); } - - /** - * Matches the supplied URL string against the set of URLs to filter. - * - * @return true if the supplied URL should be skipped; false otherwise. - */ - private static boolean isFilteredURL(String url) { - return FILTERED_URL_PATTERN.matcher(url).matches(); - } } diff --git a/mobile/android/base/tests/robocop.ini b/mobile/android/base/tests/robocop.ini index 4dd8a52fd82..73efd8c428d 100644 --- a/mobile/android/base/tests/robocop.ini +++ b/mobile/android/base/tests/robocop.ini @@ -32,7 +32,6 @@ skip-if = android_version == "10" skip-if = android_version == "10" || processor == "x86" [testDistribution] [testDoorHanger] -[testFilterOpenTab] # disabled on 2.3; bug 986172 skip-if = android_version == "10" [testFindInPage] diff --git a/mobile/android/base/tests/testFilterOpenTab.java b/mobile/android/base/tests/testFilterOpenTab.java deleted file mode 100644 index b0c1e1939f7..00000000000 --- a/mobile/android/base/tests/testFilterOpenTab.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.mozilla.gecko.tests; - -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.Callable; - -import org.mozilla.gecko.PrivateTab; -import org.mozilla.gecko.Tab; -import org.mozilla.gecko.TabsAccessor; -import org.mozilla.gecko.db.BrowserContract; -import org.mozilla.gecko.db.TabsProvider; - -import android.content.ContentProvider; -import android.content.Context; -import android.database.Cursor; - -/** - * Tests that local tabs are filtered prior to upload. - * - create a set of tabs and perists them through TabsAccessor. - * - verifies that tabs are filtered by querying. - */ -public class testFilterOpenTab extends ContentProviderTest { - private static final String[] TABS_PROJECTION_COLUMNS = new String[] { - BrowserContract.Tabs.TITLE, - BrowserContract.Tabs.URL, - BrowserContract.Clients.GUID, - BrowserContract.Clients.NAME - }; - - private static final String LOCAL_TABS_SELECTION = BrowserContract.Tabs.CLIENT_GUID + " IS NULL"; - - /** - * Factory function that makes new ContentProvider instances. - *
- * We want a fresh provider each test, so this should be invoked in
- * setUp
before each individual test.
- */
- protected static Callable