| 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 "core/dom/Document.h" | 5 #include "core/dom/Document.h" |
| 6 #include "core/dom/Element.h" | 6 #include "core/dom/Element.h" |
| 7 #include "core/dom/Node.h" | 7 #include "core/dom/Node.h" |
| 8 #include "core/html/HTMLElement.h" | 8 #include "core/html/HTMLElement.h" |
| 9 #include "platform/testing/URLTestHelpers.h" | 9 #include "platform/testing/URLTestHelpers.h" |
| 10 #include "platform/testing/UnitTestHelpers.h" | 10 #include "platform/testing/UnitTestHelpers.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 using blink::URLTestHelpers::registerMockedURLFromBaseURL; | 21 using blink::URLTestHelpers::registerMockedURLFromBaseURL; |
| 22 | 22 |
| 23 namespace blink { | 23 namespace blink { |
| 24 | 24 |
| 25 class ImeRequestTrackingWebViewClient | 25 class ImeRequestTrackingWebViewClient |
| 26 : public FrameTestHelpers::TestWebViewClient { | 26 : public FrameTestHelpers::TestWebViewClient { |
| 27 public: | 27 public: |
| 28 ImeRequestTrackingWebViewClient() : m_virtualKeyboardRequestCount(0) {} | 28 ImeRequestTrackingWebViewClient() : m_virtualKeyboardRequestCount(0) {} |
| 29 | 29 |
| 30 // WebWidgetClient methods | 30 // WebWidgetClient methods |
| 31 void showVirtualKeyboard() override { ++m_virtualKeyboardRequestCount; } | 31 void showVirtualKeyboardOnElementFocus() override { |
| 32 ++m_virtualKeyboardRequestCount; |
| 33 } |
| 32 | 34 |
| 33 // Local methds | 35 // Local methds |
| 34 void reset() { m_virtualKeyboardRequestCount = 0; } | 36 void reset() { m_virtualKeyboardRequestCount = 0; } |
| 35 | 37 |
| 36 int virtualKeyboardRequestCount() { return m_virtualKeyboardRequestCount; } | 38 int virtualKeyboardRequestCount() { return m_virtualKeyboardRequestCount; } |
| 37 | 39 |
| 38 private: | 40 private: |
| 39 int m_virtualKeyboardRequestCount; | 41 int m_virtualKeyboardRequestCount; |
| 40 }; | 42 }; |
| 41 | 43 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 runImeOnFocusTest("ime-on-focus-after-navigation-within-page.html", 1, | 143 runImeOnFocusTest("ime-on-focus-after-navigation-within-page.html", 1, |
| 142 IntPoint(50, 50), "input"); | 144 IntPoint(50, 50), "input"); |
| 143 } | 145 } |
| 144 | 146 |
| 145 TEST_F(ImeOnFocusTest, AfterFrameLoadOnGesture) { | 147 TEST_F(ImeOnFocusTest, AfterFrameLoadOnGesture) { |
| 146 runImeOnFocusTest("ime-on-focus-after-frame-load-on-gesture.html", 1, | 148 runImeOnFocusTest("ime-on-focus-after-frame-load-on-gesture.html", 1, |
| 147 IntPoint(50, 50), "input", "frame.html"); | 149 IntPoint(50, 50), "input", "frame.html"); |
| 148 } | 150 } |
| 149 | 151 |
| 150 } // namespace blink | 152 } // namespace blink |
| OLD | NEW |