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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 " <option value=\"\" selected=\"yes\">--</option>" | 943 " <option value=\"\" selected=\"yes\">--</option>" |
944 " <option value=\"CA\">Canada</option>" | 944 " <option value=\"CA\">Canada</option>" |
945 " <option value=\"US\">United States</option>" | 945 " <option value=\"US\">United States</option>" |
946 " </select><br>" | 946 " </select><br>" |
947 "<label for=\"ph\">Phone number:</label>" | 947 "<label for=\"ph\">Phone number:</label>" |
948 " <input type=\"text\" id=\"ph\"><br>" | 948 " <input type=\"text\" id=\"ph\"><br>" |
949 "</form>"); | 949 "</form>"); |
950 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), url)); | 950 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), url)); |
951 | 951 |
952 // Get translation bar. | 952 // Get translation bar. |
| 953 LanguageDetectionDetails details; |
| 954 details.adopted_language = "ja"; |
953 RenderViewHostTester::TestOnMessageReceived( | 955 RenderViewHostTester::TestOnMessageReceived( |
954 render_view_host(), | 956 render_view_host(), |
955 ChromeViewHostMsg_TranslateLanguageDetermined(0, "ja", true)); | 957 ChromeViewHostMsg_TranslateLanguageDetermined(0, details, true)); |
956 TranslateInfoBarDelegate* infobar = InfoBarService::FromWebContents( | 958 TranslateInfoBarDelegate* infobar = InfoBarService::FromWebContents( |
957 browser()->tab_strip_model()->GetActiveWebContents())->infobar_at(0)-> | 959 browser()->tab_strip_model()->GetActiveWebContents())->infobar_at(0)-> |
958 AsTranslateInfoBarDelegate(); | 960 AsTranslateInfoBarDelegate(); |
959 | 961 |
960 ASSERT_TRUE(infobar != NULL); | 962 ASSERT_TRUE(infobar != NULL); |
961 EXPECT_EQ(TranslateInfoBarDelegate::BEFORE_TRANSLATE, | 963 EXPECT_EQ(TranslateInfoBarDelegate::BEFORE_TRANSLATE, |
962 infobar->infobar_type()); | 964 infobar->infobar_type()); |
963 | 965 |
964 // Simulate translation button press. | 966 // Simulate translation button press. |
965 infobar->Translate(); | 967 infobar->Translate(); |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1710 IN_PROC_BROWSER_TEST_F(AutofillTest, | 1712 IN_PROC_BROWSER_TEST_F(AutofillTest, |
1711 DISABLED_MergeAggregatedDuplicatedProfiles) { | 1713 DISABLED_MergeAggregatedDuplicatedProfiles) { |
1712 int num_of_profiles = | 1714 int num_of_profiles = |
1713 AggregateProfilesIntoAutofillPrefs("dataset_no_address.txt"); | 1715 AggregateProfilesIntoAutofillPrefs("dataset_no_address.txt"); |
1714 | 1716 |
1715 ASSERT_GT(num_of_profiles, | 1717 ASSERT_GT(num_of_profiles, |
1716 static_cast<int>(personal_data_manager()->GetProfiles().size())); | 1718 static_cast<int>(personal_data_manager()->GetProfiles().size())); |
1717 } | 1719 } |
1718 | 1720 |
1719 } // namespace autofill | 1721 } // namespace autofill |
OLD | NEW |