Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / browser_focus_uitest.cc
index ecf2a35..7c95050 100644 (file)
@@ -33,7 +33,6 @@
 #include "content/public/browser/render_view_host.h"
 #include "content/public/browser/render_widget_host_view.h"
 #include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
 #include "content/public/test/browser_test_utils.h"
 #include "net/test/embedded_test_server/embedded_test_server.h"
 
@@ -287,7 +286,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_TabsRememberFocus) {
 
       // Activate the location bar or the page.
       if (kFocusPage[i][j]) {
-        browser()->tab_strip_model()->GetWebContentsAt(j)->GetView()->Focus();
+        browser()->tab_strip_model()->GetWebContentsAt(j)->Focus();
       } else {
         chrome::FocusLocationBar(browser());
       }
@@ -339,7 +338,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_TabsRememberFocusFindInPage) {
   chrome::Find(browser());
   ui_test_utils::FindInPage(
       browser()->tab_strip_model()->GetActiveWebContents(),
-      ASCIIToUTF16("a"), true, false, NULL, NULL);
+      base::ASCIIToUTF16("a"), true, false, NULL, NULL);
   ASSERT_TRUE(IsViewFocused(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD));
 
   // Focus the location bar.
@@ -378,7 +377,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest,
       new Browser(Browser::CreateParams(browser()->profile(),
                                         browser()->host_desktop_type()));
   ASSERT_TRUE(browser2);
-  chrome::AddBlankTabAt(browser2, -1, true);
+  chrome::AddTabAt(browser2, GURL(), -1, true);
   browser2->window()->Show();
 
   Browser* focused_browser = NULL;
@@ -919,7 +918,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest,
   chrome::FocusLocationBar(browser());
 
   OmniboxEditController* controller =
-      browser()->window()->GetLocationBar()->GetLocationEntry()->model()->
+      browser()->window()->GetLocationBar()->GetOmniboxView()->model()->
           controller();
 
   // Simulate an alt-enter.
@@ -938,14 +937,16 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest,
   EXPECT_FALSE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_OMNIBOX));
 }
 
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA)
-// TODO(erg): http://crbug.com/163931
-#define MAYBE_FocusOnNavigate DISABLED_FocusOnNavigate
-#else
-#define MAYBE_FocusOnNavigate FocusOnNavigate
-#endif
+// This functionality is currently broken. http://crbug.com/304865.
+//
+//#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA)
+//// TODO(erg): http://crbug.com/163931
+//#define MAYBE_FocusOnNavigate DISABLED_FocusOnNavigate
+//#else
+//#define MAYBE_FocusOnNavigate FocusOnNavigate
+//#endif
 
-IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusOnNavigate) {
+IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_FocusOnNavigate) {
   // Needed on Mac.
   ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
   // Load the NTP.