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

Side by Side Diff: components/autofill/browser/autofill_download_unittest.cc

Issue 13973004: Convert string16 -> base::string16 in components/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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) 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 <list> 5 #include <list>
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/test/test_timeouts.h" 9 #include "base/test/test_timeouts.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 field.label = ASCIIToUTF16("email2"); 167 field.label = ASCIIToUTF16("email2");
168 field.name = ASCIIToUTF16("email2"); 168 field.name = ASCIIToUTF16("email2");
169 field.form_control_type = "text"; 169 field.form_control_type = "text";
170 form.fields.push_back(field); 170 form.fields.push_back(field);
171 171
172 field.label = ASCIIToUTF16("password"); 172 field.label = ASCIIToUTF16("password");
173 field.name = ASCIIToUTF16("password"); 173 field.name = ASCIIToUTF16("password");
174 field.form_control_type = "password"; 174 field.form_control_type = "password";
175 form.fields.push_back(field); 175 form.fields.push_back(field);
176 176
177 field.label = string16(); 177 field.label = base::string16();
178 field.name = ASCIIToUTF16("Submit"); 178 field.name = ASCIIToUTF16("Submit");
179 field.form_control_type = "submit"; 179 field.form_control_type = "submit";
180 form.fields.push_back(field); 180 form.fields.push_back(field);
181 181
182 FormStructure *form_structure = new FormStructure(form, std::string()); 182 FormStructure *form_structure = new FormStructure(form, std::string());
183 ScopedVector<FormStructure> form_structures; 183 ScopedVector<FormStructure> form_structures;
184 form_structures.push_back(form_structure); 184 form_structures.push_back(form_structure);
185 185
186 form.fields.clear(); 186 form.fields.clear();
187 187
188 field.label = ASCIIToUTF16("address"); 188 field.label = ASCIIToUTF16("address");
189 field.name = ASCIIToUTF16("address"); 189 field.name = ASCIIToUTF16("address");
190 field.form_control_type = "text"; 190 field.form_control_type = "text";
191 form.fields.push_back(field); 191 form.fields.push_back(field);
192 192
193 field.label = ASCIIToUTF16("address2"); 193 field.label = ASCIIToUTF16("address2");
194 field.name = ASCIIToUTF16("address2"); 194 field.name = ASCIIToUTF16("address2");
195 field.form_control_type = "text"; 195 field.form_control_type = "text";
196 form.fields.push_back(field); 196 form.fields.push_back(field);
197 197
198 field.label = ASCIIToUTF16("city"); 198 field.label = ASCIIToUTF16("city");
199 field.name = ASCIIToUTF16("city"); 199 field.name = ASCIIToUTF16("city");
200 field.form_control_type = "text"; 200 field.form_control_type = "text";
201 form.fields.push_back(field); 201 form.fields.push_back(field);
202 202
203 field.label = string16(); 203 field.label = base::string16();
204 field.name = ASCIIToUTF16("Submit"); 204 field.name = ASCIIToUTF16("Submit");
205 field.form_control_type = "submit"; 205 field.form_control_type = "submit";
206 form.fields.push_back(field); 206 form.fields.push_back(field);
207 207
208 form_structure = new FormStructure(form, std::string()); 208 form_structure = new FormStructure(form, std::string());
209 form_structures.push_back(form_structure); 209 form_structures.push_back(form_structure);
210 210
211 // Request with id 0. 211 // Request with id 0.
212 MockAutofillMetrics mock_metric_logger; 212 MockAutofillMetrics mock_metric_logger;
213 EXPECT_CALL(mock_metric_logger, 213 EXPECT_CALL(mock_metric_logger,
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 mock_metric_logger)); 496 mock_metric_logger));
497 // No responses yet 497 // No responses yet
498 EXPECT_EQ(static_cast<size_t>(0), responses_.size()); 498 EXPECT_EQ(static_cast<size_t>(0), responses_.size());
499 499
500 fetcher = factory.GetFetcherByID(3); 500 fetcher = factory.GetFetcherByID(3);
501 ASSERT_TRUE(fetcher); 501 ASSERT_TRUE(fetcher);
502 FakeOnURLFetchComplete(fetcher, 200, std::string(responses[0])); 502 FakeOnURLFetchComplete(fetcher, 200, std::string(responses[0]));
503 ASSERT_EQ(static_cast<size_t>(1), responses_.size()); 503 ASSERT_EQ(static_cast<size_t>(1), responses_.size());
504 EXPECT_EQ(responses[0], responses_.front().response); 504 EXPECT_EQ(responses[0], responses_.front().response);
505 } 505 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698