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

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

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/format_macros.h" 5 #include "base/format_macros.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/autocomplete/autocomplete.h" 9 #include "chrome/browser/autocomplete/autocomplete.h"
10 #include "chrome/browser/autocomplete/autocomplete_edit.h" 10 #include "chrome/browser/autocomplete/autocomplete_edit.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // http://code.google.com/p/chromium/issues/detail?id=38385 145 // http://code.google.com/p/chromium/issues/detail?id=38385
146 // Make sure that tabbing away from an empty omnibar causes a revert 146 // Make sure that tabbing away from an empty omnibar causes a revert
147 // and select all. 147 // and select all.
148 LocationBar* location_bar = GetLocationBar(); 148 LocationBar* location_bar = GetLocationBar();
149 EXPECT_EQ(UTF8ToUTF16(chrome::kAboutBlankURL), 149 EXPECT_EQ(UTF8ToUTF16(chrome::kAboutBlankURL),
150 location_bar->location_entry()->GetText()); 150 location_bar->location_entry()->GetText());
151 location_bar->location_entry()->SetUserText(string16()); 151 location_bar->location_entry()->SetUserText(string16());
152 ui_test_utils::WindowedNotificationObserver observer( 152 ui_test_utils::WindowedNotificationObserver observer(
153 content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources()); 153 content::NOTIFICATION_LOAD_STOP, NotificationService::AllSources());
154 browser()->AddSelectedTabWithURL(GURL(chrome::kAboutBlankURL), 154 browser()->AddSelectedTabWithURL(GURL(chrome::kAboutBlankURL),
155 PageTransition::START_PAGE); 155 content::PAGE_TRANSITION_START_PAGE);
156 observer.Wait(); 156 observer.Wait();
157 EXPECT_EQ(UTF8ToUTF16(chrome::kAboutBlankURL), 157 EXPECT_EQ(UTF8ToUTF16(chrome::kAboutBlankURL),
158 location_bar->location_entry()->GetText()); 158 location_bar->location_entry()->GetText());
159 browser()->CloseTab(); 159 browser()->CloseTab();
160 EXPECT_EQ(UTF8ToUTF16(chrome::kAboutBlankURL), 160 EXPECT_EQ(UTF8ToUTF16(chrome::kAboutBlankURL),
161 location_bar->location_entry()->GetText()); 161 location_bar->location_entry()->GetText());
162 EXPECT_TRUE(location_bar->location_entry()->IsSelectAll()); 162 EXPECT_TRUE(location_bar->location_entry()->IsSelectAll());
163 } 163 }
164 164
165 IN_PROC_BROWSER_TEST_F(AutocompleteBrowserTest, FocusSearch) { 165 IN_PROC_BROWSER_TEST_F(AutocompleteBrowserTest, FocusSearch) {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 const AutocompleteResult& result = autocomplete_controller->result(); 312 const AutocompleteResult& result = autocomplete_controller->result();
313 // 'App test' is also a substring of extension 'Packaged App Test'. 313 // 'App test' is also a substring of extension 'Packaged App Test'.
314 EXPECT_GT(result.size(), 2U) << AutocompleteResultAsString(result); 314 EXPECT_GT(result.size(), 2U) << AutocompleteResultAsString(result);
315 AutocompleteMatch match = result.match_at(0); 315 AutocompleteMatch match = result.match_at(0);
316 EXPECT_EQ(ASCIIToUTF16("App Test"), match.contents); 316 EXPECT_EQ(ASCIIToUTF16("App Test"), match.contents);
317 EXPECT_EQ(AutocompleteMatch::EXTENSION_APP, match.type); 317 EXPECT_EQ(AutocompleteMatch::EXTENSION_APP, match.type);
318 EXPECT_FALSE(match.deletable); 318 EXPECT_FALSE(match.deletable);
319 location_bar->AcceptInput(); 319 location_bar->AcceptInput();
320 } 320 }
321 } 321 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete.cc ('k') | chrome/browser/autocomplete/autocomplete_edit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698