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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/format_macros.h" 6 #include "base/format_macros.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" 10 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // and select all. 177 // and select all.
178 LocationBar* location_bar = GetLocationBar(); 178 LocationBar* location_bar = GetLocationBar();
179 OmniboxView* omnibox_view = location_bar->GetOmniboxView(); 179 OmniboxView* omnibox_view = location_bar->GetOmniboxView();
180 EXPECT_EQ(base::UTF8ToUTF16(url::kAboutBlankURL), omnibox_view->GetText()); 180 EXPECT_EQ(base::UTF8ToUTF16(url::kAboutBlankURL), omnibox_view->GetText());
181 omnibox_view->SetUserText(base::string16()); 181 omnibox_view->SetUserText(base::string16());
182 content::WindowedNotificationObserver observer( 182 content::WindowedNotificationObserver observer(
183 content::NOTIFICATION_LOAD_STOP, 183 content::NOTIFICATION_LOAD_STOP,
184 content::NotificationService::AllSources()); 184 content::NotificationService::AllSources());
185 chrome::AddSelectedTabWithURL(browser(), 185 chrome::AddSelectedTabWithURL(browser(),
186 GURL(url::kAboutBlankURL), 186 GURL(url::kAboutBlankURL),
187 content::PAGE_TRANSITION_AUTO_TOPLEVEL); 187 ui::PAGE_TRANSITION_AUTO_TOPLEVEL);
188 observer.Wait(); 188 observer.Wait();
189 EXPECT_EQ(base::UTF8ToUTF16(url::kAboutBlankURL), omnibox_view->GetText()); 189 EXPECT_EQ(base::UTF8ToUTF16(url::kAboutBlankURL), omnibox_view->GetText());
190 chrome::CloseTab(browser()); 190 chrome::CloseTab(browser());
191 EXPECT_EQ(base::UTF8ToUTF16(url::kAboutBlankURL), omnibox_view->GetText()); 191 EXPECT_EQ(base::UTF8ToUTF16(url::kAboutBlankURL), omnibox_view->GetText());
192 EXPECT_TRUE(omnibox_view->IsSelectAll()); 192 EXPECT_TRUE(omnibox_view->IsSelectAll());
193 } 193 }
194 194
195 IN_PROC_BROWSER_TEST_F(AutocompleteBrowserTest, FocusSearch) { 195 IN_PROC_BROWSER_TEST_F(AutocompleteBrowserTest, FocusSearch) {
196 #if defined(OS_WIN) && defined(USE_ASH) 196 #if defined(OS_WIN) && defined(USE_ASH)
197 // Disable this test in Metro+Ash for now (http://crbug.com/262796). 197 // Disable this test in Metro+Ash for now (http://crbug.com/262796).
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 location_bar->FocusSearch(); 277 location_bar->FocusSearch();
278 EXPECT_FALSE(location_bar->GetDestinationURL().is_valid()); 278 EXPECT_FALSE(location_bar->GetDestinationURL().is_valid());
279 EXPECT_EQ(base::ASCIIToUTF16(" ?foo"), omnibox_view->GetText()); 279 EXPECT_EQ(base::ASCIIToUTF16(" ?foo"), omnibox_view->GetText());
280 280
281 size_t selection_start, selection_end; 281 size_t selection_start, selection_end;
282 omnibox_view->GetSelectionBounds(&selection_start, &selection_end); 282 omnibox_view->GetSelectionBounds(&selection_start, &selection_end);
283 EXPECT_EQ(4U, std::min(selection_start, selection_end)); 283 EXPECT_EQ(4U, std::min(selection_start, selection_end));
284 EXPECT_EQ(7U, std::max(selection_start, selection_end)); 284 EXPECT_EQ(7U, std::max(selection_start, selection_end));
285 } 285 }
286 } 286 }
OLDNEW
« no previous file with comments | « chrome/browser/apps/install_chrome_app.cc ('k') | chrome/browser/autocomplete/autocomplete_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698