| Index: chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenBackgroundColorTest.java
|
| diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenBackgroundColorTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenBackgroundColorTest.java
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f45c25a1b5c9b817835b7e7b7b852c9b997298d3
|
| --- /dev/null
|
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenBackgroundColorTest.java
|
| @@ -0,0 +1,37 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +package org.chromium.chrome.browser.webapps;
|
| +
|
| +import android.content.Intent;
|
| +import android.graphics.Color;
|
| +import android.test.suitebuilder.annotation.SmallTest;
|
| +
|
| +import org.chromium.base.metrics.RecordHistogram;
|
| +import org.chromium.base.test.util.Feature;
|
| +import org.chromium.chrome.browser.ShortcutHelper;
|
| +import org.chromium.chrome.browser.metrics.WebappUma;
|
| +
|
| +/**
|
| + * Tests for splash screens with EXTRA_BACKGROND_COLOR specified in the Intent.
|
| + */
|
| +public class WebappSplashScreenBackgroundColorTest extends WebappActivityTestBase {
|
| +
|
| + @Override
|
| + protected Intent createIntent() {
|
| + Intent intent = super.createIntent();
|
| + intent.putExtra(ShortcutHelper.EXTRA_BACKGROUND_COLOR, (long) Color.GREEN);
|
| + return intent;
|
| + }
|
| +
|
| + // TODO(mlamouri): test that the background color is actually shown.
|
| +
|
| + @SmallTest
|
| + @Feature({"Webapps"})
|
| + public void testUmaBackgroundColorCustom() {
|
| + assertEquals(1, RecordHistogram.getHistogramValueCountForTesting(
|
| + HISTOGRAM_SPLASHSCREEN_BACKGROUNDCOLOR,
|
| + WebappUma.SPLASHSCREEN_COLOR_STATUS_CUSTOM));
|
| + }
|
| +}
|
|
|