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

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

Issue 1220963005: Update base::StartsWith calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 years, 5 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(base::StartsWithASCII( 1294 EXPECT_TRUE(base::StartsWith(
1295 browser()->tab_strip_model()->GetActiveWebContents()->GetURL().spec(), 1295 browser()->tab_strip_model()->GetActiveWebContents()->GetURL().spec(),
1296 chrome::kChromeUIBookmarksURL, true)); 1296 chrome::kChromeUIBookmarksURL, base::CompareCase::SENSITIVE));
1297 } 1297 }
1298 1298
1299 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, 1299 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
1300 NavigateFromDefaultToDownloadsInSameTab) { 1300 NavigateFromDefaultToDownloadsInSameTab) {
1301 { 1301 {
1302 content::WindowedNotificationObserver observer( 1302 content::WindowedNotificationObserver observer(
1303 content::NOTIFICATION_LOAD_STOP, 1303 content::NOTIFICATION_LOAD_STOP,
1304 content::NotificationService::AllSources()); 1304 content::NotificationService::AllSources());
1305 chrome::ShowDownloads(browser()); 1305 chrome::ShowDownloads(browser());
1306 observer.Wait(); 1306 observer.Wait();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 EXPECT_EQ(expected_title, params.target_contents->GetTitle()); 1406 EXPECT_EQ(expected_title, params.target_contents->GetTitle());
1407 // GURL always keeps non-ASCII characters escaped, but check them anyways. 1407 // GURL always keeps non-ASCII characters escaped, but check them anyways.
1408 EXPECT_EQ(GURL(expected_url).spec(), params.target_contents->GetURL().spec()); 1408 EXPECT_EQ(GURL(expected_url).spec(), params.target_contents->GetURL().spec());
1409 // 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.
1410 LocationBar* location_bar = browser()->window()->GetLocationBar(); 1410 LocationBar* location_bar = browser()->window()->GetLocationBar();
1411 OmniboxView* omnibox_view = location_bar->GetOmniboxView(); 1411 OmniboxView* omnibox_view = location_bar->GetOmniboxView();
1412 EXPECT_EQ(base::UTF8ToUTF16(expected_url), omnibox_view->GetText()); 1412 EXPECT_EQ(base::UTF8ToUTF16(expected_url), omnibox_view->GetText());
1413 } 1413 }
1414 1414
1415 } // namespace 1415 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698