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

Side by Side Diff: chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc

Issue 1366643002: Extract guts of ChromeStabilityMetricsProvider into helper class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/metrics/chrome_stability_metrics_provider.h" 5 #include "chrome/browser/metrics/chrome_stability_metrics_provider.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/prefs/scoped_user_pref_update.h" 9 #include "base/prefs/scoped_user_pref_update.h"
10 #include "base/prefs/testing_pref_service.h" 10 #include "base/prefs/testing_pref_service.h"
(...skipping 15 matching lines...) Expand all
26 26
27 #if defined(ENABLE_EXTENSIONS) 27 #if defined(ENABLE_EXTENSIONS)
28 #include "extensions/browser/process_map.h" 28 #include "extensions/browser/process_map.h"
29 #endif 29 #endif
30 30
31 namespace { 31 namespace {
32 32
33 class ChromeStabilityMetricsProviderTest : public testing::Test { 33 class ChromeStabilityMetricsProviderTest : public testing::Test {
34 protected: 34 protected:
35 ChromeStabilityMetricsProviderTest() : prefs_(new TestingPrefServiceSimple) { 35 ChromeStabilityMetricsProviderTest() : prefs_(new TestingPrefServiceSimple) {
36 ChromeStabilityMetricsProvider::RegisterPrefs(prefs()->registry()); 36 metrics::StabilityMetricsHelper::RegisterPrefs(prefs()->registry());
37 } 37 }
38 38
39 TestingPrefServiceSimple* prefs() { return prefs_.get(); } 39 TestingPrefServiceSimple* prefs() { return prefs_.get(); }
40 40
41 private: 41 private:
42 scoped_ptr<TestingPrefServiceSimple> prefs_; 42 scoped_ptr<TestingPrefServiceSimple> prefs_;
43 content::TestBrowserThreadBundle thread_bundle_; 43 content::TestBrowserThreadBundle thread_bundle_;
44 44
45 DISALLOW_COPY_AND_ASSIGN(ChromeStabilityMetricsProviderTest); 45 DISALLOW_COPY_AND_ASSIGN(ChromeStabilityMetricsProviderTest);
46 }; 46 };
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 provider.ProvideStabilityMetrics(&system_profile); 160 provider.ProvideStabilityMetrics(&system_profile);
161 161
162 EXPECT_EQ(0, system_profile.stability().renderer_crash_count()); 162 EXPECT_EQ(0, system_profile.stability().renderer_crash_count());
163 EXPECT_EQ(1, system_profile.stability().extension_renderer_crash_count()); 163 EXPECT_EQ(1, system_profile.stability().extension_renderer_crash_count());
164 EXPECT_EQ( 164 EXPECT_EQ(
165 1, system_profile.stability().extension_renderer_failed_launch_count()); 165 1, system_profile.stability().extension_renderer_failed_launch_count());
166 #endif 166 #endif
167 167
168 profile_manager->DeleteAllTestingProfiles(); 168 profile_manager->DeleteAllTestingProfiles();
169 } 169 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chrome_stability_metrics_provider.cc ('k') | chrome/browser/metrics/metrics_service_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698