Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetNewTabControllerTest.java

Issue 2900263003: [Home] Fix BottomSheetNewTabController#testCloseNtp* (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698