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

Side by Side Diff: chrome/browser/ui/browser_navigator_browsertest.cc

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger Created 5 years, 6 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 "chrome/browser/ui/browser_navigator_browsertest.h" 5 #include "chrome/browser/ui/browser_navigator_browsertest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, 1284 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
1285 MAYBE_NavigateFromDefaultToBookmarksInSameTab) { 1285 MAYBE_NavigateFromDefaultToBookmarksInSameTab) {
1286 { 1286 {
1287 content::WindowedNotificationObserver observer( 1287 content::WindowedNotificationObserver observer(
1288 content::NOTIFICATION_LOAD_STOP, 1288 content::NOTIFICATION_LOAD_STOP,
1289 content::NotificationService::AllSources()); 1289 content::NotificationService::AllSources());
1290 chrome::ShowBookmarkManager(browser()); 1290 chrome::ShowBookmarkManager(browser());
1291 observer.Wait(); 1291 observer.Wait();
1292 } 1292 }
1293 EXPECT_EQ(1, browser()->tab_strip_model()->count()); 1293 EXPECT_EQ(1, browser()->tab_strip_model()->count());
1294 EXPECT_TRUE(StartsWithASCII( 1294 EXPECT_TRUE(base::StartsWithASCII(
1295 browser()->tab_strip_model()->GetActiveWebContents()->GetURL().spec(), 1295 browser()->tab_strip_model()->GetActiveWebContents()->GetURL().spec(),
1296 chrome::kChromeUIBookmarksURL, 1296 chrome::kChromeUIBookmarksURL, true));
1297 true));
1298 } 1297 }
1299 1298
1300 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, 1299 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
1301 NavigateFromDefaultToDownloadsInSameTab) { 1300 NavigateFromDefaultToDownloadsInSameTab) {
1302 { 1301 {
1303 content::WindowedNotificationObserver observer( 1302 content::WindowedNotificationObserver observer(
1304 content::NOTIFICATION_LOAD_STOP, 1303 content::NOTIFICATION_LOAD_STOP,
1305 content::NotificationService::AllSources()); 1304 content::NotificationService::AllSources());
1306 chrome::ShowDownloads(browser()); 1305 chrome::ShowDownloads(browser());
1307 observer.Wait(); 1306 observer.Wait();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 EXPECT_EQ(expected_title, params.target_contents->GetTitle()); 1406 EXPECT_EQ(expected_title, params.target_contents->GetTitle());
1408 // GURL always keeps non-ASCII characters escaped, but check them anyways. 1407 // GURL always keeps non-ASCII characters escaped, but check them anyways.
1409 EXPECT_EQ(GURL(expected_url).spec(), params.target_contents->GetURL().spec()); 1408 EXPECT_EQ(GURL(expected_url).spec(), params.target_contents->GetURL().spec());
1410 // Check the omnibox text. It should have escaped RTL with unescaped text. 1409 // Check the omnibox text. It should have escaped RTL with unescaped text.
1411 LocationBar* location_bar = browser()->window()->GetLocationBar(); 1410 LocationBar* location_bar = browser()->window()->GetLocationBar();
1412 OmniboxView* omnibox_view = location_bar->GetOmniboxView(); 1411 OmniboxView* omnibox_view = location_bar->GetOmniboxView();
1413 EXPECT_EQ(base::UTF8ToUTF16(expected_url), omnibox_view->GetText()); 1412 EXPECT_EQ(base::UTF8ToUTF16(expected_url), omnibox_view->GetText());
1414 } 1413 }
1415 1414
1416 } // namespace 1415 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698