| Index: chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/BrandColorTest.java
|
| diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/BrandColorTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/BrandColorTest.java
|
| index aaecf514691d5ed1eb498fadf33776cf612710dd..a745edd0827d5c75be79791d5801b9a6145e1b5a 100644
|
| --- a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/BrandColorTest.java
|
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/BrandColorTest.java
|
| @@ -140,6 +140,28 @@ public class BrandColorTest extends ChromeActivityTestCaseBase<ChromeActivity> {
|
| }
|
|
|
| /**
|
| + * Test for immediately setting the brand color.
|
| + */
|
| + @SmallTest
|
| + @Restriction(ChromeRestriction.RESTRICTION_TYPE_PHONE)
|
| + @Feature({"Omnibox"})
|
| + public void testImmediateColorChange() throws InterruptedException {
|
| + startMainActivityWithURL(getUrlWithBrandColor(BRAND_COLOR_1));
|
| + checkForBrandColor(Color.parseColor(BRAND_COLOR_1));
|
| +
|
| + ThreadUtils.runOnUiThreadBlocking(new Runnable() {
|
| + @Override
|
| + public void run() {
|
| + getActivity().getToolbarManager().updatePrimaryColor(mDefaultColor, false);
|
| + // Since the color should change instantly, there is no need to use the criteria
|
| + // helper.
|
| + assertEquals(mToolbarDataProvider.getPrimaryColor(),
|
| + mToolbar.getBackgroundDrawable().getColor());
|
| + }
|
| + });
|
| + }
|
| +
|
| + /**
|
| * Test to make sure onLoadStarted doesn't reset the brand color.
|
| */
|
| @SmallTest
|
|
|