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

Unified Diff: chrome/browser/ui/webui/options/options_ui_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/options/options_ui.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/options_ui_browsertest.cc
diff --git a/chrome/browser/ui/webui/options/options_ui_browsertest.cc b/chrome/browser/ui/webui/options/options_ui_browsertest.cc
index 7ee21db719585858e8e33a2be9dc865650c87901..c83b8f8540245a56bfc6c9c9b5be236c44410923 100644
--- a/chrome/browser/ui/webui/options/options_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/options/options_ui_browsertest.cc
@@ -116,10 +116,14 @@ void OptionsUIBrowserTest::NavigateToSettingsSubpage(
browser()->tab_strip_model()->GetActiveWebContents();
ASSERT_TRUE(web_contents);
ASSERT_TRUE(web_contents->GetWebUI());
- UberUI* uber_ui = static_cast<UberUI*>(
- web_contents->GetWebUI()->GetController());
- OptionsUI* options_ui = static_cast<OptionsUI*>(
- uber_ui->GetSubpage(chrome::kChromeUISettingsFrameURL)->GetController());
+
+ content::WebUIController* controller =
+ web_contents->GetWebUI()->GetController();
+#if !defined(OS_CHROMEOS)
+ controller = static_cast<UberUI*>(controller)->
+ GetSubpage(chrome::kChromeUISettingsFrameURL)->GetController();
+#endif
+ OptionsUI* options_ui = static_cast<OptionsUI*>(controller);
// It is not possible to subscribe to the OnFinishedLoading event before the
// call to NavigateToURL(), because the WebUI does not yet exist at that time.
@@ -146,12 +150,17 @@ void OptionsUIBrowserTest::NavigateToSettingsFrame() {
void OptionsUIBrowserTest::VerifyNavbar() {
bool navbar_exist = false;
+#if defined(OS_CHROMEOS)
+ bool should_navbar_exist = false;
+#else
+ bool should_navbar_exist = true;
+#endif
EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
browser()->tab_strip_model()->GetActiveWebContents(),
"domAutomationController.send("
" !!document.getElementById('navigation'))",
&navbar_exist));
- EXPECT_EQ(true, navbar_exist);
+ EXPECT_EQ(should_navbar_exist, navbar_exist);
}
void OptionsUIBrowserTest::VerifyTitle() {
« no previous file with comments | « chrome/browser/ui/webui/options/options_ui.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698