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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenBackgroundColorTest.java

Issue 1414873004: Web app splash screen: add even moar tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@splashscreen-uma
Patch Set: rebase Created 5 years, 2 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
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
index b02923ff30e3d9d05695812b88f5c2b82c13c983..599057cd9f0f2c96286f7b364fd5b2e5eb02ae11 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenBackgroundColorTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappSplashScreenBackgroundColorTest.java
@@ -6,7 +6,9 @@ package org.chromium.chrome.browser.webapps;
import android.content.Intent;
import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
import android.test.suitebuilder.annotation.SmallTest;
+import android.view.ViewGroup;
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.test.util.Feature;
@@ -25,11 +27,14 @@ public class WebappSplashScreenBackgroundColorTest extends WebappActivityTestBas
return intent;
}
- // TODO(mlamouri): test that the background color is actually shown.
-
@SmallTest
@Feature({"Webapps"})
- public void testUmaBackgroundColorCustom() {
+ public void testShowBackgroundColorAndRecordUma() {
+ ViewGroup splashScreen = getActivity().getSplashScreenForTests();
+ ColorDrawable background = (ColorDrawable) splashScreen.getBackground();
+
+ assertEquals(Color.GREEN, background.getColor());
+
assertEquals(1, RecordHistogram.getHistogramValueCountForTesting(
WebappUma.HISTOGRAM_SPLASHSCREEN_BACKGROUNDCOLOR,
WebappUma.SPLASHSCREEN_COLOR_STATUS_CUSTOM));

Powered by Google App Engine
This is Rietveld 408576698