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/browser/content_autofill_driver.h" | 5 #include "components/autofill/content/browser/content_autofill_driver.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
| 11 #include <tuple> |
11 #include <utility> | 12 #include <utility> |
12 #include <vector> | 13 #include <vector> |
13 | 14 |
14 #include "base/command_line.h" | 15 #include "base/command_line.h" |
15 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
16 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
17 #include "components/autofill/core/browser/autofill_external_delegate.h" | 18 #include "components/autofill/core/browser/autofill_external_delegate.h" |
18 #include "components/autofill/core/browser/autofill_manager.h" | 19 #include "components/autofill/core/browser/autofill_manager.h" |
19 #include "components/autofill/core/browser/autofill_test_utils.h" | 20 #include "components/autofill/core/browser/autofill_test_utils.h" |
20 #include "components/autofill/core/browser/test_autofill_client.h" | 21 #include "components/autofill/core/browser/test_autofill_client.h" |
21 #include "components/autofill/core/common/autofill_switches.h" | 22 #include "components/autofill/core/common/autofill_switches.h" |
22 #include "components/autofill/core/common/form_data_predictions.h" | 23 #include "components/autofill/core/common/form_data_predictions.h" |
23 #include "content/public/browser/browser_context.h" | 24 #include "content/public/browser/browser_context.h" |
24 #include "content/public/browser/navigation_details.h" | 25 #include "content/public/browser/navigation_details.h" |
25 #include "content/public/browser/storage_partition.h" | 26 #include "content/public/browser/storage_partition.h" |
26 #include "content/public/browser/web_contents.h" | 27 #include "content/public/browser/web_contents.h" |
27 #include "content/public/common/frame_navigate_params.h" | 28 #include "content/public/common/frame_navigate_params.h" |
| 29 #include "content/public/test/mock_render_process_host.h" |
28 #include "content/public/test/test_renderer_host.h" | 30 #include "content/public/test/test_renderer_host.h" |
29 #include "mojo/public/cpp/bindings/binding_set.h" | 31 #include "mojo/public/cpp/bindings/binding_set.h" |
30 #include "services/shell/public/cpp/interface_provider.h" | 32 #include "services/shell/public/cpp/interface_provider.h" |
31 #include "testing/gmock/include/gmock/gmock.h" | 33 #include "testing/gmock/include/gmock/gmock.h" |
32 #include "testing/gtest/include/gtest/gtest.h" | 34 #include "testing/gtest/include/gtest/gtest.h" |
33 | 35 |
34 namespace autofill { | 36 namespace autofill { |
35 | 37 |
36 namespace { | 38 namespace { |
37 | 39 |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 base::RunLoop run_loop; | 443 base::RunLoop run_loop; |
442 fake_agent_.SetQuitLoopClosure(run_loop.QuitClosure()); | 444 fake_agent_.SetQuitLoopClosure(run_loop.QuitClosure()); |
443 driver_->RendererShouldPreviewFieldWithValue(input_value); | 445 driver_->RendererShouldPreviewFieldWithValue(input_value); |
444 run_loop.RunUntilIdle(); | 446 run_loop.RunUntilIdle(); |
445 | 447 |
446 EXPECT_TRUE(fake_agent_.GetString16PreviewFieldWithValue(&output_value)); | 448 EXPECT_TRUE(fake_agent_.GetString16PreviewFieldWithValue(&output_value)); |
447 EXPECT_EQ(input_value, output_value); | 449 EXPECT_EQ(input_value, output_value); |
448 } | 450 } |
449 | 451 |
450 } // namespace autofill | 452 } // namespace autofill |
OLD | NEW |