| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 tests which run for ChromeFrame. | 5 // This file provides reliablity tests which run for ChromeFrame. |
| 6 // | 6 // |
| 7 // Usage: | 7 // Usage: |
| 8 // <reliability test exe> --list=file --startline=start --endline=end [...] | 8 // <reliability test exe> --list=file --startline=start --endline=end [...] |
| 9 // Upon invocation, it visits each of the URLs on line numbers between start | 9 // Upon invocation, it visits each of the URLs on line numbers between start |
| 10 // and end, inclusive, stored in the input file. The line number starts from 1. | 10 // and end, inclusive, stored in the input file. The line number starts from 1. |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 chrome::GetChromeFrameUserDataDirectory(&path); | 432 chrome::GetChromeFrameUserDataDirectory(&path); |
| 433 return PrefServiceMockBuilder().WithUserFilePrefs(path).Create(); | 433 return PrefServiceMockBuilder().WithUserFilePrefs(path).Create(); |
| 434 } | 434 } |
| 435 | 435 |
| 436 void GetStabilityMetrics(NavigationMetrics* metrics) { | 436 void GetStabilityMetrics(NavigationMetrics* metrics) { |
| 437 if (!metrics) | 437 if (!metrics) |
| 438 return; | 438 return; |
| 439 scoped_ptr<PrefService> local_state(GetLocalState()); | 439 scoped_ptr<PrefService> local_state(GetLocalState()); |
| 440 if (!local_state.get()) | 440 if (!local_state.get()) |
| 441 return; | 441 return; |
| 442 local_state->RegisterBooleanPref(prefs::kStabilityExitedCleanly, false); | 442 local_state->RegisterBooleanPref(prefs::kStabilityExitedCleanly, |
| 443 local_state->RegisterIntegerPref(prefs::kStabilityLaunchCount, -1); | 443 false, |
| 444 local_state->RegisterIntegerPref(prefs::kStabilityPageLoadCount, -1); | 444 false /* don't sync pref */); |
| 445 local_state->RegisterIntegerPref(prefs::kStabilityCrashCount, 0); | 445 local_state->RegisterIntegerPref(prefs::kStabilityLaunchCount, |
| 446 local_state->RegisterIntegerPref(prefs::kStabilityRendererCrashCount, 0); | 446 -1, |
| 447 false /* don't sync pref */); |
| 448 local_state->RegisterIntegerPref(prefs::kStabilityPageLoadCount, |
| 449 -1, |
| 450 false /* don't sync pref */); |
| 451 local_state->RegisterIntegerPref(prefs::kStabilityCrashCount, |
| 452 0, |
| 453 false /* don't sync pref */); |
| 454 local_state->RegisterIntegerPref(prefs::kStabilityRendererCrashCount, |
| 455 0, |
| 456 false /* don't sync pref */); |
| 447 | 457 |
| 448 metrics->browser_clean_exit = | 458 metrics->browser_clean_exit = |
| 449 local_state->GetBoolean(prefs::kStabilityExitedCleanly); | 459 local_state->GetBoolean(prefs::kStabilityExitedCleanly); |
| 450 metrics->browser_launch_count = | 460 metrics->browser_launch_count = |
| 451 local_state->GetInteger(prefs::kStabilityLaunchCount); | 461 local_state->GetInteger(prefs::kStabilityLaunchCount); |
| 452 metrics->page_load_count = | 462 metrics->page_load_count = |
| 453 local_state->GetInteger(prefs::kStabilityPageLoadCount); | 463 local_state->GetInteger(prefs::kStabilityPageLoadCount); |
| 454 metrics->browser_crash_count = | 464 metrics->browser_crash_count = |
| 455 local_state->GetInteger(prefs::kStabilityCrashCount); | 465 local_state->GetInteger(prefs::kStabilityCrashCount); |
| 456 metrics->renderer_crash_count = | 466 metrics->renderer_crash_count = |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags)); | 589 parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags)); |
| 580 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { | 590 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { |
| 581 g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch); | 591 g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch); |
| 582 if (!file_util::AbsolutePath(&g_v8_log_path)) | 592 if (!file_util::AbsolutePath(&g_v8_log_path)) |
| 583 g_v8_log_path = FilePath(); | 593 g_v8_log_path = FilePath(); |
| 584 } | 594 } |
| 585 } | 595 } |
| 586 } | 596 } |
| 587 } | 597 } |
| 588 } | 598 } |
| OLD | NEW |