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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
8 #include "core/dom/Element.h" | 8 #include "core/dom/Element.h" |
9 #include "core/dom/Node.h" | 9 #include "core/dom/Node.h" |
10 #include "core/html/HTMLElement.h" | 10 #include "core/html/HTMLElement.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 } | 64 } |
65 | 65 |
66 protected: | 66 protected: |
67 void sendGestureTap(WebView*, IntPoint); | 67 void sendGestureTap(WebView*, IntPoint); |
68 void focus(const AtomicString& element); | 68 void focus(const AtomicString& element); |
69 void runImeOnFocusTest(std::string fileName, int, IntPoint tapPoint = IntPoi nt(-1, -1), const AtomicString& focusElement = nullAtom, std::string frame = "") ; | 69 void runImeOnFocusTest(std::string fileName, int, IntPoint tapPoint = IntPoi nt(-1, -1), const AtomicString& focusElement = nullAtom, std::string frame = "") ; |
70 | 70 |
71 std::string m_baseURL; | 71 std::string m_baseURL; |
72 FrameTestHelpers::WebViewHelper m_webViewHelper; | 72 FrameTestHelpers::WebViewHelper m_webViewHelper; |
73 RefPtrWillBePersistent<Document> m_document; | 73 RefPtrWillBePersistent<Document> m_document; |
74 FrameTestHelpers::UseMockScrollbarSettings m_mockScrollbarSettings; | |
chrishtr
2015/10/28 21:12:58
What are all these scrollbar settings diffs?
Xianzhu
2015/10/29 04:22:01
This is to let the tests paint scrollbars using th
chrishtr
2015/10/29 20:22:46
I see. You should tell schenney@ about that since
| |
74 }; | 75 }; |
75 | 76 |
76 void ImeOnFocusTest::sendGestureTap(WebView* webView, IntPoint clientPoint) | 77 void ImeOnFocusTest::sendGestureTap(WebView* webView, IntPoint clientPoint) |
77 { | 78 { |
78 WebGestureEvent webGestureEvent; | 79 WebGestureEvent webGestureEvent; |
79 webGestureEvent.type = WebInputEvent::GestureTap; | 80 webGestureEvent.type = WebInputEvent::GestureTap; |
80 // GestureTap is only ever from touch screens. | 81 // GestureTap is only ever from touch screens. |
81 webGestureEvent.sourceDevice = WebGestureDeviceTouchscreen; | 82 webGestureEvent.sourceDevice = WebGestureDeviceTouchscreen; |
82 webGestureEvent.x = clientPoint.x(); | 83 webGestureEvent.x = clientPoint.x(); |
83 webGestureEvent.y = clientPoint.y(); | 84 webGestureEvent.y = clientPoint.y(); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
149 { | 150 { |
150 runImeOnFocusTest("ime-on-focus-after-navigation-within-page.html", 1, IntPo int(50, 50), "input"); | 151 runImeOnFocusTest("ime-on-focus-after-navigation-within-page.html", 1, IntPo int(50, 50), "input"); |
151 } | 152 } |
152 | 153 |
153 TEST_F(ImeOnFocusTest, AfterFrameLoadOnGesture) | 154 TEST_F(ImeOnFocusTest, AfterFrameLoadOnGesture) |
154 { | 155 { |
155 runImeOnFocusTest("ime-on-focus-after-frame-load-on-gesture.html", 1, IntPoi nt(50, 50), "input", "frame.html"); | 156 runImeOnFocusTest("ime-on-focus-after-frame-load-on-gesture.html", 1, IntPoi nt(50, 50), "input", "frame.html"); |
156 } | 157 } |
157 | 158 |
158 } // namespace blink | 159 } // namespace blink |
OLD | NEW |