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 #include <fstream> | 5 #include <fstream> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/environment.h" | 10 #include "base/environment.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 std::string GetChromeRevision() { | 107 std::string GetChromeRevision() { |
108 // Get Chrome version | 108 // Get Chrome version |
109 std::string last_change; | 109 std::string last_change; |
110 #if defined(OS_WIN) | 110 #if defined(OS_WIN) |
111 // Check file version info for chrome dll. | 111 // Check file version info for chrome dll. |
112 scoped_ptr<FileVersionInfo> file_info; | 112 scoped_ptr<FileVersionInfo> file_info; |
113 file_info.reset( | 113 file_info.reset( |
114 FileVersionInfo::CreateFileVersionInfo(FilePath(kChromeDll))); | 114 FileVersionInfo::CreateFileVersionInfo(FilePath(kChromeDll))); |
115 last_change = WideToASCII(file_info->last_change()); | 115 last_change = WideToASCII(file_info->last_change()); |
116 #elif defined(OS_LINUX) || defined(OS_MACOSX) | 116 #elif defined(OS_POSIX) |
117 chrome::VersionInfo version_info; | 117 chrome::VersionInfo version_info; |
118 last_change = version_info.LastChange(); | 118 last_change = version_info.LastChange(); |
119 #endif // !defined(OS_WIN) | 119 #endif // !defined(OS_WIN) |
120 return last_change; | 120 return last_change; |
121 } | 121 } |
122 | 122 |
123 void InitTestLog(base::Time start_time) { | 123 void InitTestLog(base::Time start_time) { |
124 FilePath path = GetTestLogFilePath(); | 124 FilePath path = GetTestLogFilePath(); |
125 std::ofstream test_log_file; | 125 std::ofstream test_log_file; |
126 if (!path.empty()) | 126 if (!path.empty()) |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 } | 821 } |
822 } | 822 } |
823 | 823 |
824 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { | 824 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { |
825 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); | 825 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
826 if (parsed_command_line.HasSwitch(kReproSwitch)) | 826 if (parsed_command_line.HasSwitch(kReproSwitch)) |
827 RunReproduction(); | 827 RunReproduction(); |
828 else | 828 else |
829 RunAutomatedUITest(); | 829 RunAutomatedUITest(); |
830 } | 830 } |
OLD | NEW |