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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_browsertest.cc

Issue 2819086: Removal of TabContentsDelegate::GetBrowser() interface method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_cc_infobar_delegate.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/string_util.h" 5 #include "base/string_util.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/autocomplete/autocomplete.h" 7 #include "chrome/browser/autocomplete/autocomplete.h"
8 #include "chrome/browser/autocomplete/autocomplete_edit.h" 8 #include "chrome/browser/autocomplete/autocomplete_edit.h"
9 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" 9 #include "chrome/browser/autocomplete/autocomplete_edit_view.h"
10 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" 10 #include "chrome/browser/autocomplete/autocomplete_popup_model.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 138
139 IN_PROC_BROWSER_TEST_F(AutocompleteBrowserTest, TabAwayRevertSelect) { 139 IN_PROC_BROWSER_TEST_F(AutocompleteBrowserTest, TabAwayRevertSelect) {
140 // http://code.google.com/p/chromium/issues/detail?id=38385 140 // http://code.google.com/p/chromium/issues/detail?id=38385
141 // Make sure that tabbing away from an empty omnibar causes a revert 141 // Make sure that tabbing away from an empty omnibar causes a revert
142 // and select all. 142 // and select all.
143 LocationBar* location_bar = GetLocationBar(); 143 LocationBar* location_bar = GetLocationBar();
144 EXPECT_EQ(UTF8ToWide(chrome::kAboutBlankURL), 144 EXPECT_EQ(UTF8ToWide(chrome::kAboutBlankURL),
145 location_bar->location_entry()->GetText()); 145 location_bar->location_entry()->GetText());
146 location_bar->location_entry()->SetUserText(L""); 146 location_bar->location_entry()->SetUserText(L"");
147 Browser* browser_used = NULL;
147 browser()->AddTabWithURL( 148 browser()->AddTabWithURL(
148 GURL(chrome::kAboutBlankURL), GURL(), PageTransition::START_PAGE, 149 GURL(chrome::kAboutBlankURL), GURL(), PageTransition::START_PAGE,
149 -1, TabStripModel::ADD_SELECTED, NULL, std::string()); 150 -1, TabStripModel::ADD_SELECTED, NULL, std::string(), &browser_used);
151 EXPECT_EQ(browser(), browser_used);
150 ui_test_utils::WaitForNavigation( 152 ui_test_utils::WaitForNavigation(
151 &browser()->GetSelectedTabContents()->controller()); 153 &browser()->GetSelectedTabContents()->controller());
152 EXPECT_EQ(UTF8ToWide(chrome::kAboutBlankURL), 154 EXPECT_EQ(UTF8ToWide(chrome::kAboutBlankURL),
153 location_bar->location_entry()->GetText()); 155 location_bar->location_entry()->GetText());
154 browser()->CloseTab(); 156 browser()->CloseTab();
155 EXPECT_EQ(UTF8ToWide(chrome::kAboutBlankURL), 157 EXPECT_EQ(UTF8ToWide(chrome::kAboutBlankURL),
156 location_bar->location_entry()->GetText()); 158 location_bar->location_entry()->GetText());
157 EXPECT_TRUE(location_bar->location_entry()->IsSelectAll()); 159 EXPECT_TRUE(location_bar->location_entry()->IsSelectAll());
158 } 160 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_cc_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698