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

Side by Side Diff: components/autofill/core/browser/personal_data_manager_unittest.cc

Issue 2132593002: Remove remaining calls to deprecated MessageLoop methods on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: h264_vt_encoder_unittest.cc Created 4 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/autofill/core/browser/personal_data_manager.h" 5 #include "components/autofill/core/browser/personal_data_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 FormStructure form_structure(form); 331 FormStructure form_structure(form);
332 form_structure.DetermineHeuristicTypes(); 332 form_structure.DetermineHeuristicTypes();
333 std::unique_ptr<CreditCard> imported_credit_card; 333 std::unique_ptr<CreditCard> imported_credit_card;
334 EXPECT_TRUE(ImportCreditCard(form_structure, false, &imported_credit_card)); 334 EXPECT_TRUE(ImportCreditCard(form_structure, false, &imported_credit_card));
335 ASSERT_TRUE(imported_credit_card); 335 ASSERT_TRUE(imported_credit_card);
336 personal_data_->SaveImportedCreditCard(*imported_credit_card); 336 personal_data_->SaveImportedCreditCard(*imported_credit_card);
337 337
338 // Verify that the web database has been updated and the notification sent. 338 // Verify that the web database has been updated and the notification sent.
339 EXPECT_CALL(personal_data_observer_, OnPersonalDataChanged()) 339 EXPECT_CALL(personal_data_observer_, OnPersonalDataChanged())
340 .WillOnce(QuitMainMessageLoop()); 340 .WillOnce(QuitMainMessageLoop());
341 base::MessageLoop::current()->Run(); 341 base::RunLoop().Run();
342 342
343 CreditCard expected(base::GenerateGUID(), "https://www.example.com"); 343 CreditCard expected(base::GenerateGUID(), "https://www.example.com");
344 test::SetCreditCardInfo(&expected, exp_name, exp_cc_num, exp_cc_month, 344 test::SetCreditCardInfo(&expected, exp_name, exp_cc_num, exp_cc_month,
345 exp_cc_year); 345 exp_cc_year);
346 const std::vector<CreditCard*>& results = personal_data_->GetCreditCards(); 346 const std::vector<CreditCard*>& results = personal_data_->GetCreditCards();
347 ASSERT_EQ(1U, results.size()); 347 ASSERT_EQ(1U, results.size());
348 EXPECT_EQ(0, expected.Compare(*results[0])); 348 EXPECT_EQ(0, expected.Compare(*results[0]));
349 } 349 }
350 350
351 // The temporary directory should be deleted at the end to ensure that 351 // The temporary directory should be deleted at the end to ensure that
(...skipping 4864 matching lines...) Expand 10 before | Expand all | Expand 10 after
5216 EnableAutofillProfileCleanup(); 5216 EnableAutofillProfileCleanup();
5217 5217
5218 // The deduping routine should not be run. 5218 // The deduping routine should not be run.
5219 EXPECT_FALSE(personal_data_->ApplyDedupingRoutine()); 5219 EXPECT_FALSE(personal_data_->ApplyDedupingRoutine());
5220 5220
5221 // The two duplicate profiles should still be present. 5221 // The two duplicate profiles should still be present.
5222 EXPECT_EQ(2U, personal_data_->GetProfiles().size()); 5222 EXPECT_EQ(2U, personal_data_->GetProfiles().size());
5223 } 5223 }
5224 5224
5225 } // namespace autofill 5225 } // namespace autofill
OLDNEW
« no previous file with comments | « chromecast/base/component/component_unittest.cc ('k') | components/scheduler/base/task_queue_manager_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698