OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 5 #include <algorithm> |
6 #include <set> | 6 #include <set> |
7 | 7 |
8 #include "base/basictypes.h" | |
9 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "build/build_config.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "ui/base/hit_test.h" | 16 #include "ui/base/hit_test.h" |
16 #include "ui/compositor/layer_animation_observer.h" | 17 #include "ui/compositor/layer_animation_observer.h" |
17 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 18 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
18 #include "ui/compositor/scoped_layer_animation_settings.h" | 19 #include "ui/compositor/scoped_layer_animation_settings.h" |
19 #include "ui/events/event_utils.h" | 20 #include "ui/events/event_utils.h" |
20 #include "ui/events/test/event_generator.h" | 21 #include "ui/events/test/event_generator.h" |
21 #include "ui/gfx/geometry/point.h" | 22 #include "ui/gfx/geometry/point.h" |
22 #include "ui/gfx/native_widget_types.h" | 23 #include "ui/gfx/native_widget_types.h" |
23 #include "ui/views/bubble/bubble_delegate.h" | 24 #include "ui/views/bubble/bubble_delegate.h" |
(...skipping 3415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3439 EXPECT_EQ(scale_factor, view->last_scale_factor()); | 3440 EXPECT_EQ(scale_factor, view->last_scale_factor()); |
3440 | 3441 |
3441 // Changes should be propagated. | 3442 // Changes should be propagated. |
3442 scale_factor *= 2.0f; | 3443 scale_factor *= 2.0f; |
3443 widget->GetLayer()->OnDeviceScaleFactorChanged(scale_factor); | 3444 widget->GetLayer()->OnDeviceScaleFactorChanged(scale_factor); |
3444 EXPECT_EQ(scale_factor, view->last_scale_factor()); | 3445 EXPECT_EQ(scale_factor, view->last_scale_factor()); |
3445 } | 3446 } |
3446 | 3447 |
3447 } // namespace test | 3448 } // namespace test |
3448 } // namespace views | 3449 } // namespace views |
OLD | NEW |