Commit 37bbf22a authored by Becky Zhou's avatar Becky Zhou Committed by Commit Bot

Move NTP sign-in promo to be above the article section

Bug: 890094
Change-Id: Ie5637c98d33b8602d54d86c698c63eea60f7802c
Reviewed-on: https://chromium-review.googlesource.com/c/1294194Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Becky Zhou <huayinz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601752}
parent b6314282
...@@ -89,16 +89,9 @@ public class NewTabPageAdapter extends Adapter<NewTabPageViewHolder> ...@@ -89,16 +89,9 @@ public class NewTabPageAdapter extends Adapter<NewTabPageViewHolder>
if (mAboveTheFoldView != null) mRoot.addChildren(new AboveTheFoldItem()); if (mAboveTheFoldView != null) mRoot.addChildren(new AboveTheFoldItem());
if (SuggestionsConfig.scrollToLoad()) { // Show the sign-in promo above suggested content.
// If scroll-to-load is enabled, show the sign-in promo above suggested content. if (mSigninPromo != null) mRoot.addChildren(mSigninPromo);
if (mSigninPromo != null) mRoot.addChildren(mSigninPromo); mRoot.addChildren(mAllDismissed, mSections);
mRoot.addChildren(mAllDismissed);
mRoot.addChildren(mSections);
} else {
mRoot.addChildren(mSections);
if (mSigninPromo != null) mRoot.addChildren(mSigninPromo);
mRoot.addChildren(mAllDismissed);
}
mFooter = new Footer(); mFooter = new Footer();
mRoot.addChildren(mFooter); mRoot.addChildren(mFooter);
......
...@@ -210,7 +210,6 @@ public class NewTabPageTest { ...@@ -210,7 +210,6 @@ public class NewTabPageTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"NewTabPage", "FeedNewTabPage", "RenderTest"}) @Feature({"NewTabPage", "FeedNewTabPage", "RenderTest"})
@EnableFeatures({ChromeFeatureList.CONTENT_SUGGESTIONS_SCROLL_TO_LOAD})
@ParameterAnnotations.UseMethodParameter(InterestFeedParams.class) @ParameterAnnotations.UseMethodParameter(InterestFeedParams.class)
public void testRender_FocusFakeBox(boolean interestFeedEnabled) throws Exception { public void testRender_FocusFakeBox(boolean interestFeedEnabled) throws Exception {
ScrimView scrimView = mActivityTestRule.getActivity().getScrim(); ScrimView scrimView = mActivityTestRule.getActivity().getScrim();
...@@ -224,7 +223,6 @@ public class NewTabPageTest { ...@@ -224,7 +223,6 @@ public class NewTabPageTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"NewTabPage", "FeedNewTabPage", "RenderTest"}) @Feature({"NewTabPage", "FeedNewTabPage", "RenderTest"})
@EnableFeatures({ChromeFeatureList.CONTENT_SUGGESTIONS_SCROLL_TO_LOAD})
@ParameterAnnotations.UseMethodParameter(InterestFeedParams.class) @ParameterAnnotations.UseMethodParameter(InterestFeedParams.class)
public void testRender_SignInPromo(boolean interestFeedEnabled) throws Exception { public void testRender_SignInPromo(boolean interestFeedEnabled) throws Exception {
// Scroll to the sign in promo in case it is not visible. // Scroll to the sign in promo in case it is not visible.
...@@ -235,7 +233,6 @@ public class NewTabPageTest { ...@@ -235,7 +233,6 @@ public class NewTabPageTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"NewTabPage", "FeedNewTabPage", "RenderTest"}) @Feature({"NewTabPage", "FeedNewTabPage", "RenderTest"})
@EnableFeatures({ChromeFeatureList.CONTENT_SUGGESTIONS_SCROLL_TO_LOAD})
@ParameterAnnotations.UseMethodParameter(InterestFeedParams.class) @ParameterAnnotations.UseMethodParameter(InterestFeedParams.class)
public void testRender_ArticleSectionHeader(boolean interestFeedEnabled) throws Exception { public void testRender_ArticleSectionHeader(boolean interestFeedEnabled) throws Exception {
// Scroll to the article section header in case it is not visible. // Scroll to the article section header in case it is not visible.
......
...@@ -910,7 +910,7 @@ public class NewTabPageAdapterTest { ...@@ -910,7 +910,7 @@ public class NewTabPageAdapterTest {
resetUiDelegate(); resetUiDelegate();
reloadNtp(); reloadNtp();
assertItemsFor(sectionWithStatusCard().withProgress(), signinPromo()); assertItemsFor(signinPromo(), sectionWithStatusCard().withProgress());
assertTrue(isSignInPromoVisible()); assertTrue(isSignInPromoVisible());
List<DestructionObserver> observers = getDestructionObserver(mUiDelegate); List<DestructionObserver> observers = getDestructionObserver(mUiDelegate);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment