OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/views/autofill/autofill_popup_base_view.h" | 5 #include "chrome/browser/ui/views/autofill/autofill_popup_base_view.h" |
6 | 6 |
7 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h" | 7 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
10 #include "chrome/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 void SimulateGesture(ui::GestureEvent* event) { | 66 void SimulateGesture(ui::GestureEvent* event) { |
67 view_->OnGestureEvent(event); | 67 view_->OnGestureEvent(event); |
68 } | 68 } |
69 | 69 |
70 protected: | 70 protected: |
71 testing::NiceMock<MockAutofillPopupViewDelegate> mock_delegate_; | 71 testing::NiceMock<MockAutofillPopupViewDelegate> mock_delegate_; |
72 AutofillPopupBaseView* view_; | 72 AutofillPopupBaseView* view_; |
73 }; | 73 }; |
74 | 74 |
75 // Flaky on Win only. http://crbug.com/376299 | 75 // Flaky on Win and Linux. http://crbug.com/376299 |
76 #if defined(OS_WIN) | 76 #if defined(OS_LINUX) || defined(OS_WIN) |
77 #define MAYBE_GestureTest DISABLED_GestureTest | 77 #define MAYBE_GestureTest DISABLED_GestureTest |
78 #else | 78 #else |
79 #define MAYBE_GestureTest GestureTest | 79 #define MAYBE_GestureTest GestureTest |
80 #endif | 80 #endif |
81 | 81 |
82 IN_PROC_BROWSER_TEST_F(AutofillPopupBaseViewTest, MAYBE_GestureTest) { | 82 IN_PROC_BROWSER_TEST_F(AutofillPopupBaseViewTest, MAYBE_GestureTest) { |
83 gfx::Rect bounds(0, 0, 5, 5); | 83 gfx::Rect bounds(0, 0, 5, 5); |
84 gfx::Point point = bounds.CenterPoint(); | 84 gfx::Point point = bounds.CenterPoint(); |
85 EXPECT_CALL(mock_delegate_, popup_bounds()).WillRepeatedly(ReturnRef(bounds)); | 85 EXPECT_CALL(mock_delegate_, popup_bounds()).WillRepeatedly(ReturnRef(bounds)); |
86 | 86 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 gfx::Point(0, 0), | 122 gfx::Point(0, 0), |
123 0, 0); | 123 0, 0); |
124 EXPECT_TRUE(static_cast<views::View*>(view_)->OnMousePressed(mouse_down)); | 124 EXPECT_TRUE(static_cast<views::View*>(view_)->OnMousePressed(mouse_down)); |
125 | 125 |
126 // Ignore double clicks. | 126 // Ignore double clicks. |
127 mouse_down.SetClickCount(2); | 127 mouse_down.SetClickCount(2); |
128 EXPECT_FALSE(static_cast<views::View*>(view_)->OnMousePressed(mouse_down)); | 128 EXPECT_FALSE(static_cast<views::View*>(view_)->OnMousePressed(mouse_down)); |
129 } | 129 } |
130 | 130 |
131 } // namespace autofill | 131 } // namespace autofill |
OLD | NEW |