Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(984)

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc

Issue 414123005: Move DesktopWindowTreeHostX11Test.Deactivate to interactive_ui_tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11_interactive_uitest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11_interactive_uitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698