OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/basictypes.h" | |
6 #include "chrome/test/base/chrome_render_view_test.h" | 5 #include "chrome/test/base/chrome_render_view_test.h" |
7 #include "components/autofill/content/renderer/page_click_listener.h" | 6 #include "components/autofill/content/renderer/page_click_listener.h" |
8 #include "components/autofill/content/renderer/page_click_tracker.h" | 7 #include "components/autofill/content/renderer/page_click_tracker.h" |
9 #include "content/public/renderer/render_view.h" | 8 #include "content/public/renderer/render_view.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "third_party/WebKit/public/platform/WebFloatPoint.h" | 10 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
12 #include "third_party/WebKit/public/platform/WebSize.h" | 11 #include "third_party/WebKit/public/platform/WebSize.h" |
13 #include "third_party/WebKit/public/web/WebDocument.h" | 12 #include "third_party/WebKit/public/web/WebDocument.h" |
14 #include "third_party/WebKit/public/web/WebInputElement.h" | 13 #include "third_party/WebKit/public/web/WebInputElement.h" |
15 #include "third_party/WebKit/public/web/WebSettings.h" | 14 #include "third_party/WebKit/public/web/WebSettings.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 // Tap outside of element bounds, but tap width is overlapping the field. | 237 // Tap outside of element bounds, but tap width is overlapping the field. |
239 gfx::Rect element_bounds = GetElementBounds("text_1"); | 238 gfx::Rect element_bounds = GetElementBounds("text_1"); |
240 SimulateRectTap(element_bounds - | 239 SimulateRectTap(element_bounds - |
241 gfx::Vector2d(element_bounds.width() / 2 + 1, 0)); | 240 gfx::Vector2d(element_bounds.width() / 2 + 1, 0)); |
242 EXPECT_TRUE(test_listener_.form_control_element_clicked_called_); | 241 EXPECT_TRUE(test_listener_.form_control_element_clicked_called_); |
243 EXPECT_FALSE(test_listener_.was_focused_); | 242 EXPECT_FALSE(test_listener_.was_focused_); |
244 EXPECT_TRUE(text_ == test_listener_.form_control_element_clicked_); | 243 EXPECT_TRUE(text_ == test_listener_.form_control_element_clicked_); |
245 } | 244 } |
246 | 245 |
247 } // namespace autofill | 246 } // namespace autofill |
OLD | NEW |