OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/wm/workspace/workspace_event_handler.h" | 5 #include "ash/wm/workspace/workspace_event_handler.h" |
6 | 6 |
7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
10 #include "ash/wm/window_state.h" | 10 #include "ash/wm/window_state.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 bool DidPropertyChange(const void* property) const { | 65 bool DidPropertyChange(const void* property) const { |
66 return std::find(properties_changed_.begin(), | 66 return std::find(properties_changed_.begin(), |
67 properties_changed_.end(), | 67 properties_changed_.end(), |
68 property) != properties_changed_.end(); | 68 property) != properties_changed_.end(); |
69 } | 69 } |
70 | 70 |
71 private: | 71 private: |
72 virtual void OnWindowPropertyChanged(aura::Window* window, | 72 virtual void OnWindowPropertyChanged(aura::Window* window, |
73 const void* key, | 73 const void* key, |
74 intptr_t old) OVERRIDE { | 74 intptr_t old) override { |
75 properties_changed_.push_back(key); | 75 properties_changed_.push_back(key); |
76 } | 76 } |
77 | 77 |
78 aura::Window* window_; | 78 aura::Window* window_; |
79 std::vector<const void*> properties_changed_; | 79 std::vector<const void*> properties_changed_; |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(WindowPropertyObserver); | 81 DISALLOW_COPY_AND_ASSIGN(WindowPropertyObserver); |
82 }; | 82 }; |
83 | 83 |
84 TEST_F(WorkspaceEventHandlerTest, DoubleClickSingleAxisResizeEdge) { | 84 TEST_F(WorkspaceEventHandlerTest, DoubleClickSingleAxisResizeEdge) { |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 // Second click will go to the header | 542 // Second click will go to the header |
543 delegate.set_window_component(HTCAPTION); | 543 delegate.set_window_component(HTCAPTION); |
544 generator.PressRightButton(); | 544 generator.PressRightButton(); |
545 generator.ReleaseRightButton(); | 545 generator.ReleaseRightButton(); |
546 EXPECT_FALSE(window_state->IsMaximized()); | 546 EXPECT_FALSE(window_state->IsMaximized()); |
547 generator.DoubleClickLeftButton(); | 547 generator.DoubleClickLeftButton(); |
548 EXPECT_FALSE(window_state->IsMaximized()); | 548 EXPECT_FALSE(window_state->IsMaximized()); |
549 } | 549 } |
550 | 550 |
551 } // namespace ash | 551 } // namespace ash |
OLD | NEW |