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

Side by Side Diff: chrome/test/reliability/page_load_test.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/reliability/automated_ui_tests.cc ('k') | chrome/utility/profile_import_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/test/reliability/automated_ui_tests.cc ('k') | chrome/utility/profile_import_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698