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/time.h" | 5 #include "base/time.h" |
6 #include "chrome/test/base/chrome_render_view_test.h" | 6 #include "chrome/test/base/chrome_render_view_test.h" |
7 #include "components/autofill/common/autofill_messages.h" | 7 #include "components/autofill/core/common/autofill_messages.h" |
8 #include "components/autofill/common/form_data.h" | 8 #include "components/autofill/core/common/form_data.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "third_party/WebKit/public/platform/WebString.h" |
| 11 #include "third_party/WebKit/public/platform/WebURLError.h" |
10 #include "third_party/WebKit/public/web/WebDocument.h" | 12 #include "third_party/WebKit/public/web/WebDocument.h" |
11 #include "third_party/WebKit/public/web/WebFormElement.h" | 13 #include "third_party/WebKit/public/web/WebFormElement.h" |
12 #include "third_party/WebKit/public/platform/WebString.h" | |
13 #include "third_party/WebKit/public/platform/WebURLError.h" | |
14 | 14 |
15 using WebKit::WebFrame; | 15 using WebKit::WebFrame; |
16 using WebKit::WebString; | 16 using WebKit::WebString; |
17 using WebKit::WebURLError; | 17 using WebKit::WebURLError; |
18 | 18 |
19 typedef ChromeRenderViewTest FormAutocompleteTest; | 19 typedef ChromeRenderViewTest FormAutocompleteTest; |
20 | 20 |
21 namespace autofill { | 21 namespace autofill { |
22 | 22 |
23 // Tests that submitting a form generates a FormSubmitted message | 23 // Tests that submitting a form generates a FormSubmitted message |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // Submit the form. | 116 // Submit the form. |
117 ExecuteJavaScript("document.getElementById('myForm').submit();"); | 117 ExecuteJavaScript("document.getElementById('myForm').submit();"); |
118 ProcessPendingMessages(); | 118 ProcessPendingMessages(); |
119 | 119 |
120 // No FormSubmitted message should have been sent. | 120 // No FormSubmitted message should have been sent. |
121 EXPECT_FALSE(render_thread_->sink().GetFirstMessageMatching( | 121 EXPECT_FALSE(render_thread_->sink().GetFirstMessageMatching( |
122 AutofillHostMsg_FormSubmitted::ID)); | 122 AutofillHostMsg_FormSubmitted::ID)); |
123 } | 123 } |
124 | 124 |
125 } // namespace autofill | 125 } // namespace autofill |
OLD | NEW |