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

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

Issue 983823002: Use GUID instead of servicePath in network settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_430115_internet_options_enable_extension_apis
Patch Set: Feedback Created 5 years, 9 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 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 GURL singleton_url_current("chrome://settings/internet"); 948 GURL singleton_url_current("chrome://settings/internet");
949 chrome::AddSelectedTabWithURL(browser(), singleton_url_current, 949 chrome::AddSelectedTabWithURL(browser(), singleton_url_current,
950 ui::PAGE_TRANSITION_LINK); 950 ui::PAGE_TRANSITION_LINK);
951 951
952 EXPECT_EQ(initial_tab_count + 1, browser()->tab_strip_model()->count()); 952 EXPECT_EQ(initial_tab_count + 1, browser()->tab_strip_model()->count());
953 EXPECT_EQ(initial_tab_count, browser()->tab_strip_model()->active_index()); 953 EXPECT_EQ(initial_tab_count, browser()->tab_strip_model()->active_index());
954 954
955 // Navigate to a different settings path. 955 // Navigate to a different settings path.
956 GURL singleton_url_target( 956 GURL singleton_url_target(
957 "chrome://settings/internet?" 957 "chrome://settings/internet?"
958 "servicePath=/profile/ethernet_00aa00aa00aa&networkType=1"); 958 "guid=ethernet_00aa00aa00aa&networkType=1");
959 chrome::NavigateParams params(MakeNavigateParams()); 959 chrome::NavigateParams params(MakeNavigateParams());
960 params.disposition = SINGLETON_TAB; 960 params.disposition = SINGLETON_TAB;
961 params.url = singleton_url_target; 961 params.url = singleton_url_target;
962 params.window_action = chrome::NavigateParams::SHOW_WINDOW; 962 params.window_action = chrome::NavigateParams::SHOW_WINDOW;
963 params.path_behavior = chrome::NavigateParams::IGNORE_AND_NAVIGATE; 963 params.path_behavior = chrome::NavigateParams::IGNORE_AND_NAVIGATE;
964 chrome::Navigate(&params); 964 chrome::Navigate(&params);
965 965
966 // Last tab should still be selected. 966 // Last tab should still be selected.
967 EXPECT_EQ(browser(), params.browser); 967 EXPECT_EQ(browser(), params.browser);
968 EXPECT_EQ(initial_tab_count + 1, browser()->tab_strip_model()->count()); 968 EXPECT_EQ(initial_tab_count + 1, browser()->tab_strip_model()->count());
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 EXPECT_EQ(expected_title, params.target_contents->GetTitle()); 1407 EXPECT_EQ(expected_title, params.target_contents->GetTitle());
1408 // GURL always keeps non-ASCII characters escaped, but check them anyways. 1408 // GURL always keeps non-ASCII characters escaped, but check them anyways.
1409 EXPECT_EQ(GURL(expected_url).spec(), params.target_contents->GetURL().spec()); 1409 EXPECT_EQ(GURL(expected_url).spec(), params.target_contents->GetURL().spec());
1410 // Check the omnibox text. It should have escaped RTL with unescaped text. 1410 // Check the omnibox text. It should have escaped RTL with unescaped text.
1411 LocationBar* location_bar = browser()->window()->GetLocationBar(); 1411 LocationBar* location_bar = browser()->window()->GetLocationBar();
1412 OmniboxView* omnibox_view = location_bar->GetOmniboxView(); 1412 OmniboxView* omnibox_view = location_bar->GetOmniboxView();
1413 EXPECT_EQ(base::UTF8ToUTF16(expected_url), omnibox_view->GetText()); 1413 EXPECT_EQ(base::UTF8ToUTF16(expected_url), omnibox_view->GetText());
1414 } 1414 }
1415 1415
1416 } // namespace 1416 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698