| 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 "ui/gfx/display_change_notifier.h" | 5 #include "ui/gfx/display_change_notifier.h" |
| 6 | 6 |
| 7 #include <stdint.h> |
| 8 |
| 9 #include "base/macros.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "ui/gfx/display.h" | 11 #include "ui/gfx/display.h" |
| 9 #include "ui/gfx/display_observer.h" | 12 #include "ui/gfx/display_observer.h" |
| 10 | 13 |
| 11 namespace gfx { | 14 namespace gfx { |
| 12 | 15 |
| 13 class MockDisplayObserver : public DisplayObserver { | 16 class MockDisplayObserver : public DisplayObserver { |
| 14 public: | 17 public: |
| 15 MockDisplayObserver() | 18 MockDisplayObserver() |
| 16 : display_added_(0), | 19 : display_added_(0), |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 change_notifier.NotifyDisplaysChanged(old_displays, new_displays); | 474 change_notifier.NotifyDisplaysChanged(old_displays, new_displays); |
| 472 EXPECT_EQ(1, observer.display_changed()); | 475 EXPECT_EQ(1, observer.display_changed()); |
| 473 uint32_t metrics = DisplayObserver::DISPLAY_METRIC_BOUNDS | | 476 uint32_t metrics = DisplayObserver::DISPLAY_METRIC_BOUNDS | |
| 474 DisplayObserver::DISPLAY_METRIC_ROTATION | | 477 DisplayObserver::DISPLAY_METRIC_ROTATION | |
| 475 DisplayObserver::DISPLAY_METRIC_WORK_AREA | | 478 DisplayObserver::DISPLAY_METRIC_WORK_AREA | |
| 476 DisplayObserver::DISPLAY_METRIC_DEVICE_SCALE_FACTOR; | 479 DisplayObserver::DISPLAY_METRIC_DEVICE_SCALE_FACTOR; |
| 477 EXPECT_EQ(metrics, observer.latest_metrics_change()); | 480 EXPECT_EQ(metrics, observer.latest_metrics_change()); |
| 478 } | 481 } |
| 479 | 482 |
| 480 } // namespace gfx | 483 } // namespace gfx |
| OLD | NEW |