| Index: chrome/android/javatests/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetNewTabControllerTest.java
|
| diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetNewTabControllerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetNewTabControllerTest.java
|
| index 52ff466be957ce2c6e3450d54cad0b07394831b3..44970a659f18726ccd2455c83defa0cab0f40c87 100644
|
| --- a/chrome/android/javatests/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetNewTabControllerTest.java
|
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetNewTabControllerTest.java
|
| @@ -8,7 +8,6 @@ import android.support.test.filters.SmallTest;
|
|
|
| import org.chromium.base.ThreadUtils;
|
| import org.chromium.base.test.util.CallbackHelper;
|
| -import org.chromium.base.test.util.DisabledTest;
|
| import org.chromium.chrome.R;
|
| import org.chromium.chrome.browser.UrlConstants;
|
| import org.chromium.chrome.browser.ntp.ChromeHomeNewTabPageBase;
|
| @@ -144,7 +143,6 @@ public class BottomSheetNewTabControllerTest extends BottomSheetTestCaseBase {
|
| }
|
|
|
| @SmallTest
|
| - @DisabledTest(message = "crbug.com/726032")
|
| public void testCloseNTP()
|
| throws IllegalArgumentException, InterruptedException, TimeoutException {
|
| // Create a new tab.
|
| @@ -159,7 +157,6 @@ public class BottomSheetNewTabControllerTest extends BottomSheetTestCaseBase {
|
| }
|
|
|
| @SmallTest
|
| - @DisabledTest(message = "crbug.com/726032")
|
| public void testCloseNTP_Incognito()
|
| throws IllegalArgumentException, InterruptedException, TimeoutException {
|
| // Create new incognito NTP.
|
| @@ -175,12 +172,8 @@ public class BottomSheetNewTabControllerTest extends BottomSheetTestCaseBase {
|
|
|
| private void loadChromeHomeNewTab() throws InterruptedException {
|
| final Tab tab = getActivity().getActivityTab();
|
| - ChromeTabUtils.waitForTabPageLoaded(tab, new Runnable() {
|
| - @Override
|
| - public void run() {
|
| - ChromeTabUtils.loadUrlOnUiThread(tab, UrlConstants.NTP_URL);
|
| - }
|
| - });
|
| + ChromeTabUtils.loadUrlOnUiThread(tab, UrlConstants.NTP_URL);
|
| + ChromeTabUtils.waitForTabPageLoaded(tab, UrlConstants.NTP_URL);
|
| getInstrumentation().waitForIdleSync();
|
| }
|
|
|
| @@ -199,12 +192,12 @@ public class BottomSheetNewTabControllerTest extends BottomSheetTestCaseBase {
|
| private void closeNewTab() throws InterruptedException, TimeoutException {
|
| int currentCallCount = mTabModelObserver.mDidCloseTabCallbackHelper.getCallCount();
|
| Tab tab = getActivity().getActivityTab();
|
| - final ChromeHomeNewTabPageBase mNewTabPage = (ChromeHomeNewTabPageBase) tab.getNativePage();
|
| + final ChromeHomeNewTabPageBase newTabPage = (ChromeHomeNewTabPageBase) tab.getNativePage();
|
|
|
| ThreadUtils.runOnUiThreadBlocking(new Runnable() {
|
| @Override
|
| public void run() {
|
| - mNewTabPage.getCloseButtonForTests().callOnClick();
|
| + newTabPage.getCloseButtonForTests().callOnClick();
|
| getActivity().getLayoutManager().getActiveLayout().finishAnimationsForTests();
|
| }
|
| });
|
|
|