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/shelf/shelf_view.h" | 5 #include "ash/shelf/shelf_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 2908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2919 generator.PressTouch(); | 2919 generator.PressTouch(); |
2920 EXPECT_EQ(views::InkDropState::ACTIVATED, | 2920 EXPECT_EQ(views::InkDropState::ACTIVATED, |
2921 overflow_button_ink_drop_->GetTargetInkDropState()); | 2921 overflow_button_ink_drop_->GetTargetInkDropState()); |
2922 EXPECT_THAT(overflow_button_ink_drop_->GetAndResetRequestedStates(), | 2922 EXPECT_THAT(overflow_button_ink_drop_->GetAndResetRequestedStates(), |
2923 IsEmpty()); | 2923 IsEmpty()); |
2924 | 2924 |
2925 generator.ReleaseTouch(); | 2925 generator.ReleaseTouch(); |
2926 EXPECT_EQ(views::InkDropState::HIDDEN, | 2926 EXPECT_EQ(views::InkDropState::HIDDEN, |
2927 overflow_button_ink_drop_->GetTargetInkDropState()); | 2927 overflow_button_ink_drop_->GetTargetInkDropState()); |
2928 EXPECT_THAT(overflow_button_ink_drop_->GetAndResetRequestedStates(), | 2928 EXPECT_THAT(overflow_button_ink_drop_->GetAndResetRequestedStates(), |
2929 ElementsAre(views::InkDropState::DEACTIVATED, | 2929 ElementsAre(views::InkDropState::DEACTIVATED)); |
2930 views::InkDropState::HIDDEN)); | |
2931 | 2930 |
2932 EXPECT_FALSE(test_api_->IsShowingOverflowBubble()); | 2931 EXPECT_FALSE(test_api_->IsShowingOverflowBubble()); |
2933 } | 2932 } |
2934 | 2933 |
2935 // Tests ink drop state transitions for the overflow button when it is active | 2934 // Tests ink drop state transitions for the overflow button when it is active |
2936 // and the user taps down on it and drags it out of the button bounds. | 2935 // and the user taps down on it and drags it out of the button bounds. |
2937 TEST_F(OverflowButtonActiveInkDropTest, TouchDragOut) { | 2936 TEST_F(OverflowButtonActiveInkDropTest, TouchDragOut) { |
2938 ui::test::EventGenerator& generator = GetEventGenerator(); | 2937 ui::test::EventGenerator& generator = GetEventGenerator(); |
2939 generator.set_current_location(GetScreenPointInsideOverflowButton()); | 2938 generator.set_current_location(GetScreenPointInsideOverflowButton()); |
2940 | 2939 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3015 EXPECT_EQ(views::InkDropState::ACTIVATED, | 3014 EXPECT_EQ(views::InkDropState::ACTIVATED, |
3016 overflow_button_ink_drop_->GetTargetInkDropState()); | 3015 overflow_button_ink_drop_->GetTargetInkDropState()); |
3017 EXPECT_THAT(overflow_button_ink_drop_->GetAndResetRequestedStates(), | 3016 EXPECT_THAT(overflow_button_ink_drop_->GetAndResetRequestedStates(), |
3018 IsEmpty()); | 3017 IsEmpty()); |
3019 | 3018 |
3020 ASSERT_TRUE(test_api_->IsShowingOverflowBubble()); | 3019 ASSERT_TRUE(test_api_->IsShowingOverflowBubble()); |
3021 } | 3020 } |
3022 | 3021 |
3023 } // namespace test | 3022 } // namespace test |
3024 } // namespace ash | 3023 } // namespace ash |
OLD | NEW |