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