OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 metrics->crash_dump_count = num_dumps; | 532 metrics->crash_dump_count = num_dumps; |
533 } | 533 } |
534 | 534 |
535 // Get a PrefService whose contents correspond to the Local State file | 535 // Get a PrefService whose contents correspond to the Local State file |
536 // that was saved by the app as it closed. The caller takes ownership of the | 536 // that was saved by the app as it closed. The caller takes ownership of the |
537 // returned PrefService object. | 537 // returned PrefService object. |
538 PrefService* GetLocalState() { | 538 PrefService* GetLocalState() { |
539 FilePath local_state_path = user_data_dir() | 539 FilePath local_state_path = user_data_dir() |
540 .Append(chrome::kLocalStateFilename); | 540 .Append(chrome::kLocalStateFilename); |
541 | 541 |
542 PrefService* local_state(new PrefService(local_state_path, NULL)); | 542 PrefService* local_state(new PrefService(local_state_path)); |
543 return local_state; | 543 return local_state; |
544 } | 544 } |
545 | 545 |
546 void GetStabilityMetrics(NavigationMetrics* metrics) { | 546 void GetStabilityMetrics(NavigationMetrics* metrics) { |
547 if (!metrics) | 547 if (!metrics) |
548 return; | 548 return; |
549 scoped_ptr<PrefService> local_state(GetLocalState()); | 549 scoped_ptr<PrefService> local_state(GetLocalState()); |
550 if (!local_state.get()) | 550 if (!local_state.get()) |
551 return; | 551 return; |
552 local_state->RegisterBooleanPref(prefs::kStabilityExitedCleanly, false); | 552 local_state->RegisterBooleanPref(prefs::kStabilityExitedCleanly, false); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 g_v8_log_path = FilePath::FromWStringHack( | 731 g_v8_log_path = FilePath::FromWStringHack( |
732 v8_command_line.GetSwitchValue(kV8LogFileSwitch)); | 732 v8_command_line.GetSwitchValue(kV8LogFileSwitch)); |
733 if (!file_util::AbsolutePath(&g_v8_log_path)) { | 733 if (!file_util::AbsolutePath(&g_v8_log_path)) { |
734 g_v8_log_path = FilePath(); | 734 g_v8_log_path = FilePath(); |
735 } | 735 } |
736 } | 736 } |
737 } | 737 } |
738 } | 738 } |
739 } | 739 } |
740 } | 740 } |
OLD | NEW |