| 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 <X11/extensions/Xrandr.h> | 5 #include <X11/extensions/Xrandr.h> |
| 6 | 6 |
| 7 #undef Bool | 7 #undef Bool |
| 8 #undef None | 8 #undef None |
| 9 | 9 |
| 10 #include "base/test/simple_test_tick_clock.h" | 10 #include "base/test/simple_test_tick_clock.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "ui/display/chromeos/x11/display_mode_x11.h" | 12 #include "ui/display/chromeos/x11/display_mode_x11.h" |
| 13 #include "ui/display/chromeos/x11/display_snapshot_x11.h" | 13 #include "ui/display/chromeos/x11/display_snapshot_x11.h" |
| 14 #include "ui/display/chromeos/x11/native_display_delegate_x11.h" | 14 #include "ui/display/chromeos/x11/native_display_delegate_x11.h" |
| 15 #include "ui/display/chromeos/x11/native_display_event_dispatcher_x11.h" | 15 #include "ui/display/chromeos/x11/native_display_event_dispatcher_x11.h" |
| 16 | 16 |
| 17 namespace ui { | 17 namespace ui { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 DisplaySnapshotX11* CreateOutput(RROutput output, RRCrtc crtc) { | 21 DisplaySnapshotX11* CreateOutput(RROutput output, RRCrtc crtc) { |
| 22 static const DisplayModeX11* kDefaultDisplayMode = | 22 static const DisplayModeX11* kDefaultDisplayMode = |
| 23 new DisplayModeX11(gfx::Size(1, 1), false, 60.0f, 20); | 23 new DisplayModeX11(gfx::Size(1, 1), false, 60.0f, 20); |
| 24 | 24 |
| 25 DisplaySnapshotX11* snapshot = new DisplaySnapshotX11( | 25 DisplaySnapshotX11* snapshot = new DisplaySnapshotX11( |
| 26 0, | 26 0, |
| 27 false, | |
| 28 gfx::Point(0, 0), | 27 gfx::Point(0, 0), |
| 29 gfx::Size(0, 0), | 28 gfx::Size(0, 0), |
| 30 DISPLAY_CONNECTION_TYPE_UNKNOWN, | 29 DISPLAY_CONNECTION_TYPE_UNKNOWN, |
| 31 false, | 30 false, |
| 32 false, | 31 false, |
| 33 std::string(), | 32 std::string(), |
| 34 std::vector<const DisplayMode*>(1, kDefaultDisplayMode), | 33 std::vector<const DisplayMode*>(1, kDefaultDisplayMode), |
| 35 kDefaultDisplayMode, | 34 kDefaultDisplayMode, |
| 36 NULL, | 35 NULL, |
| 37 output, | 36 output, |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 DispatchOutputChangeEvent(2, 11, 20, true); | 282 DispatchOutputChangeEvent(2, 11, 20, true); |
| 284 EXPECT_EQ(3, helper_delegate_->num_calls_notify_observers()); | 283 EXPECT_EQ(3, helper_delegate_->num_calls_notify_observers()); |
| 285 | 284 |
| 286 test_tick_clock_->Advance( | 285 test_tick_clock_->Advance( |
| 287 base::TimeDelta::FromMilliseconds(kHalfOfExpirationMs)); | 286 base::TimeDelta::FromMilliseconds(kHalfOfExpirationMs)); |
| 288 DispatchOutputChangeEvent(2, 11, 20, true); | 287 DispatchOutputChangeEvent(2, 11, 20, true); |
| 289 EXPECT_EQ(4, helper_delegate_->num_calls_notify_observers()); | 288 EXPECT_EQ(4, helper_delegate_->num_calls_notify_observers()); |
| 290 } | 289 } |
| 291 | 290 |
| 292 } // namespace ui | 291 } // namespace ui |
| OLD | NEW |