Commit 13b51176 authored by Jeffrey Cohen's avatar Jeffrey Cohen Committed by Commit Bot

[ShareButtonInToolbar] add field trial for android experiment

Bug: 1036023
Change-Id: I4bb00ab9185e03b08ec1204f82049270f86eb214
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2148242Reviewed-by: default avatarPatrick Noland <pnoland@chromium.org>
Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Commit-Queue: Jeffrey Cohen <jeffreycohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#759359}
parent 6cb68f2d
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
package org.chromium.chrome.browser.omnibox; package org.chromium.chrome.browser.omnibox;
import static android.support.test.espresso.Espresso.onView; import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.matches; import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withId; import static android.support.test.espresso.matcher.ViewMatchers.withId;
...@@ -176,7 +175,7 @@ public class LocationBarLayoutTest { ...@@ -176,7 +175,7 @@ public class LocationBarLayoutTest {
} }
private void setUrlBarTextAndFocus(String text) throws ExecutionException { private void setUrlBarTextAndFocus(String text) throws ExecutionException {
onView(withId(R.id.url_bar)).perform(click()); ClickUtils.clickButton(getUrlBar());
TestThreadUtils.runOnUiThreadBlocking(new Callable<Void>() { TestThreadUtils.runOnUiThreadBlocking(new Callable<Void>() {
@Override @Override
......
...@@ -73,7 +73,8 @@ public class IdentityDiscControllerTest { ...@@ -73,7 +73,8 @@ public class IdentityDiscControllerTest {
mActivityTestRule.startMainActivityWithURL(UrlConstants.NTP_URL); mActivityTestRule.startMainActivityWithURL(UrlConstants.NTP_URL);
View experimentalButton = View experimentalButton =
mActivityTestRule.getActivity().findViewById(R.id.optional_toolbar_button); mActivityTestRule.getActivity().findViewById(R.id.optional_toolbar_button);
Assert.assertNull("IdentityDisc is visible for signed out user", experimentalButton); Assert.assertTrue("IdentityDisc is visible for signed out user",
experimentalButton == null || View.GONE == experimentalButton.getVisibility());
// Identity Disc should be shown on sign-in state change without NTP refresh. // Identity Disc should be shown on sign-in state change without NTP refresh.
SigninTestUtil.addAndSignInTestAccount(); SigninTestUtil.addAndSignInTestAccount();
......
...@@ -5301,6 +5301,21 @@ ...@@ -5301,6 +5301,21 @@
] ]
} }
], ],
"ShareButtonInTopToolbar": [
{
"platforms": [
"android"
],
"experiments": [
{
"name": "Enabled",
"enable_features": [
"ShareButtonInTopToolbar"
]
}
]
}
],
"SharedClipboard": [ "SharedClipboard": [
{ {
"platforms": [ "platforms": [
......
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