| Index: ui/views/controls/native/native_view_host_mac_unittest.mm
|
| diff --git a/ui/views/controls/native/native_view_host_mac_unittest.mm b/ui/views/controls/native/native_view_host_mac_unittest.mm
|
| index 0208dc14a5b9aac4aff8936bdb903984c8cf384f..6c9e071e14a6942e56ced8fc5fa83e660b589340 100644
|
| --- a/ui/views/controls/native/native_view_host_mac_unittest.mm
|
| +++ b/ui/views/controls/native/native_view_host_mac_unittest.mm
|
| @@ -100,6 +100,24 @@ void CreateHost() {
|
| DestroyHost();
|
| }
|
|
|
| +// Test that the content windows' bounds are set to the correct values while the
|
| +// rendering size is equal or not equal to the View size.
|
| +TEST_F(NativeViewHostMacTest, ContentViewPositionAndSize) {
|
| + CreateHost();
|
| + toplevel()->SetBounds(gfx::Rect(0, 0, 100, 100));
|
| + EXPECT_EQ(gfx::Transform(), host()->native_view()->transform());
|
| +
|
| + native_host()->ShowWidget(5, 10, 100, 100, 200, 200);
|
| + EXPECT_EQ(gfx::Rect(0, 0, 200, 200).ToString(),
|
| + host()->native_view()->bounds().ToString());
|
| +
|
| + native_host()->ShowWidget(10, 25, 50, 50, 50, 50);
|
| + EXPECT_EQ(gfx::Rect(0, 0, 50, 50).ToString(),
|
| + host()->native_view()->bounds().ToString());
|
| +
|
| + DestroyHost();
|
| +}
|
| +
|
| // Ensure the native view is hidden along with its host, and when detaching, or
|
| // when attaching to a host that is already hidden.
|
| TEST_F(NativeViewHostMacTest, NativeViewHidden) {
|
|
|