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/strings/string_util.h" | 5 #include "base/strings/string_util.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "chrome/test/base/chrome_render_view_test.h" | 7 #include "chrome/test/base/chrome_render_view_test.h" |
8 #include "components/autofill/content/common/autofill_messages.h" | 8 #include "components/autofill/content/common/autofill_messages.h" |
9 #include "components/autofill/content/renderer/autofill_agent.h" | 9 #include "components/autofill/content/renderer/autofill_agent.h" |
10 #include "components/autofill/content/renderer/form_autofill_util.h" | 10 #include "components/autofill/content/renderer/form_autofill_util.h" |
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 // interaction with the form. | 779 // interaction with the form. |
780 TEST_F(PasswordAutofillAgentTest, IframeNoFillTest) { | 780 TEST_F(PasswordAutofillAgentTest, IframeNoFillTest) { |
781 const char kIframeName[] = "iframe"; | 781 const char kIframeName[] = "iframe"; |
782 const char kWebpageWithIframeStart[] = | 782 const char kWebpageWithIframeStart[] = |
783 "<html>" | 783 "<html>" |
784 " <head>" | 784 " <head>" |
785 " <meta charset='utf-8' />" | 785 " <meta charset='utf-8' />" |
786 " <title>Title</title>" | 786 " <title>Title</title>" |
787 " </head>" | 787 " </head>" |
788 " <body>" | 788 " <body>" |
789 " <iframe id='iframe' src=\""; | 789 " <iframe name='iframe' src=\""; |
790 const char kWebpageWithIframeEnd[] = | 790 const char kWebpageWithIframeEnd[] = |
791 "\"></iframe>" | 791 "\"></iframe>" |
792 " </body>" | 792 " </body>" |
793 "</html>"; | 793 "</html>"; |
794 | 794 |
795 std::string origin("data:text/html;charset=utf-8,"); | 795 std::string origin("data:text/html;charset=utf-8,"); |
796 origin += kSimpleWebpage; | 796 origin += kSimpleWebpage; |
797 | 797 |
798 std::string page_html(kWebpageWithIframeStart); | 798 std::string page_html(kWebpageWithIframeStart); |
799 page_html += origin; | 799 page_html += origin; |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 &username_onchange_called)); | 1010 &username_onchange_called)); |
1011 EXPECT_EQ(1, username_onchange_called); | 1011 EXPECT_EQ(1, username_onchange_called); |
1012 ASSERT_TRUE( | 1012 ASSERT_TRUE( |
1013 ExecuteJavaScriptAndReturnIntValue( | 1013 ExecuteJavaScriptAndReturnIntValue( |
1014 ASCIIToUTF16("passwordOnchangeCalled ? 1 : 0"), | 1014 ASCIIToUTF16("passwordOnchangeCalled ? 1 : 0"), |
1015 &password_onchange_called)); | 1015 &password_onchange_called)); |
1016 EXPECT_EQ(1, password_onchange_called); | 1016 EXPECT_EQ(1, password_onchange_called); |
1017 } | 1017 } |
1018 | 1018 |
1019 } // namespace autofill | 1019 } // namespace autofill |
OLD | NEW |