| 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 <memory> | 6 #include <memory> |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 EXPECT_TRUE(widget_bounds_changed()); | 928 EXPECT_TRUE(widget_bounds_changed()); |
| 929 reset(); | 929 reset(); |
| 930 | 930 |
| 931 // Resize to the same thing while shown does nothing. | 931 // Resize to the same thing while shown does nothing. |
| 932 widget->SetSize(gfx::Size(170, 100)); | 932 widget->SetSize(gfx::Size(170, 100)); |
| 933 EXPECT_FALSE(widget_bounds_changed()); | 933 EXPECT_FALSE(widget_bounds_changed()); |
| 934 reset(); | 934 reset(); |
| 935 | 935 |
| 936 // Move, but don't change the size. | 936 // Move, but don't change the size. |
| 937 widget->SetBounds(gfx::Rect(110, 110, 170, 100)); | 937 widget->SetBounds(gfx::Rect(110, 110, 170, 100)); |
| 938 // Currently fails on Mus. http://crbug.com/622575. | 938 EXPECT_TRUE(widget_bounds_changed()); |
| 939 if (IsMus()) | |
| 940 EXPECT_FALSE(widget_bounds_changed()); | |
| 941 else | |
| 942 EXPECT_TRUE(widget_bounds_changed()); | |
| 943 reset(); | 939 reset(); |
| 944 | 940 |
| 945 // Moving to the same place does nothing. | 941 // Moving to the same place does nothing. |
| 946 widget->SetBounds(gfx::Rect(110, 110, 170, 100)); | 942 widget->SetBounds(gfx::Rect(110, 110, 170, 100)); |
| 947 EXPECT_FALSE(widget_bounds_changed()); | 943 EXPECT_FALSE(widget_bounds_changed()); |
| 948 reset(); | 944 reset(); |
| 949 | 945 |
| 950 // No bounds change when closing. | 946 // No bounds change when closing. |
| 951 widget->CloseNow(); | 947 widget->CloseNow(); |
| 952 EXPECT_FALSE(widget_bounds_changed()); | 948 EXPECT_FALSE(widget_bounds_changed()); |
| (...skipping 2848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3801 CreateParams(Widget::InitParams::TYPE_WINDOW), | 3797 CreateParams(Widget::InitParams::TYPE_WINDOW), |
| 3802 Widget::InitParams::TRANSLUCENT_WINDOW); | 3798 Widget::InitParams::TRANSLUCENT_WINDOW); |
| 3803 EXPECT_EQ(IsNativeWindowTransparent(widget.GetNativeWindow()), | 3799 EXPECT_EQ(IsNativeWindowTransparent(widget.GetNativeWindow()), |
| 3804 widget.ShouldWindowContentsBeTransparent()); | 3800 widget.ShouldWindowContentsBeTransparent()); |
| 3805 } | 3801 } |
| 3806 | 3802 |
| 3807 #endif // !defined(OS_CHROMEOS) | 3803 #endif // !defined(OS_CHROMEOS) |
| 3808 | 3804 |
| 3809 } // namespace test | 3805 } // namespace test |
| 3810 } // namespace views | 3806 } // namespace views |
| OLD | NEW |