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_dbus_thread_manager.h" | 8 #include "chromeos/dbus/fake_dbus_thread_manager.h" |
9 #include "chromeos/dbus/fake_power_manager_client.h" | 9 #include "chromeos/dbus/fake_power_manager_client.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "ui/display/chromeos/test/test_display_snapshot.h" | 11 #include "ui/display/chromeos/test/test_display_snapshot.h" |
12 | 12 |
13 namespace ash { | 13 namespace ash { |
14 | |
15 namespace internal { | |
16 | |
17 namespace { | 14 namespace { |
18 | 15 |
19 ui::TestDisplaySnapshot* CreateInternalSnapshot() { | 16 ui::TestDisplaySnapshot* CreateInternalSnapshot() { |
20 ui::TestDisplaySnapshot* output = new ui::TestDisplaySnapshot(); | 17 ui::TestDisplaySnapshot* output = new ui::TestDisplaySnapshot(); |
21 output->set_type(ui::OUTPUT_TYPE_INTERNAL); | 18 output->set_type(ui::OUTPUT_TYPE_INTERNAL); |
22 return output; | 19 return output; |
23 } | 20 } |
24 | 21 |
25 ui::TestDisplaySnapshot* CreateVGASnapshot() { | 22 ui::TestDisplaySnapshot* CreateVGASnapshot() { |
26 ui::TestDisplaySnapshot* output = new ui::TestDisplaySnapshot(); | 23 ui::TestDisplaySnapshot* output = new ui::TestDisplaySnapshot(); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 observer_->OnDisplayModeChanged(outputs); | 182 observer_->OnDisplayModeChanged(outputs); |
186 | 183 |
187 // Remove VGA output. | 184 // Remove VGA output. |
188 outputs.erase(outputs.begin() + 1); | 185 outputs.erase(outputs.begin() + 1); |
189 observer_->OnDisplayModeChanged(outputs); | 186 observer_->OnDisplayModeChanged(outputs); |
190 | 187 |
191 EXPECT_EQ(2, fake_power_client_->num_set_is_projecting_calls()); | 188 EXPECT_EQ(2, fake_power_client_->num_set_is_projecting_calls()); |
192 EXPECT_FALSE(fake_power_client_->is_projecting()); | 189 EXPECT_FALSE(fake_power_client_->is_projecting()); |
193 } | 190 } |
194 | 191 |
195 } // namespace internal | |
196 | |
197 } // namespace ash | 192 } // namespace ash |
OLD | NEW |