OLD | NEW |
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" | |
9 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
11 #include "build/build_config.h" | 10 #include "build/build_config.h" |
12 #include "chrome/app/chrome_command_ids.h" | 11 #include "chrome/app/chrome_command_ids.h" |
13 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 12 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
14 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/browser/ui/browser_commands.h" | 15 #include "chrome/browser/ui/browser_commands.h" |
17 #include "chrome/browser/ui/browser_finder.h" | 16 #include "chrome/browser/ui/browser_finder.h" |
18 #include "chrome/browser/ui/browser_navigator.h" | 17 #include "chrome/browser/ui/browser_navigator.h" |
19 #include "chrome/browser/ui/browser_navigator_params.h" | 18 #include "chrome/browser/ui/browser_navigator_params.h" |
20 #include "chrome/browser/ui/browser_tabstrip.h" | 19 #include "chrome/browser/ui/browser_tabstrip.h" |
21 #include "chrome/browser/ui/browser_window.h" | 20 #include "chrome/browser/ui/browser_window.h" |
22 #include "chrome/browser/ui/chrome_pages.h" | 21 #include "chrome/browser/ui/chrome_pages.h" |
23 #include "chrome/browser/ui/location_bar/location_bar.h" | 22 #include "chrome/browser/ui/location_bar/location_bar.h" |
24 #include "chrome/browser/ui/singleton_tabs.h" | 23 #include "chrome/browser/ui/singleton_tabs.h" |
25 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 24 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
26 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
27 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
28 #include "chrome/common/url_constants.h" | 27 #include "chrome/common/url_constants.h" |
29 #include "chrome/test/base/ui_test_utils.h" | 28 #include "chrome/test/base/ui_test_utils.h" |
30 #include "components/omnibox/browser/omnibox_view.h" | 29 #include "components/omnibox/browser/omnibox_view.h" |
| 30 #include "components/prefs/pref_service.h" |
31 #include "content/public/browser/notification_service.h" | 31 #include "content/public/browser/notification_service.h" |
32 #include "content/public/browser/notification_types.h" | 32 #include "content/public/browser/notification_types.h" |
33 #include "content/public/browser/web_contents.h" | 33 #include "content/public/browser/web_contents.h" |
34 #include "net/test/embedded_test_server/embedded_test_server.h" | 34 #include "net/test/embedded_test_server/embedded_test_server.h" |
35 | 35 |
36 using content::WebContents; | 36 using content::WebContents; |
37 | 37 |
38 namespace { | 38 namespace { |
39 | 39 |
40 const char kExpectedTitle[] = "PASSED!"; | 40 const char kExpectedTitle[] = "PASSED!"; |
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1415 EXPECT_EQ(expected_title, params.target_contents->GetTitle()); | 1415 EXPECT_EQ(expected_title, params.target_contents->GetTitle()); |
1416 // GURL always keeps non-ASCII characters escaped, but check them anyways. | 1416 // GURL always keeps non-ASCII characters escaped, but check them anyways. |
1417 EXPECT_EQ(GURL(expected_url).spec(), params.target_contents->GetURL().spec()); | 1417 EXPECT_EQ(GURL(expected_url).spec(), params.target_contents->GetURL().spec()); |
1418 // Check the omnibox text. It should have escaped RTL with unescaped text. | 1418 // Check the omnibox text. It should have escaped RTL with unescaped text. |
1419 LocationBar* location_bar = browser()->window()->GetLocationBar(); | 1419 LocationBar* location_bar = browser()->window()->GetLocationBar(); |
1420 OmniboxView* omnibox_view = location_bar->GetOmniboxView(); | 1420 OmniboxView* omnibox_view = location_bar->GetOmniboxView(); |
1421 EXPECT_EQ(base::UTF8ToUTF16(expected_url), omnibox_view->GetText()); | 1421 EXPECT_EQ(base::UTF8ToUTF16(expected_url), omnibox_view->GetText()); |
1422 } | 1422 } |
1423 | 1423 |
1424 } // namespace | 1424 } // namespace |
OLD | NEW |