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

Unified Diff: chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java

Issue 2846233003: 📰 Record user actions on the NTP and Home sheet (Closed)
Patch Set: Address bauerb@'s comment 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
Index: chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java
index 14fe46a71482637b1d35685023a5d3ff09293629..1d421c8243f0389836c4095f6f59e7c21febee61 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java
@@ -29,6 +29,7 @@
import static org.chromium.chrome.browser.ntp.cards.ContentSuggestionsUnitTestUtils.bindViewHolders;
import static org.chromium.chrome.test.util.browser.suggestions.ContentSuggestionsTestUtils.createDummySuggestions;
+import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -38,6 +39,7 @@
import org.robolectric.annotation.Config;
import org.chromium.base.Callback;
+import org.chromium.base.metrics.RecordUserAction;
import org.chromium.base.test.util.Feature;
import org.chromium.chrome.browser.DisableHistogramsRule;
import org.chromium.chrome.browser.ntp.cards.NewTabPageViewHolder.UpdateLayoutParamsCallback;
@@ -81,6 +83,7 @@
@Before
public void setUp() {
+ RecordUserAction.setDisabledForTests(true);
MockitoAnnotations.initMocks(this);
mBridge = new FakeOfflinePageBridge();
@@ -88,6 +91,11 @@ public void setUp() {
CardsVariationParameters.setTestVariationParams(new HashMap<String, String>());
}
+ @After
+ public void tearDown() {
+ RecordUserAction.setDisabledForTests(false);
+ }
+
@Test
@Feature({"Ntp"})
public void testDismissSibling() {

Powered by Google App Engine
This is Rietveld 408576698