| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/optional.h" | 5 #include "base/optional.h" |
| 6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
| 7 #include "components/autofill/content/common/autofill_driver.mojom.h" | 7 #include "components/autofill/content/common/autofill_driver.mojom.h" |
| 8 #include "components/autofill/content/renderer/renderer_save_password_progress_l
ogger.h" | 8 #include "components/autofill/content/renderer/renderer_save_password_progress_l
ogger.h" |
| 9 #include "mojo/public/cpp/bindings/binding.h" | 9 #include "mojo/public/cpp/bindings/binding.h" |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 void ShowPasswordSuggestions(int key, | 58 void ShowPasswordSuggestions(int key, |
| 59 base::i18n::TextDirection text_direction, | 59 base::i18n::TextDirection text_direction, |
| 60 const base::string16& typed_username, | 60 const base::string16& typed_username, |
| 61 int options, | 61 int options, |
| 62 const gfx::RectF& bounds) override {} | 62 const gfx::RectF& bounds) override {} |
| 63 | 63 |
| 64 void ShowNotSecureWarning(base::i18n::TextDirection text_direction, | 64 void ShowNotSecureWarning(base::i18n::TextDirection text_direction, |
| 65 const gfx::RectF& bounds) override {} | 65 const gfx::RectF& bounds) override {} |
| 66 | 66 |
| 67 void PasswordAutofillAgentConstructed() override {} | |
| 68 | |
| 69 void RecordSavePasswordProgress(const std::string& log) override { | 67 void RecordSavePasswordProgress(const std::string& log) override { |
| 70 called_record_save_ = true; | 68 called_record_save_ = true; |
| 71 log_ = log; | 69 log_ = log; |
| 72 } | 70 } |
| 73 | 71 |
| 74 void SaveGenerationFieldDetectedByClassifier( | 72 void SaveGenerationFieldDetectedByClassifier( |
| 75 const autofill::PasswordForm& password_form, | 73 const autofill::PasswordForm& password_form, |
| 76 const base::string16& generation_field) override {} | 74 const base::string16& generation_field) override {} |
| 77 | 75 |
| 78 // Records whether RecordSavePasswordProgress() gets called. | 76 // Records whether RecordSavePasswordProgress() gets called. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 101 TestLogger logger(driver_ptr.get()); | 99 TestLogger logger(driver_ptr.get()); |
| 102 logger.SendLog(kTestText); | 100 logger.SendLog(kTestText); |
| 103 | 101 |
| 104 base::RunLoop().RunUntilIdle(); | 102 base::RunLoop().RunUntilIdle(); |
| 105 std::string sent_log; | 103 std::string sent_log; |
| 106 EXPECT_TRUE(fake_driver.GetLogMessage(&sent_log)); | 104 EXPECT_TRUE(fake_driver.GetLogMessage(&sent_log)); |
| 107 EXPECT_EQ(kTestText, sent_log); | 105 EXPECT_EQ(kTestText, sent_log); |
| 108 } | 106 } |
| 109 | 107 |
| 110 } // namespace autofill | 108 } // namespace autofill |
| OLD | NEW |