Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: chrome/browser/autofill/autofill_browsertest.cc

Issue 14494004: Added the 'Translation Logs' tab to chrome://translate-internals/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (Rebasing) Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698