OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/test/base/chrome_render_view_test.h" | 8 #include "chrome/test/base/chrome_render_view_test.h" |
9 #include "components/autofill/content/common/autofill_messages.h" | 9 #include "components/autofill/content/common/autofill_messages.h" |
10 #include "components/autofill/content/renderer/autofill_agent.h" | 10 #include "components/autofill/content/renderer/autofill_agent.h" |
| 11 #include "components/autofill/content/renderer/test_autofill_agent.h" |
11 #include "components/autofill/core/common/form_data.h" | 12 #include "components/autofill/core/common/form_data.h" |
12 #include "components/autofill/core/common/form_field_data.h" | 13 #include "components/autofill/core/common/form_field_data.h" |
13 #include "content/public/common/content_switches.h" | 14 #include "content/public/common/content_switches.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "third_party/WebKit/public/platform/WebString.h" | 16 #include "third_party/WebKit/public/platform/WebString.h" |
16 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 17 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
17 #include "third_party/WebKit/public/platform/WebVector.h" | 18 #include "third_party/WebKit/public/platform/WebVector.h" |
18 #include "third_party/WebKit/public/web/WebDocument.h" | 19 #include "third_party/WebKit/public/web/WebDocument.h" |
19 #include "third_party/WebKit/public/web/WebFormElement.h" | 20 #include "third_party/WebKit/public/web/WebFormElement.h" |
20 #include "third_party/WebKit/public/web/WebInputElement.h" | 21 #include "third_party/WebKit/public/web/WebInputElement.h" |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 } | 355 } |
355 | 356 |
356 TEST_F(RequestAutocompleteRendererTest, InvokingTwiceOnlyShowsOnce) { | 357 TEST_F(RequestAutocompleteRendererTest, InvokingTwiceOnlyShowsOnce) { |
357 // Attempting to show the requestAutocomplete dialog again should be ignored. | 358 // Attempting to show the requestAutocomplete dialog again should be ignored. |
358 autofill_agent_->didRequestAutocomplete(invoking_form()); | 359 autofill_agent_->didRequestAutocomplete(invoking_form()); |
359 EXPECT_FALSE(render_thread_->sink().GetFirstMessageMatching( | 360 EXPECT_FALSE(render_thread_->sink().GetFirstMessageMatching( |
360 AutofillHostMsg_RequestAutocomplete::ID)); | 361 AutofillHostMsg_RequestAutocomplete::ID)); |
361 } | 362 } |
362 | 363 |
363 } // namespace autofill | 364 } // namespace autofill |
OLD | NEW |