| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ash/display/projecting_observer_chromeos.h" | 5 #include "ash/display/projecting_observer_chromeos.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_vector.h" | 7 #include "base/memory/scoped_vector.h" |
| 8 #include "chromeos/dbus/fake_power_manager_client.h" | 8 #include "chromeos/dbus/fake_power_manager_client.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "ui/display/chromeos/test/test_display_snapshot.h" | 10 #include "ui/display/chromeos/test/test_display_snapshot.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 outputs.push_back(state); | 33 outputs.push_back(state); |
| 34 } | 34 } |
| 35 | 35 |
| 36 return outputs; | 36 return outputs; |
| 37 } | 37 } |
| 38 | 38 |
| 39 class ProjectingObserverTest : public testing::Test { | 39 class ProjectingObserverTest : public testing::Test { |
| 40 public: | 40 public: |
| 41 ProjectingObserverTest() : observer_(&fake_power_client_) {} | 41 ProjectingObserverTest() : observer_(&fake_power_client_) {} |
| 42 | 42 |
| 43 virtual ~ProjectingObserverTest() {} | 43 ~ProjectingObserverTest() override {} |
| 44 | 44 |
| 45 protected: | 45 protected: |
| 46 chromeos::FakePowerManagerClient fake_power_client_; | 46 chromeos::FakePowerManagerClient fake_power_client_; |
| 47 ProjectingObserver observer_; | 47 ProjectingObserver observer_; |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 DISALLOW_COPY_AND_ASSIGN(ProjectingObserverTest); | 50 DISALLOW_COPY_AND_ASSIGN(ProjectingObserverTest); |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } // namespace | 53 } // namespace |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 171 |
| 172 // Remove VGA output. | 172 // Remove VGA output. |
| 173 outputs.erase(outputs.begin() + 1); | 173 outputs.erase(outputs.begin() + 1); |
| 174 observer_.OnDisplayModeChanged(outputs); | 174 observer_.OnDisplayModeChanged(outputs); |
| 175 | 175 |
| 176 EXPECT_EQ(2, fake_power_client_.num_set_is_projecting_calls()); | 176 EXPECT_EQ(2, fake_power_client_.num_set_is_projecting_calls()); |
| 177 EXPECT_FALSE(fake_power_client_.is_projecting()); | 177 EXPECT_FALSE(fake_power_client_.is_projecting()); |
| 178 } | 178 } |
| 179 | 179 |
| 180 } // namespace ash | 180 } // namespace ash |
| OLD | NEW |