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 "chrome/browser/diagnostics/diagnostics_model.h" | 5 #include "chrome/browser/diagnostics/diagnostics_model.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
11 | 12 |
12 namespace diagnostics { | 13 namespace diagnostics { |
13 | 14 |
14 // Basic harness to acquire and release the Diagnostic model object. | 15 // Basic harness to acquire and release the Diagnostic model object. |
15 class DiagnosticsModelTest : public testing::Test { | 16 class DiagnosticsModelTest : public testing::Test { |
16 protected: | 17 protected: |
17 DiagnosticsModelTest() : cmdline_(base::CommandLine::NO_PROGRAM) {} | 18 DiagnosticsModelTest() : cmdline_(base::CommandLine::NO_PROGRAM) {} |
18 | 19 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 EXPECT_TRUE(observer.tests_done()); | 100 EXPECT_TRUE(observer.tests_done()); |
100 EXPECT_FALSE(observer.recovery_done()); | 101 EXPECT_FALSE(observer.recovery_done()); |
101 model_->RecoverAll(&observer); | 102 model_->RecoverAll(&observer); |
102 EXPECT_TRUE(observer.recovery_done()); | 103 EXPECT_TRUE(observer.recovery_done()); |
103 EXPECT_EQ(DiagnosticsModel::kDiagnosticsTestCount, model_->GetTestRunCount()); | 104 EXPECT_EQ(DiagnosticsModel::kDiagnosticsTestCount, model_->GetTestRunCount()); |
104 EXPECT_EQ(DiagnosticsModel::kDiagnosticsTestCount, observer.num_tested()); | 105 EXPECT_EQ(DiagnosticsModel::kDiagnosticsTestCount, observer.num_tested()); |
105 EXPECT_EQ(DiagnosticsModel::kDiagnosticsTestCount, observer.num_recovered()); | 106 EXPECT_EQ(DiagnosticsModel::kDiagnosticsTestCount, observer.num_recovered()); |
106 } | 107 } |
107 | 108 |
108 } // namespace diagnostics | 109 } // namespace diagnostics |
OLD | NEW |