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

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 6685077: Two sets of Autofill tests.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
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 "chrome/browser/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 4302 matching lines...) Expand 10 before | Expand all | Expand 10 after
4313 } 4313 }
4314 credit_cards.push_back(card); 4314 credit_cards.push_back(card);
4315 } 4315 }
4316 return credit_cards; 4316 return credit_cards;
4317 } 4317 }
4318 4318
4319 /* static */ 4319 /* static */
4320 std::map<AutofillFieldType, std::string> 4320 std::map<AutofillFieldType, std::string>
4321 TestingAutomationProvider::GetAutofillFieldToStringMap() { 4321 TestingAutomationProvider::GetAutofillFieldToStringMap() {
4322 std::map<AutofillFieldType, std::string> autofill_type_to_string; 4322 std::map<AutofillFieldType, std::string> autofill_type_to_string;
4323 // Strings ordered by order of fields when adding a profile in Autofill prefs.
4323 autofill_type_to_string[NAME_FIRST] = "NAME_FIRST"; 4324 autofill_type_to_string[NAME_FIRST] = "NAME_FIRST";
4324 autofill_type_to_string[NAME_MIDDLE] = "NAME_MIDDLE"; 4325 autofill_type_to_string[NAME_MIDDLE] = "NAME_MIDDLE";
4325 autofill_type_to_string[NAME_LAST] = "NAME_LAST"; 4326 autofill_type_to_string[NAME_LAST] = "NAME_LAST";
4326 autofill_type_to_string[COMPANY_NAME] = "COMPANY_NAME"; 4327 autofill_type_to_string[COMPANY_NAME] = "COMPANY_NAME";
4327 autofill_type_to_string[EMAIL_ADDRESS] = "EMAIL_ADDRESS"; 4328 autofill_type_to_string[EMAIL_ADDRESS] = "EMAIL_ADDRESS";
4328 autofill_type_to_string[ADDRESS_HOME_LINE1] = "ADDRESS_HOME_LINE1"; 4329 autofill_type_to_string[ADDRESS_HOME_LINE1] = "ADDRESS_HOME_LINE1";
4329 autofill_type_to_string[ADDRESS_HOME_LINE2] = "ADDRESS_HOME_LINE2"; 4330 autofill_type_to_string[ADDRESS_HOME_LINE2] = "ADDRESS_HOME_LINE2";
4330 autofill_type_to_string[ADDRESS_HOME_CITY] = "ADDRESS_HOME_CITY"; 4331 autofill_type_to_string[ADDRESS_HOME_CITY] = "ADDRESS_HOME_CITY";
4331 autofill_type_to_string[ADDRESS_HOME_STATE] = "ADDRESS_HOME_STATE"; 4332 autofill_type_to_string[ADDRESS_HOME_STATE] = "ADDRESS_HOME_STATE";
4332 autofill_type_to_string[ADDRESS_HOME_ZIP] = "ADDRESS_HOME_ZIP"; 4333 autofill_type_to_string[ADDRESS_HOME_ZIP] = "ADDRESS_HOME_ZIP";
4333 autofill_type_to_string[ADDRESS_HOME_COUNTRY] = "ADDRESS_HOME_COUNTRY"; 4334 autofill_type_to_string[ADDRESS_HOME_COUNTRY] = "ADDRESS_HOME_COUNTRY";
4335 autofill_type_to_string[PHONE_HOME_COUNTRY_CODE] =
4336 "PHONE_HOME_COUNTRY_CODE";
4337 autofill_type_to_string[PHONE_HOME_CITY_CODE] = "PHONE_HOME_CITY_CODE";
4334 autofill_type_to_string[PHONE_HOME_WHOLE_NUMBER] = 4338 autofill_type_to_string[PHONE_HOME_WHOLE_NUMBER] =
4335 "PHONE_HOME_WHOLE_NUMBER"; 4339 "PHONE_HOME_WHOLE_NUMBER";
4340 autofill_type_to_string[PHONE_FAX_COUNTRY_CODE] = "PHONE_FAX_COUNTRY_CODE";
4341 autofill_type_to_string[PHONE_FAX_CITY_CODE] = "PHONE_FAX_CITY_CODE";
4336 autofill_type_to_string[PHONE_FAX_WHOLE_NUMBER] = "PHONE_FAX_WHOLE_NUMBER"; 4342 autofill_type_to_string[PHONE_FAX_WHOLE_NUMBER] = "PHONE_FAX_WHOLE_NUMBER";
4337 autofill_type_to_string[NAME_FIRST] = "NAME_FIRST";
4338 return autofill_type_to_string; 4343 return autofill_type_to_string;
4339 } 4344 }
4340 4345
4341 /* static */ 4346 /* static */
4342 std::map<AutofillFieldType, std::string> 4347 std::map<AutofillFieldType, std::string>
4343 TestingAutomationProvider::GetCreditCardFieldToStringMap() { 4348 TestingAutomationProvider::GetCreditCardFieldToStringMap() {
4344 std::map<AutofillFieldType, std::string> credit_card_type_to_string; 4349 std::map<AutofillFieldType, std::string> credit_card_type_to_string;
4345 credit_card_type_to_string[CREDIT_CARD_NAME] = "CREDIT_CARD_NAME"; 4350 credit_card_type_to_string[CREDIT_CARD_NAME] = "CREDIT_CARD_NAME";
4346 credit_card_type_to_string[CREDIT_CARD_NUMBER] = "CREDIT_CARD_NUMBER"; 4351 credit_card_type_to_string[CREDIT_CARD_NUMBER] = "CREDIT_CARD_NUMBER";
4347 credit_card_type_to_string[CREDIT_CARD_EXP_MONTH] = "CREDIT_CARD_EXP_MONTH"; 4352 credit_card_type_to_string[CREDIT_CARD_EXP_MONTH] = "CREDIT_CARD_EXP_MONTH";
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
5205 // If you change this, update Observer for NotificationType::SESSION_END 5210 // If you change this, update Observer for NotificationType::SESSION_END
5206 // below. 5211 // below.
5207 MessageLoop::current()->PostTask(FROM_HERE, 5212 MessageLoop::current()->PostTask(FROM_HERE,
5208 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider)); 5213 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider));
5209 } 5214 }
5210 } 5215 }
5211 5216
5212 void TestingAutomationProvider::OnRemoveProvider() { 5217 void TestingAutomationProvider::OnRemoveProvider() {
5213 AutomationProviderList::GetInstance()->RemoveProvider(this); 5218 AutomationProviderList::GetInstance()->RemoveProvider(this);
5214 } 5219 }
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/autofill/form_phones.html » ('j') | chrome/test/functional/autofill.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698