Index: trunk/src/ui/views/corewm/focus_controller_unittest.cc |
=================================================================== |
--- trunk/src/ui/views/corewm/focus_controller_unittest.cc (revision 236878) |
+++ trunk/src/ui/views/corewm/focus_controller_unittest.cc (working copy) |
@@ -305,7 +305,6 @@ |
virtual void NoShiftActiveOnActivation() {} |
virtual void NoFocusChangeOnClickOnCaptureWindow() {} |
virtual void ChangeFocusWhenNothingFocusedAndCaptured() {} |
- virtual void ChangeFocusWithinActivate() {} |
private: |
scoped_ptr<FocusController> focus_controller_; |
@@ -314,38 +313,6 @@ |
DISALLOW_COPY_AND_ASSIGN(FocusControllerTestBase); |
}; |
-// ActivationChangeObserver that attempts to focus another window on an |
-// activation change. |
-class TestActivationChangeObserver |
- : public aura::client::ActivationChangeObserver { |
- public: |
- TestActivationChangeObserver() : gained_active_(NULL), to_focus_(NULL) {} |
- virtual ~TestActivationChangeObserver() {} |
- |
- // Sets the window to focus (|to_focus|) when a window is made active. |
- void SetWindows(aura::Window* gained_active, aura::Window* to_focus) { |
- gained_active_ = gained_active; |
- to_focus_ = to_focus; |
- } |
- |
- // aura::client::ActivationChangeObserver: |
- virtual void OnWindowActivated(aura::Window* gained_active, |
- aura::Window* lost_active) OVERRIDE { |
- if (gained_active == gained_active_ && to_focus_) { |
- aura::Window* to_focus = to_focus_; |
- to_focus_ = NULL; |
- gained_active_ = NULL; |
- to_focus->Focus(); |
- } |
- } |
- |
- private: |
- aura::Window* gained_active_; |
- aura::Window* to_focus_; |
- |
- DISALLOW_COPY_AND_ASSIGN(TestActivationChangeObserver); |
-}; |
- |
// Test base for tests where focus is directly set to a target window. |
class FocusControllerDirectTestBase : public FocusControllerTestBase { |
protected: |
@@ -651,25 +618,6 @@ |
aura::client::GetCaptureClient(root_window())->ReleaseCapture(w1); |
} |
- // Verifies a request to focus a window is honored if the |
- // ActivationChangeObserver changes focus. |
- virtual void ChangeFocusWithinActivate() OVERRIDE { |
- TestActivationChangeObserver test_observer; |
- aura::client::GetActivationClient(root_window())-> |
- AddObserver(&test_observer); |
- // Set things such that when |w1| is made active a request is made to focus |
- // |w11|. |
- test_observer.SetWindows(root_window()->GetChildById(1), |
- root_window()->GetChildById(11)); |
- // Attempt to activate |w12|. This should activate |w1| (its the child of |
- // the root |
- ActivateWindowById(12); |
- EXPECT_EQ(1, GetActiveWindowId()); |
- EXPECT_EQ(12, GetFocusedWindowId()); |
- aura::client::GetActivationClient(root_window())->RemoveObserver( |
- &test_observer); |
- } |
- |
private: |
DISALLOW_COPY_AND_ASSIGN(FocusControllerDirectTestBase); |
}; |
@@ -1071,7 +1019,5 @@ |
FOCUS_CONTROLLER_TEST(FocusControllerApiTest, |
ChangeFocusWhenNothingFocusedAndCaptured); |
-FOCUS_CONTROLLER_TEST(FocusControllerApiTest, ChangeFocusWithinActivate); |
- |
} // namespace corewm |
} // namespace views |