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

Unified Diff: chrome/browser/metrics/metrics_service_browsertest.cc

Issue 256143006: Refactor MetricsStateManager class out of MetricsService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 8 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/browser/metrics/metrics_service_browsertest.cc
===================================================================
--- chrome/browser/metrics/metrics_service_browsertest.cc (revision 267582)
+++ chrome/browser/metrics/metrics_service_browsertest.cc (working copy)
@@ -5,6 +5,8 @@
// Tests the MetricsService stat recording to make sure that the numbers are
// what we expect.
+#include "chrome/browser/metrics/metrics_service.h"
+
#include <string>
#include "base/command_line.h"
@@ -12,7 +14,6 @@
#include "base/path_service.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/metrics/metrics_service.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_paths.h"
@@ -58,14 +59,6 @@
}
};
-class MetricsServiceReportingTest : public InProcessBrowserTest {
- public:
- virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
- // Enable the metrics service for testing (in the full mode).
- command_line->AppendSwitch(switches::kEnableMetricsReportingForTesting);
- }
-};
-
IN_PROC_BROWSER_TEST_F(MetricsServiceBrowserTest, CloseRenderersNormally) {
OpenTabs();
@@ -115,20 +108,3 @@
// exits... it's not clear to me how to test that.
}
-IN_PROC_BROWSER_TEST_F(MetricsServiceBrowserTest, CheckLowEntropySourceUsed) {
- // Since MetricsService is only in recording mode, and is not reporting,
- // check that the low entropy source is returned at some point.
- ASSERT_TRUE(g_browser_process->metrics_service());
- EXPECT_EQ(MetricsService::LAST_ENTROPY_LOW,
- g_browser_process->metrics_service()->entropy_source_returned());
-}
-
-IN_PROC_BROWSER_TEST_F(MetricsServiceReportingTest,
- CheckHighEntropySourceUsed) {
- // Since the full metrics service runs in this test, we expect that
- // MetricsService returns the full entropy source at some point during
- // BrowserMain startup.
- ASSERT_TRUE(g_browser_process->metrics_service());
- EXPECT_EQ(MetricsService::LAST_ENTROPY_HIGH,
- g_browser_process->metrics_service()->entropy_source_returned());
-}

Powered by Google App Engine
This is Rietveld 408576698