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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java

Issue 2559573002: Disable UI options that allow new tabs before FRE. (Closed)
Patch Set: Fixed downstream and fixed tests Created 4 years 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
Index: chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
index 78fb02b9c4cde0aa74b63be792a1478e9b35ace6..a9b27f338e908fdbf15d0ad8822c3df12b5045e1 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
@@ -60,6 +60,7 @@ import org.chromium.chrome.browser.TabsOpenedFromExternalAppTest;
import org.chromium.chrome.browser.WarmupManager;
import org.chromium.chrome.browser.appmenu.AppMenuHandler;
import org.chromium.chrome.browser.document.ChromeLauncherActivity;
+import org.chromium.chrome.browser.firstrun.FirstRunStatus;
import org.chromium.chrome.browser.metrics.PageLoadMetrics;
import org.chromium.chrome.browser.prerender.ExternalPrerenderHandler;
import org.chromium.chrome.browser.profiles.Profile;
@@ -142,6 +143,14 @@ public class CustomTabActivityTest extends CustomTabActivityTestBase {
@Override
protected void setUp() throws Exception {
super.setUp();
+
+ ThreadUtils.runOnUiThreadBlocking(new Runnable() {
+ @Override
+ public void run() {
+ FirstRunStatus.setFirstRunFlowComplete(true);
+ }
+ });
+
Context appContext = getInstrumentation().getTargetContext().getApplicationContext();
mTestServer = EmbeddedTestServer.createAndStartServer(appContext);
mTestPage = mTestServer.getURL(TEST_PAGE);
@@ -153,6 +162,13 @@ public class CustomTabActivityTest extends CustomTabActivityTestBase {
@Override
protected void tearDown() throws Exception {
+ ThreadUtils.runOnUiThreadBlocking(new Runnable() {
+ @Override
+ public void run() {
+ FirstRunStatus.setFirstRunFlowComplete(false);
+ }
+ });
+
mTestServer.stopAndDestroyServer();
// finish() is called on a non-UI thread by the testing harness. Must hide the menu

Powered by Google App Engine
This is Rietveld 408576698