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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/metrics/MainIntentBehaviorMetricsIntegrationTest.java

Issue 2858043007: Ensure CATEGORY_LAUNCHER exists for MAIN intents for NTP inactivity/logging. (Closed)
Patch Set: Rebase Created 3 years, 7 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/metrics/MainIntentBehaviorMetrics.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/metrics/MainIntentBehaviorMetricsIntegrationTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/MainIntentBehaviorMetricsIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/MainIntentBehaviorMetricsIntegrationTest.java
index 0468f4324d77b0c0d04e26e27af6c0873eb1eadb..0a408c5914b03468f7b33a72b60474ae14b7fde6 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/MainIntentBehaviorMetricsIntegrationTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/MainIntentBehaviorMetricsIntegrationTest.java
@@ -4,8 +4,10 @@
package org.chromium.chrome.browser.metrics;
+import android.content.Intent;
import android.support.test.filters.MediumTest;
+import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -122,6 +124,15 @@ public class MainIntentBehaviorMetricsIntegrationTest {
}
}
+ @MediumTest
+ @Test
+ public void testMainIntentWithLauncherCategory() throws InterruptedException {
+ mActivityTestRule.startMainActivityFromIntent(new Intent(Intent.ACTION_MAIN), null);
+ assertMainIntentBehavior(null);
+ Assert.assertFalse(mActivityTestRule.getActivity().getMainIntentBehaviorMetricsForTesting()
+ .getPendingActionRecordForMainIntent());
+ }
+
private void assertMainIntentBehavior(Integer expected) {
CriteriaHelper.pollUiThread(Criteria.equals(expected, new Callable<Integer>() {
@Override
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/metrics/MainIntentBehaviorMetrics.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698