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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 metrics->crash_dump_count = num_dumps; | 728 metrics->crash_dump_count = num_dumps; |
729 } | 729 } |
730 | 730 |
731 // Get a PrefService whose contents correspond to the Local State file | 731 // Get a PrefService whose contents correspond to the Local State file |
732 // that was saved by the app as it closed. The caller takes ownership of the | 732 // that was saved by the app as it closed. The caller takes ownership of the |
733 // returned PrefService object. | 733 // returned PrefService object. |
734 PrefService* GetLocalState(PrefRegistry* registry) { | 734 PrefService* GetLocalState(PrefRegistry* registry) { |
735 base::FilePath path = user_data_dir().Append(chrome::kLocalStateFilename); | 735 base::FilePath path = user_data_dir().Append(chrome::kLocalStateFilename); |
736 PrefServiceMockBuilder builder; | 736 PrefServiceMockBuilder builder; |
737 builder.WithUserFilePrefs( | 737 builder.WithUserFilePrefs( |
738 path, base::MessageLoop::current()->message_loop_proxy()); | 738 path, base::MessageLoop::current()->message_loop_proxy().get()); |
739 return builder.Create(registry); | 739 return builder.Create(registry); |
740 } | 740 } |
741 | 741 |
742 void GetStabilityMetrics(NavigationMetrics* metrics) { | 742 void GetStabilityMetrics(NavigationMetrics* metrics) { |
743 if (!metrics) | 743 if (!metrics) |
744 return; | 744 return; |
745 scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple(); | 745 scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple(); |
746 registry->RegisterBooleanPref(prefs::kStabilityExitedCleanly, false); | 746 registry->RegisterBooleanPref(prefs::kStabilityExitedCleanly, false); |
747 registry->RegisterIntegerPref(prefs::kStabilityLaunchCount, -1); | 747 registry->RegisterIntegerPref(prefs::kStabilityLaunchCount, -1); |
748 registry->RegisterIntegerPref(prefs::kStabilityPageLoadCount, -1); | 748 registry->RegisterIntegerPref(prefs::kStabilityPageLoadCount, -1); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 if (!g_end_url.empty()) { | 811 if (!g_end_url.empty()) { |
812 NavigateToURLLogResult( | 812 NavigateToURLLogResult( |
813 g_end_url, log_file, NULL, g_continuous_load, false); | 813 g_end_url, log_file, NULL, g_continuous_load, false); |
814 } | 814 } |
815 | 815 |
816 log_file.close(); | 816 log_file.close(); |
817 } | 817 } |
818 | 818 |
819 } // namespace | 819 } // namespace |
820 | 820 |
OLD | NEW |