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 "components/autofill/content/renderer/renderer_save_password_progress_l
ogger.h" |
| 6 |
| 7 #include "base/message_loop/message_loop.h" |
5 #include "base/optional.h" | 8 #include "base/optional.h" |
6 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
7 #include "components/autofill/content/common/autofill_driver.mojom.h" | 10 #include "components/autofill/content/common/autofill_driver.mojom.h" |
8 #include "components/autofill/content/renderer/renderer_save_password_progress_l
ogger.h" | |
9 #include "mojo/public/cpp/bindings/binding.h" | 11 #include "mojo/public/cpp/bindings/binding.h" |
10 | |
11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
12 | 13 |
13 namespace autofill { | 14 namespace autofill { |
14 | 15 |
15 namespace { | 16 namespace { |
16 | 17 |
17 const char kTestText[] = "test"; | 18 const char kTestText[] = "test"; |
18 | 19 |
19 class FakeContentPasswordManagerDriver : public mojom::PasswordManagerDriver { | 20 class FakeContentPasswordManagerDriver : public mojom::PasswordManagerDriver { |
20 public: | 21 public: |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 TestLogger logger(driver_ptr.get()); | 103 TestLogger logger(driver_ptr.get()); |
103 logger.SendLog(kTestText); | 104 logger.SendLog(kTestText); |
104 | 105 |
105 base::RunLoop().RunUntilIdle(); | 106 base::RunLoop().RunUntilIdle(); |
106 std::string sent_log; | 107 std::string sent_log; |
107 EXPECT_TRUE(fake_driver.GetLogMessage(&sent_log)); | 108 EXPECT_TRUE(fake_driver.GetLogMessage(&sent_log)); |
108 EXPECT_EQ(kTestText, sent_log); | 109 EXPECT_EQ(kTestText, sent_log); |
109 } | 110 } |
110 | 111 |
111 } // namespace autofill | 112 } // namespace autofill |
OLD | NEW |