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

Unified Diff: chrome/browser/autofill/form_structure_unittest.cc

Issue 3226001: Detecting form locale (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Unit test for top websites Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autofill/form_structure.cc ('k') | chrome/browser/tab_contents/language_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/form_structure_unittest.cc
diff --git a/chrome/browser/autofill/form_structure_unittest.cc b/chrome/browser/autofill/form_structure_unittest.cc
index 0eea0a6e6f858b0379bbcdca3185505f88ff7af8..30ebf9cca88d537da311ab77c4e91c44f5a80d57 100644
--- a/chrome/browser/autofill/form_structure_unittest.cc
+++ b/chrome/browser/autofill/form_structure_unittest.cc
@@ -90,13 +90,20 @@ TEST(FormStructureTest, AutoFillCount) {
EXPECT_EQ(1U, form_structure.autofill_count());
}
-TEST(FormStructureTest, SourceURL) {
+TEST(FormStructureTest, Accessors) {
FormData form;
form.origin = GURL("http://www.foo.com/");
+ form.action = GURL("http://www.bar.com/");
+ form.locale = "en-GB";
form.method = ASCIIToUTF16("post");
FormStructure form_structure(form);
EXPECT_EQ(form.origin, form_structure.source_url());
+ EXPECT_EQ(form.action, form_structure.target_url());
+ EXPECT_EQ(form.locale, form_structure.locale());
+
+ form_structure.set_locale("fr-CA");
+ EXPECT_EQ("fr-CA", form_structure.locale());
}
TEST(FormStructureTest, HasAutoFillableValues) {
« no previous file with comments | « chrome/browser/autofill/form_structure.cc ('k') | chrome/browser/tab_contents/language_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698