OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/diagnostics/diagnostics_controller.h" | 5 #include "chrome/browser/diagnostics/diagnostics_controller.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "base/path_service.h" | 13 #include "base/path_service.h" |
| 14 #include "build/build_config.h" |
13 #include "chrome/browser/diagnostics/diagnostics_model.h" | 15 #include "chrome/browser/diagnostics/diagnostics_model.h" |
14 #include "chrome/browser/diagnostics/diagnostics_writer.h" | 16 #include "chrome/browser/diagnostics/diagnostics_writer.h" |
15 #include "chrome/browser/diagnostics/sqlite_diagnostics.h" | 17 #include "chrome/browser/diagnostics/sqlite_diagnostics.h" |
16 #include "chrome/common/chrome_paths.h" | 18 #include "chrome/common/chrome_paths.h" |
17 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
18 #include "chromeos/chromeos_constants.h" | 20 #include "chromeos/chromeos_constants.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
20 | 22 |
21 namespace diagnostics { | 23 namespace diagnostics { |
22 | 24 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 EXPECT_EQ(DiagnosticsModel::TEST_FAIL_CONTINUE, info->GetResult()); | 153 EXPECT_EQ(DiagnosticsModel::TEST_FAIL_CONTINUE, info->GetResult()); |
152 EXPECT_EQ(DIAG_SQLITE_ERROR_HANDLER_CALLED, info->GetOutcomeCode()); | 154 EXPECT_EQ(DIAG_SQLITE_ERROR_HANDLER_CALLED, info->GetOutcomeCode()); |
153 | 155 |
154 DiagnosticsController::GetInstance()->RunRecovery(cmdline_, writer_.get()); | 156 DiagnosticsController::GetInstance()->RunRecovery(cmdline_, writer_.get()); |
155 EXPECT_EQ(DiagnosticsModel::RECOVERY_OK, info->GetResult()); | 157 EXPECT_EQ(DiagnosticsModel::RECOVERY_OK, info->GetResult()); |
156 EXPECT_FALSE(base::PathExists(db_path)); | 158 EXPECT_FALSE(base::PathExists(db_path)); |
157 } | 159 } |
158 #endif | 160 #endif |
159 | 161 |
160 } // namespace diagnostics | 162 } // namespace diagnostics |
OLD | NEW |