mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1260478 - Fixed review nits from previous commits. r=me
Taking over this bug as nalexander is not available. MozReview-Commit-ID: 2Vkv4U6anyD --HG-- extra : rebase_source : 1f75a3057f8f2d9559577a2628ce6df86108fc05 extra : histedit_source : 580ec2f6de51b7872f1b400d3cb0f4a37c2600ec
This commit is contained in:
parent
3c86f5a00e
commit
67a2976dc3
@ -1,3 +1,7 @@
|
||||
/* 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.background.db;
|
||||
|
||||
import android.content.ContentProvider;
|
||||
@ -28,12 +32,7 @@ public class DelegatingTestContentProvider extends ContentProvider {
|
||||
}
|
||||
|
||||
private Uri appendTestParam(Uri uri) {
|
||||
try {
|
||||
return appendUriParam(uri, BrowserContract.PARAM_IS_TEST, "1");
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
return null;
|
||||
return appendUriParam(uri, BrowserContract.PARAM_IS_TEST, "1");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -62,16 +62,16 @@ public class TestTabsProvider {
|
||||
|
||||
protected int deleteTestClient(final ContentProviderClient clientsClient) throws RemoteException {
|
||||
if (clientsClient == null) {
|
||||
return -1;
|
||||
throw new IllegalStateException("Provided ContentProviderClient is null");
|
||||
}
|
||||
return clientsClient.delete(BrowserContractHelpers.CLIENTS_CONTENT_URI, CLIENTS_GUID_IS, new String[] { TEST_CLIENT_GUID });
|
||||
}
|
||||
|
||||
protected int deleteAllTestTabs(final ContentProviderClient tabsClient) throws RemoteException {
|
||||
if (tabsClient == null) {
|
||||
return -1;
|
||||
throw new IllegalStateException("Provided ContentProviderClient is null");
|
||||
}
|
||||
return tabsClient.delete(BrowserContractHelpers.TABS_CONTENT_URI, TABS_CLIENT_GUID_IS, new String[]{TEST_CLIENT_GUID});
|
||||
return tabsClient.delete(BrowserContractHelpers.TABS_CONTENT_URI, TABS_CLIENT_GUID_IS, new String[] { TEST_CLIENT_GUID });
|
||||
}
|
||||
|
||||
protected void insertTestClient(final ContentProviderClient clientsClient) throws RemoteException {
|
||||
@ -116,7 +116,7 @@ public class TestTabsProvider {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWipeClients() throws RemoteException {
|
||||
public void testDeleteEmptyClients() throws RemoteException {
|
||||
final Uri uri = BrowserContractHelpers.CLIENTS_CONTENT_URI;
|
||||
final ContentProviderClient clientsClient = getClientsClient();
|
||||
|
||||
@ -128,7 +128,7 @@ public class TestTabsProvider {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWipeTabs() throws RemoteException {
|
||||
public void testDeleteEmptyTabs() throws RemoteException {
|
||||
final ContentProviderClient tabsClient = getTabsClient();
|
||||
|
||||
// Have to ensure that it's empty…
|
||||
|
Loading…
Reference in New Issue
Block a user