Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc |
index 17e597c3854ca931e85788218cf49116290b3a80..8a66c6e032717e46a21ab5390aaa305c76b6565a 100644 |
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc |
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc |
@@ -77,30 +77,6 @@ class WMStateWaiter : public X11PropertyChangeWaiter { |
DISALLOW_COPY_AND_ASSIGN(WMStateWaiter); |
}; |
-// Blocks till |window| gets activated. |
-class ActivationWaiter : public X11PropertyChangeWaiter { |
- public: |
- explicit ActivationWaiter(XID window) |
- : X11PropertyChangeWaiter(ui::GetX11RootWindow(), "_NET_ACTIVE_WINDOW"), |
- window_(window) { |
- } |
- |
- virtual ~ActivationWaiter() { |
- } |
- |
- private: |
- // X11PropertyChangeWaiter: |
- virtual bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) OVERRIDE { |
- XID xid = 0; |
- ui::GetXIDProperty(ui::GetX11RootWindow(), "_NET_ACTIVE_WINDOW", &xid); |
- return xid != window_; |
- } |
- |
- XID window_; |
- |
- DISALLOW_COPY_AND_ASSIGN(ActivationWaiter); |
-}; |
- |
// A NonClientFrameView with a window mask with the bottom right corner cut out. |
class ShapedNonClientFrameView : public NonClientFrameView { |
public: |
@@ -469,29 +445,4 @@ TEST_F(DesktopWindowTreeHostX11Test, ToggleMinimizePropogateToContentWindow) { |
EXPECT_TRUE(widget.GetNativeWindow()->IsVisible()); |
} |
-// Test that calling Widget::Deactivate() sets the widget as inactive wrt to |
-// Chrome even if it not possible to deactivate the window wrt to the x server. |
-// This behavior is required by several interactive_ui_tests. |
-TEST_F(DesktopWindowTreeHostX11Test, Deactivate) { |
- scoped_ptr<Widget> widget(CreateWidget(NULL)); |
- |
- ActivationWaiter waiter( |
- widget->GetNativeWindow()->GetHost()->GetAcceleratedWidget()); |
- widget->Show(); |
- widget->Activate(); |
- waiter.Wait(); |
- |
- widget->Deactivate(); |
- // Regardless of whether |widget|'s X11 window eventually gets deactivated, |
- // |widget|'s "active" state should change. |
- EXPECT_FALSE(widget->IsActive()); |
- |
- // |widget|'s X11 window should still be active. Reactivating |widget| should |
- // update the widget's "active" state. |
- // Note: Activating a widget whose X11 window is not active does not |
- // synchronously update the widget's "active" state. |
- widget->Activate(); |
- EXPECT_TRUE(widget->IsActive()); |
-} |
- |
} // namespace views |