Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Side by Side Diff: chrome/renderer/autofill/password_generation_manager_browsertest.cc

Issue 23742004: Move PasswordForm from //content to //autofill. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_password_form_conversion_utils
Patch Set: Rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <string.h> 5 #include <string.h>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/test/base/chrome_render_view_test.h" 10 #include "chrome/test/base/chrome_render_view_test.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 input_element->decorationElementFor(generation_manager_.get()); 90 input_element->decorationElementFor(generation_manager_.get());
91 return decoration.hasNonEmptyBoundingBox(); 91 return decoration.hasNonEmptyBoundingBox();
92 } 92 }
93 93
94 void SetPasswordGenerationEnabledMessage(void) { 94 void SetPasswordGenerationEnabledMessage(void) {
95 AutofillMsg_PasswordGenerationEnabled msg(0, true); 95 AutofillMsg_PasswordGenerationEnabled msg(0, true);
96 generation_manager_->OnMessageReceived(msg); 96 generation_manager_->OnMessageReceived(msg);
97 } 97 }
98 98
99 void SetNotBlacklistedMessage(const char* form_str) { 99 void SetNotBlacklistedMessage(const char* form_str) {
100 content::PasswordForm form; 100 autofill::PasswordForm form;
101 form.origin = 101 form.origin =
102 GURL(base::StringPrintf("data:text/html;charset=utf-8,%s", form_str)); 102 GURL(base::StringPrintf("data:text/html;charset=utf-8,%s", form_str));
103 AutofillMsg_FormNotBlacklisted msg(0, form); 103 AutofillMsg_FormNotBlacklisted msg(0, form);
104 generation_manager_->OnMessageReceived(msg); 104 generation_manager_->OnMessageReceived(msg);
105 } 105 }
106 106
107 void SetAccountCreationFormsDetectedMessage(const char* form_str) { 107 void SetAccountCreationFormsDetectedMessage(const char* form_str) {
108 autofill::FormData form; 108 autofill::FormData form;
109 form.origin = 109 form.origin =
110 GURL(base::StringPrintf("data:text/html;charset=utf-8,%s", form_str)); 110 GURL(base::StringPrintf("data:text/html;charset=utf-8,%s", form_str));
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 286
287 // Receive the account creation forms detected message. Show password 287 // Receive the account creation forms detected message. Show password
288 // generation icon. 288 // generation icon.
289 LoadHTML(kAccountCreationFormHTML); 289 LoadHTML(kAccountCreationFormHTML);
290 SetNotBlacklistedMessage(kAccountCreationFormHTML); 290 SetNotBlacklistedMessage(kAccountCreationFormHTML);
291 SetAccountCreationFormsDetectedMessage(kAccountCreationFormHTML); 291 SetAccountCreationFormsDetectedMessage(kAccountCreationFormHTML);
292 ExpectPasswordGenerationIconShown("first_password", true); 292 ExpectPasswordGenerationIconShown("first_password", true);
293 } 293 }
294 294
295 } // namespace autofill 295 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/renderer/autofill/password_autofill_agent_browsertest.cc ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698