summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakano.Naoki@gmail.com <Takano.Naoki@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-12 12:59:19 +0000
committerTakano.Naoki@gmail.com <Takano.Naoki@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-12 12:59:19 +0000
commitf18c9587f2e8de9e9e2e46ecbfba21158877b702 (patch)
tree9cf36be0922f1b1f44bcdfbcbe039be7872bb0ef
parent6ed940e38a5f0a6ccb31f171dbceac138917d692 (diff)
downloadchromium_src-f18c9587f2e8de9e9e2e46ecbfba21158877b702.zip
chromium_src-f18c9587f2e8de9e9e2e46ecbfba21158877b702.tar.gz
chromium_src-f18c9587f2e8de9e9e2e46ecbfba21158877b702.tar.bz2
Fix apellido from proral to singular in last name matching pattern.
Epson.com.mx's last name uses "apellido" in last name matching pattern. So I change it from proral to singular. BUG=76301 TEST=Run FormStructureBrowserTest.DataDrivenHeuristics20 Review URL: http://codereview.chromium.org/7334002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92157 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/autofill/autofill_resources.grd2
-rw-r--r--chrome/browser/autofill/form_structure_browsertest.cc8
-rw-r--r--chrome/test/data/autofill/heuristics/input/20_register_epson.com.mx.html42
-rw-r--r--chrome/test/data/autofill/heuristics/output/20_register_epson.com.mx.out9
4 files changed, 60 insertions, 1 deletions
diff --git a/chrome/browser/autofill/autofill_resources.grd b/chrome/browser/autofill/autofill_resources.grd
index 1013b61..220eada 100644
--- a/chrome/browser/autofill/autofill_resources.grd
+++ b/chrome/browser/autofill/autofill_resources.grd
@@ -103,7 +103,7 @@
middle.*name|mname|middle$<!-- es -->|apellido.?materno|lastlastname
</message>
<message name="IDS_AUTOFILL_LAST_NAME_RE">
- last.*name|lname|surname|last$|secondname<!-- de-DE -->|nachname<!-- es -->|apellidos<!-- fr-FR -->|famille|^nom<!-- it-IT -->|cognome<!-- ja-JP -->|姓<!-- pt-BR, pt-PT -->|morada|apelidos|surename|sobrenome<!-- ru -->|Фамилия<!-- ko-KR -->|성[^명]?
+ last.*name|lname|surname|last$|secondname<!-- de-DE -->|nachname<!-- es -->|apellido<!-- fr-FR -->|famille|^nom<!-- it-IT -->|cognome<!-- ja-JP -->|姓<!-- pt-BR, pt-PT -->|morada|apelidos|surename|sobrenome<!-- ru -->|Фамилия<!-- ko-KR -->|성[^명]?
</message>
<message name="IDS_AUTOFILL_PHONE_RE">
phone|mobile<!-- de-DE -->|telefonnummer<!-- es -->|telefono|teléfono<!-- fr-FR -->|telfixe<!-- ja-JP -->|電話<!-- pt-BR, pt-PT -->|telefone|telemovel<!-- ru -->|телефон<!-- zh-CN -->|电话<!-- ko-KR -->|(전화|핸드폰|휴대폰|휴대전화)(.?번호)?
diff --git a/chrome/browser/autofill/form_structure_browsertest.cc b/chrome/browser/autofill/form_structure_browsertest.cc
index a1e3d5c..c692cb4 100644
--- a/chrome/browser/autofill/form_structure_browsertest.cc
+++ b/chrome/browser/autofill/form_structure_browsertest.cc
@@ -214,3 +214,11 @@ IN_PROC_BROWSER_TEST_F(FormStructureBrowserTest,
GetOutputDirectory(kTestName),
kFileNamePattern);
}
+
+IN_PROC_BROWSER_TEST_F(FormStructureBrowserTest,
+ MAYBE_DataDrivenHeuristics(20)) {
+ const FilePath::CharType kFileNamePattern[] = FILE_PATH_LITERAL("20_*.html");
+ RunDataDrivenTest(GetInputDirectory(kTestName),
+ GetOutputDirectory(kTestName),
+ kFileNamePattern);
+}
diff --git a/chrome/test/data/autofill/heuristics/input/20_register_epson.com.mx.html b/chrome/test/data/autofill/heuristics/input/20_register_epson.com.mx.html
new file mode 100644
index 0000000..731ae52
--- /dev/null
+++ b/chrome/test/data/autofill/heuristics/input/20_register_epson.com.mx.html
@@ -0,0 +1,42 @@
+<form action="default.asp" id="formMain" method="post" name="formMain">
+ <!-- Form Location: http://www.epson.com.mx/dev/registroProducto/registroIngreso/ --><span style="display:none"><input class="inputBox" id="doAction" name="doAction" style="width:" value="" /></span><div class="containerTop">
+ <div class="bloque1">
+<ul>
+ <li class="header">n del producto
+ </li><li class="label" style="height:40px">
+<br /><select class="select" id="idPaiseReg" name="idPaiseReg" onchange="" style="width:;undefined" value="MX">
+<option value="AR">Argentina</option><option value="AW">Aruba</option><option value="BB">Barbados</option><option value="BO">Bolivia</option><option value="BR">Brasil</option><option value="CL">Chile</option><option value="CO">Colombia</option><option value="CR">Costa Rica</option><option value="AN">Curacao</option><option value="EC">Ecuador</option><option value="SV">El Salvador</option><option value="GT">Guatemala</option><option value="HN">Honduras</option><option value="JM">Jamaica</option><option selected="None" value="MX">xico</option><option value="NI">Nicaragua</option><option value="PA">Panam</option><option value="PY">Paraguay</option><option value="PE">Per</option><option value="DO">blica Dominicana</option><option value="TT">Trinidad y Tobago</option><option value="UY">Uruguay</option><option value="VE">Venezuela</option><option value="LA">Otros Paises</option></select></li><li class="label" style="height:55px">
+ <span class="requestLabel" style="color: #3069A2"> *<font color="#6E9BB0">dd/mm/yyyy</font></span><br /><input class="required inputBox" id="fechaCompra" name="fechaCompra" style="width:" value="" /></li><li class="label" style="height:40px">
+ <span class="requestLabel" style="color: #3069A2">Serial *</span><br /><input class="required inputBox" id="serialNumber" name="serialNumber" style="width:" value="" /><span style="display:none"><input class="required inputBox" id="idProducto" name="idProducto" style="width:" value="" /></span></li><li class="label" style="height:30px;">
+ <br /><a class="button thickbox" href="http://webtest.epson.cl/asp/NumeroSerie.asp?TB_iframe=true&amp;height=350&amp;width=450" id="linkProducto">Acerca del nro. de Serie</a></li><li class="lineSeparator">
+ <li class="buttons">
+<input class="button" id="verificaSerial" onclick="validateSerial();" style="cursor:hand" type="button" value="Validar Serial" /></li></li></ul></div><div class="messages">
+ <span id="productImage" style="float:left; width:100px;" /><span id="productName" /><span id="validateMsg" /><span id="monthsGaranty" /></div></div><br /><br /><div class="containerMain">
+ <div class="bloque2">
+<ul>
+ <li class="header">
+ 2. Soy un usuario registrado
+ </li><li class="label">
+ <span class="requestLabel" style="color: #3069A2">Email *</span><br /><input class="required inputBox" id="emailIzq" name="emailLogin" style="width:" value="" /></li><li class="label">
+<span class="requestLabel" style="color: #3069A2">a *</span><br /><input class="required inputBox" id="passIzq" name="passLogin" type="password" value="" /><input style="display:none" type="submit" /></li><li class="label">
+<a href="/asp/envioPassword.asp?email="><u>a</u></a><br /><br /><br /></li><li class="lineSeparator">
+ <li class="buttons">
+<input class="button" id="inputDerecho" onclick="doLoginUserNewProduct()" style="cursor:hand" type="button" value="Registrar Producto" /></li></li></ul></div><div class="bloque3">
+<table border="0" cellpadding="0" cellspacing="0">
+<tr>
+ <td valign="top">
+<ul>
+ <li class="header">
+ Soy un usuario nuevo
+ </li><li class="label">
+ <span class="requestLabel" style="color: #3069A2">Nombre *</span><br /><input class="required inputBox" id="nombre" name="nombre" style="width:" value="" /></li><li class="label">
+ <span class="requestLabel" style="color: #3069A2">Apellido *</span><br /><input class="required inputBox" id="apellido" name="apellido" style="width:" value="" /></li><li class="label">
+ <span class="requestLabel" style="color: #3069A2">Email *</span><br /><input class="required inputBox" id="emailDer" name="emailRegistro" style="width:" value="" /></li></ul></td><td bgcolor="#F7FBFF" valign="top">
+<ul>
+ <li class="header" /><li class="label">
+<span class="requestLabel" style="color: #3069A2">a *</span><br /><input class="required inputBox" id="passDer" name="passRegistro" type="password" value="" /><input style="display:none" type="submit" /></li><li class="label">
+<span class="requestLabel" style="color: #3069A2">a *</span><br /><input class="required inputBox" id="rePassDer" name="rePassRegistro" type="password" value="" /><input style="display:none" type="submit" /></li></ul></td></tr><tr>
+ <td align="right" colspan="2" style="border-top:1px solid #003399;" valign="top">
+<ul>
+ <li class="buttons">
+<input class="button" id="inputIzquierdo" onclick="" style="cursor:hand" type="button" value="Registrar Producto" /></li></ul></td></tr></table></div></div></form> \ No newline at end of file
diff --git a/chrome/test/data/autofill/heuristics/output/20_register_epson.com.mx.out b/chrome/test/data/autofill/heuristics/output/20_register_epson.com.mx.out
new file mode 100644
index 0000000..f38174e
--- /dev/null
+++ b/chrome/test/data/autofill/heuristics/output/20_register_epson.com.mx.out
@@ -0,0 +1,9 @@
+UNKNOWN_TYPE
+UNKNOWN_TYPE
+UNKNOWN_TYPE
+UNKNOWN_TYPE
+UNKNOWN_TYPE
+EMAIL_ADDRESS
+NAME_FIRST
+NAME_LAST
+EMAIL_ADDRESS