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

Side by Side Diff: chrome/browser/chrome_content_browser_client_browsertest.cc

Issue 449623003: Integrate About page into Settings for Chrome OS settings in a window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 | Annotate | Revision Log
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 "chrome/browser/ui/browser.h" 6 #include "chrome/browser/ui/browser.h"
7 #include "chrome/browser/ui/tabs/tab_strip_model.h" 7 #include "chrome/browser/ui/tabs/tab_strip_model.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 #include "chrome/test/base/in_process_browser_test.h" 9 #include "chrome/test/base/in_process_browser_test.h"
10 #include "chrome/test/base/ui_test_utils.h" 10 #include "chrome/test/base/ui_test_utils.h"
11 #include "content/public/browser/navigation_controller.h" 11 #include "content/public/browser/navigation_controller.h"
12 #include "content/public/browser/navigation_entry.h" 12 #include "content/public/browser/navigation_entry.h"
13 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
14 #include "content/public/common/content_switches.h" 14 #include "content/public/common/content_switches.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace content { 17 namespace content {
18 18
19 class ChromeContentBrowserClientBrowserTest : public InProcessBrowserTest { 19 class ChromeContentBrowserClientBrowserTest : public InProcessBrowserTest {
20 public: 20 public:
21 // Returns the last committed navigation entry of the first tab. May be NULL 21 // Returns the last committed navigation entry of the first tab. May be NULL
22 // if there is no such entry. 22 // if there is no such entry.
23 NavigationEntry* GetLastCommittedEntry() { 23 NavigationEntry* GetLastCommittedEntry() {
24 return browser()->tab_strip_model()->GetWebContentsAt(0)-> 24 return browser()->tab_strip_model()->GetWebContentsAt(0)->
25 GetController().GetLastCommittedEntry(); 25 GetController().GetLastCommittedEntry();
26 } 26 }
27
28 #if defined(OS_CHROMEOS)
29 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE {
30 command_line->AppendSwitch(switches::kDisableAboutInSettings);
31 }
32 #endif
27 }; 33 };
28 34
29 IN_PROC_BROWSER_TEST_F(ChromeContentBrowserClientBrowserTest, 35 IN_PROC_BROWSER_TEST_F(ChromeContentBrowserClientBrowserTest,
30 UberURLHandler_SettingsPage) { 36 UberURLHandler_SettingsPage) {
31 const GURL url_short("chrome://settings/"); 37 const GURL url_short("chrome://settings/");
32 const GURL url_long("chrome://chrome/settings/"); 38 const GURL url_long("chrome://chrome/settings/");
33 39
34 ui_test_utils::NavigateToURL(browser(), url_short); 40 ui_test_utils::NavigateToURL(browser(), url_short);
35 NavigationEntry* entry = GetLastCommittedEntry(); 41 NavigationEntry* entry = GetLastCommittedEntry();
36 42
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 94
89 ui_test_utils::NavigateToURL(browser(), url); 95 ui_test_utils::NavigateToURL(browser(), url);
90 NavigationEntry* entry = GetLastCommittedEntry(); 96 NavigationEntry* entry = GetLastCommittedEntry();
91 97
92 ASSERT_TRUE(entry != NULL); 98 ASSERT_TRUE(entry != NULL);
93 EXPECT_EQ(url, entry->GetURL()); 99 EXPECT_EQ(url, entry->GetURL());
94 EXPECT_EQ(url, entry->GetVirtualURL()); 100 EXPECT_EQ(url, entry->GetVirtualURL());
95 } 101 }
96 102
97 } // namespace content 103 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/resources/help/channel_change_page.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698