Bug 917944 - Remove "Most recent" header in history page, r=margaret

This commit is contained in:
Mark Capella 2013-09-25 21:48:16 -04:00
parent 5b8ad1210c
commit d5d290983f
3 changed files with 6 additions and 21 deletions

View File

@ -48,9 +48,6 @@ public class MostRecentPage extends HomeFragment {
// The view shown by the fragment.
private ListView mList;
// The title for this HomeFragment page.
private TextView mTitle;
// Reference to the View to display when there are no results.
private View mEmptyView;
@ -93,11 +90,6 @@ public class MostRecentPage extends HomeFragment {
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
mTitle = (TextView) view.findViewById(R.id.title);
if (mTitle != null) {
mTitle.setText(R.string.home_most_recent_title);
}
mList = (ListView) view.findViewById(R.id.list);
mList.setTag(HomePager.LIST_TAG_MOST_RECENT);
@ -120,7 +112,6 @@ public class MostRecentPage extends HomeFragment {
public void onDestroyView() {
super.onDestroyView();
mList = null;
mTitle = null;
mEmptyView = null;
}
@ -159,18 +150,10 @@ public class MostRecentPage extends HomeFragment {
private void updateUiFromCursor(Cursor c) {
if (c != null && c.getCount() > 0) {
if (mTitle != null) {
mTitle.setVisibility(View.VISIBLE);
}
return;
}
// Cursor is empty, so hide the title and set the
// empty view if it hasn't been set already.
if (mTitle != null) {
mTitle.setVisibility(View.GONE);
}
// Cursor is empty, so set the empty view if it hasn't been set already.
if (mEmptyView == null) {
// Set empty page view. We delay this so that the empty view won't flash.
final ViewStub emptyViewStub = (ViewStub) getView().findViewById(R.id.home_empty_view_stub);

View File

@ -215,7 +215,8 @@ abstract class AboutHomeTest extends BaseTest {
switch (tab) {
case MOST_RECENT: {
mSolo.clickOnView(tabwidget.getChildAt(0));
mAsserter.ok(waitForText(StringHelper.MOST_RECENT_LABEL), "Checking that we are in the most recent tab of about:home", "We are in the most recent tab");
// We can determine if we are on the MOST_RECENT tab only if pages were first visited during the test
mAsserter.ok(waitForText(StringHelper.TODAY_LABEL), "Checking that we are in the most recent tab of about:home", "We are in the most recent tab");
break;
}
case TABS_FROM_LAST_TIME: {
@ -251,7 +252,8 @@ abstract class AboutHomeTest extends BaseTest {
waitForAboutHomeTab(aboutHomeTabs.indexOf(StringHelper.HISTORY_LABEL));
TabWidget tabwidget = (TabWidget)mSolo.getView(TabWidget.class, 0);
mSolo.clickOnView(tabwidget.getChildAt(0));
mAsserter.ok(waitForText(StringHelper.MOST_RECENT_LABEL), "Checking that we are in the most recent tab of about:home", "We are in the most recent tab");
// We can determine if we are on the MOST_RECENT tab only if pages were first visited during the test
mAsserter.ok(waitForText(StringHelper.TODAY_LABEL), "Checking that we are in the most recent tab of about:home", "We are in the most recent tab");
break;
}
case TABS_FROM_LAST_TIME: {

View File

@ -93,7 +93,7 @@ class StringHelper {
public static final String TOP_SITES_LABEL = "TOP SITES";
public static final String BOOKMARKS_LABEL = "BOOKMARKS";
public static final String READING_LIST_LABEL = "READING LIST";
public static final String MOST_RECENT_LABEL = "Most recent";
public static final String TODAY_LABEL = "Today";
public static final String TABS_FROM_LAST_TIME_LABEL = "Open all tabs from last time";
// Desktop default bookmarks folders