OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "base/memory/weak_ptr.h" | 6 #include "base/memory/weak_ptr.h" |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" | 9 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" |
10 #include "chrome/browser/ui/autofill/autofill_popup_view.h" | 10 #include "chrome/browser/ui/autofill/autofill_popup_view.h" |
11 #include "chrome/browser/ui/autofill/popup_constants.h" | 11 #include "chrome/browser/ui/autofill/popup_constants.h" |
12 #include "chrome/browser/ui/autofill/test_popup_controller_common.h" | 12 #include "chrome/browser/ui/autofill/test_popup_controller_common.h" |
13 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 13 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
14 #include "chrome/test/base/testing_profile.h" | 14 #include "chrome/test/base/testing_profile.h" |
15 #include "components/autofill/content/browser/content_autofill_driver.h" | 15 #include "components/autofill/content/browser/content_autofill_driver.h" |
16 #include "components/autofill/content/browser/content_autofill_driver_factory.h" | 16 #include "components/autofill/content/browser/content_autofill_driver_factory.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/popup_item_ids.h" | 20 #include "components/autofill/core/browser/popup_item_ids.h" |
21 #include "components/autofill/core/browser/test_autofill_client.h" | 21 #include "components/autofill/core/browser/test_autofill_client.h" |
22 #include "components/autofill/core/browser/test_autofill_external_delegate.h" | 22 #include "components/autofill/core/browser/test_autofill_external_delegate.h" |
23 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
24 #include "grit/components_scaled_resources.h" | 24 #include "grit/components_scaled_resources.h" |
25 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
27 #include "ui/base/resource/resource_bundle.h" | 27 #include "ui/base/resource/resource_bundle.h" |
28 #include "ui/gfx/display.h" | 28 #include "ui/gfx/display.h" |
29 #include "ui/gfx/rect.h" | 29 #include "ui/gfx/geometry/rect.h" |
30 #include "ui/gfx/text_utils.h" | 30 #include "ui/gfx/text_utils.h" |
31 | 31 |
32 using ::testing::_; | 32 using ::testing::_; |
33 using ::testing::AtLeast; | 33 using ::testing::AtLeast; |
34 using ::testing::NiceMock; | 34 using ::testing::NiceMock; |
35 using base::ASCIIToUTF16; | 35 using base::ASCIIToUTF16; |
36 using base::WeakPtr; | 36 using base::WeakPtr; |
37 | 37 |
38 namespace autofill { | 38 namespace autofill { |
39 namespace { | 39 namespace { |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 | 528 |
529 // The second element was shorter so it should be unchanged. | 529 // The second element was shorter so it should be unchanged. |
530 EXPECT_EQ(autofill_popup_controller_->GetSuggestionAt(1).value, | 530 EXPECT_EQ(autofill_popup_controller_->GetSuggestionAt(1).value, |
531 autofill_popup_controller_->GetElidedValueAt(1)); | 531 autofill_popup_controller_->GetElidedValueAt(1)); |
532 EXPECT_EQ(autofill_popup_controller_->GetSuggestionAt(1).label, | 532 EXPECT_EQ(autofill_popup_controller_->GetSuggestionAt(1).label, |
533 autofill_popup_controller_->GetElidedLabelAt(1)); | 533 autofill_popup_controller_->GetElidedLabelAt(1)); |
534 } | 534 } |
535 #endif | 535 #endif |
536 | 536 |
537 } // namespace autofill | 537 } // namespace autofill |
OLD | NEW |