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 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 metrics->crash_dump_count = num_dumps; | 428 metrics->crash_dump_count = num_dumps; |
429 } | 429 } |
430 | 430 |
431 // Get a PrefService whose contents correspond to the Local State file | 431 // Get a PrefService whose contents correspond to the Local State file |
432 // that was saved by the app as it closed. The caller takes ownership of the | 432 // that was saved by the app as it closed. The caller takes ownership of the |
433 // returned PrefService object. | 433 // returned PrefService object. |
434 PrefService* GetLocalState(PrefRegistry* registry) { | 434 PrefService* GetLocalState(PrefRegistry* registry) { |
435 base::FilePath path; | 435 base::FilePath path; |
436 chrome::GetChromeFrameUserDataDirectory(&path); | 436 chrome::GetChromeFrameUserDataDirectory(&path); |
437 PrefServiceMockBuilder builder; | 437 PrefServiceMockBuilder builder; |
438 builder.WithUserFilePrefs( | 438 builder.SetUserPrefsFile( |
439 path, | 439 path, |
440 JsonPrefStore::GetTaskRunnerForFile( | 440 JsonPrefStore::GetTaskRunnerForFile( |
441 path, content::BrowserThread::GetBlockingPool())); | 441 path, content::BrowserThread::GetBlockingPool())); |
442 return builder.Create(registry); | 442 return builder.Create(registry).release(); |
443 } | 443 } |
444 | 444 |
445 void GetStabilityMetrics(NavigationMetrics* metrics) { | 445 void GetStabilityMetrics(NavigationMetrics* metrics) { |
446 if (!metrics) | 446 if (!metrics) |
447 return; | 447 return; |
448 scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple(); | 448 scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple(); |
449 registry->RegisterBooleanPref(prefs::kStabilityExitedCleanly, false); | 449 registry->RegisterBooleanPref(prefs::kStabilityExitedCleanly, false); |
450 registry->RegisterIntegerPref(prefs::kStabilityExecutionPhase, 0); | 450 registry->RegisterIntegerPref(prefs::kStabilityExecutionPhase, 0); |
451 registry->RegisterIntegerPref(prefs::kStabilityLaunchCount, -1); | 451 registry->RegisterIntegerPref(prefs::kStabilityLaunchCount, -1); |
452 registry->RegisterIntegerPref(prefs::kStabilityPageLoadCount, -1); | 452 registry->RegisterIntegerPref(prefs::kStabilityPageLoadCount, -1); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 CommandLine v8_command_line( | 592 CommandLine v8_command_line( |
593 parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags)); | 593 parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags)); |
594 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { | 594 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { |
595 g_v8_log_path = base::MakeAbsoluteFilePath( | 595 g_v8_log_path = base::MakeAbsoluteFilePath( |
596 v8_command_line.GetSwitchValuePath(kV8LogFileSwitch)); | 596 v8_command_line.GetSwitchValuePath(kV8LogFileSwitch)); |
597 } | 597 } |
598 } | 598 } |
599 } | 599 } |
600 } | 600 } |
601 } | 601 } |
OLD | NEW |