| 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" | 5 #include "base/basictypes.h" |
| 6 #include "components/autofill/renderer/page_click_listener.h" | 6 #include "components/autofill/renderer/page_click_listener.h" |
| 7 #include "components/autofill/renderer/page_click_tracker.h" | 7 #include "components/autofill/renderer/page_click_tracker.h" |
| 8 #include "content/public/renderer/render_view.h" | 8 #include "content/public/renderer/render_view.h" |
| 9 #include "content/public/test/render_view_test.h" | 9 #include "content/public/test/render_view_test.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" | 11 #include "third_party/WebKit/public/platform/WebSize.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 15 #include "ui/base/keycodes/keyboard_codes.h" | 15 #include "ui/base/keycodes/keyboard_codes.h" |
| 16 | 16 |
| 17 namespace autofill { | 17 namespace autofill { |
| 18 | 18 |
| 19 class TestPageClickListener : public PageClickListener { | 19 class TestPageClickListener : public PageClickListener { |
| 20 public: | 20 public: |
| 21 TestPageClickListener() | 21 TestPageClickListener() |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 EXPECT_TRUE(test_listener_.input_element_lost_focus_called_); | 148 EXPECT_TRUE(test_listener_.input_element_lost_focus_called_); |
| 149 test_listener_.ClearResults(); | 149 test_listener_.ClearResults(); |
| 150 | 150 |
| 151 // Click on a text field while the button has focus and ensure no lost focus | 151 // Click on a text field while the button has focus and ensure no lost focus |
| 152 // notification is sent. | 152 // notification is sent. |
| 153 EXPECT_TRUE(SimulateElementClick("text_1")); | 153 EXPECT_TRUE(SimulateElementClick("text_1")); |
| 154 EXPECT_FALSE(test_listener_.input_element_lost_focus_called_); | 154 EXPECT_FALSE(test_listener_.input_element_lost_focus_called_); |
| 155 } | 155 } |
| 156 | 156 |
| 157 } // namespace autofill | 157 } // namespace autofill |
| OLD | NEW |