| Index: ui/views/controls/native/native_view_host_unittest.cc
|
| diff --git a/ui/views/controls/native/native_view_host_unittest.cc b/ui/views/controls/native/native_view_host_unittest.cc
|
| index 247782437a5022d0d45cc68ee4277789ca2b69b1..2540732ff937b80643a23819364de9c5caf4df3c 100644
|
| --- a/ui/views/controls/native/native_view_host_unittest.cc
|
| +++ b/ui/views/controls/native/native_view_host_unittest.cc
|
| @@ -134,8 +134,13 @@ TEST_F(NativeViewHostTest, NativeViewHierarchyChanged) {
|
| toplevel()->GetRootView(),
|
| test_view,
|
| host));
|
| -
|
| +#if defined(USE_AURA)
|
| + // One notification is generated from inserting the native view into the
|
| + // clipping window.
|
| + EXPECT_EQ(1, test_view->notification_count());
|
| +#else
|
| EXPECT_EQ(0, test_view->notification_count());
|
| +#endif
|
| test_view->ResetCount();
|
|
|
| // Detaching should send a NativeViewHierarchyChanged() notification and
|
| @@ -150,8 +155,15 @@ TEST_F(NativeViewHostTest, NativeViewHierarchyChanged) {
|
| // reset the parent.
|
| host->Attach(child->GetNativeView());
|
| EXPECT_EQ(1, test_view->notification_count());
|
| +#if defined(USE_AURA)
|
| + // There is a clipping window inserted above the native view that needs to be
|
| + // accounted for when looking at the relationship between the native views.
|
| + EXPECT_EQ(toplevel()->GetNativeView(),
|
| + GetNativeParent(GetNativeParent(child->GetNativeView())));
|
| +#else
|
| EXPECT_EQ(toplevel()->GetNativeView(),
|
| GetNativeParent(child->GetNativeView()));
|
| +#endif
|
| }
|
|
|
| // Verifies ViewHierarchyChanged handles NativeViewHost remove, add and move
|
|
|