| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Tests the MetricsService stat recording to make sure that the numbers are | 5 // Tests the MetricsService stat recording to make sure that the numbers are |
| 6 // what we expect. | 6 // what we expect. |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
| 12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 13 #include "base/platform_thread.h" | 13 #include "base/platform_thread.h" |
| 14 #include "chrome/browser/chrome_thread.h" | 14 #include "chrome/browser/chrome_thread.h" |
| 15 #include "chrome/browser/pref_service.h" | 15 #include "chrome/browser/prefs/pref_service.h" |
| 16 #include "chrome/browser/pref_value_store.h" | 16 #include "chrome/browser/prefs/pref_value_store.h" |
| 17 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
| 18 #include "chrome/common/chrome_paths.h" | 18 #include "chrome/common/chrome_paths.h" |
| 19 #include "chrome/common/json_pref_store.h" | 19 #include "chrome/common/json_pref_store.h" |
| 20 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
| 21 #include "chrome/common/url_constants.h" | 21 #include "chrome/common/url_constants.h" |
| 22 #include "chrome/test/automation/tab_proxy.h" | 22 #include "chrome/test/automation/tab_proxy.h" |
| 23 #include "chrome/test/automation/browser_proxy.h" | 23 #include "chrome/test/automation/browser_proxy.h" |
| 24 #include "chrome/test/ui/ui_test.h" | 24 #include "chrome/test/ui/ui_test.h" |
| 25 #include "net/base/net_util.h" | 25 #include "net/base/net_util.h" |
| 26 | 26 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 scoped_ptr<PrefService> local_state(GetLocalState()); | 111 scoped_ptr<PrefService> local_state(GetLocalState()); |
| 112 local_state->RegisterBooleanPref(prefs::kStabilityExitedCleanly, true); | 112 local_state->RegisterBooleanPref(prefs::kStabilityExitedCleanly, true); |
| 113 local_state->RegisterIntegerPref(prefs::kStabilityLaunchCount, 0); | 113 local_state->RegisterIntegerPref(prefs::kStabilityLaunchCount, 0); |
| 114 local_state->RegisterIntegerPref(prefs::kStabilityPageLoadCount, 0); | 114 local_state->RegisterIntegerPref(prefs::kStabilityPageLoadCount, 0); |
| 115 local_state->RegisterIntegerPref(prefs::kStabilityRendererCrashCount, 0); | 115 local_state->RegisterIntegerPref(prefs::kStabilityRendererCrashCount, 0); |
| 116 EXPECT_TRUE(local_state->GetBoolean(prefs::kStabilityExitedCleanly)); | 116 EXPECT_TRUE(local_state->GetBoolean(prefs::kStabilityExitedCleanly)); |
| 117 EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityLaunchCount)); | 117 EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityLaunchCount)); |
| 118 EXPECT_EQ(4, local_state->GetInteger(prefs::kStabilityPageLoadCount)); | 118 EXPECT_EQ(4, local_state->GetInteger(prefs::kStabilityPageLoadCount)); |
| 119 EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityRendererCrashCount)); | 119 EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityRendererCrashCount)); |
| 120 } | 120 } |
| OLD | NEW |