OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file provides reliablity test which runs under UI test framework. The | 5 // This file provides reliablity test which runs under UI test framework. The |
6 // test is intended to run within QEMU environment. | 6 // test is intended to run within QEMU environment. |
7 // | 7 // |
8 // Usage 1: reliability_test | 8 // Usage 1: reliability_test |
9 // Upon invocation, it visits a hard coded list of sample URLs. This is mainly | 9 // Upon invocation, it visits a hard coded list of sample URLs. This is mainly |
10 // used by buildbot, to verify reliability_test itself runs ok. | 10 // used by buildbot, to verify reliability_test itself runs ok. |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 void GetStabilityMetrics(NavigationMetrics* metrics) { | 741 void GetStabilityMetrics(NavigationMetrics* metrics) { |
742 if (!metrics) | 742 if (!metrics) |
743 return; | 743 return; |
744 scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple(); | 744 scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple(); |
745 registry->RegisterBooleanPref(prefs::kStabilityExitedCleanly, false); | 745 registry->RegisterBooleanPref(prefs::kStabilityExitedCleanly, false); |
746 registry->RegisterIntegerPref(prefs::kStabilityLaunchCount, -1); | 746 registry->RegisterIntegerPref(prefs::kStabilityLaunchCount, -1); |
747 registry->RegisterIntegerPref(prefs::kStabilityPageLoadCount, -1); | 747 registry->RegisterIntegerPref(prefs::kStabilityPageLoadCount, -1); |
748 registry->RegisterIntegerPref(prefs::kStabilityCrashCount, 0); | 748 registry->RegisterIntegerPref(prefs::kStabilityCrashCount, 0); |
749 registry->RegisterIntegerPref(prefs::kStabilityRendererCrashCount, 0); | 749 registry->RegisterIntegerPref(prefs::kStabilityRendererCrashCount, 0); |
750 | 750 |
751 scoped_ptr<PrefService> local_state(GetLocalState(registry)); | 751 scoped_ptr<PrefService> local_state(GetLocalState(registry.get())); |
752 if (!local_state.get()) | 752 if (!local_state.get()) |
753 return; | 753 return; |
754 | 754 |
755 metrics->browser_clean_exit = | 755 metrics->browser_clean_exit = |
756 local_state->GetBoolean(prefs::kStabilityExitedCleanly); | 756 local_state->GetBoolean(prefs::kStabilityExitedCleanly); |
757 metrics->browser_launch_count = | 757 metrics->browser_launch_count = |
758 local_state->GetInteger(prefs::kStabilityLaunchCount); | 758 local_state->GetInteger(prefs::kStabilityLaunchCount); |
759 metrics->page_load_count = | 759 metrics->page_load_count = |
760 local_state->GetInteger(prefs::kStabilityPageLoadCount); | 760 local_state->GetInteger(prefs::kStabilityPageLoadCount); |
761 metrics->browser_crash_count = | 761 metrics->browser_crash_count = |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 if (!g_end_url.empty()) { | 810 if (!g_end_url.empty()) { |
811 NavigateToURLLogResult( | 811 NavigateToURLLogResult( |
812 g_end_url, log_file, NULL, g_continuous_load, false); | 812 g_end_url, log_file, NULL, g_continuous_load, false); |
813 } | 813 } |
814 | 814 |
815 log_file.close(); | 815 log_file.close(); |
816 } | 816 } |
817 | 817 |
818 } // namespace | 818 } // namespace |
819 | 819 |
OLD | NEW |