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

Unified Diff: chrome/browser/ui/browser_focus_uitest.cc

Issue 24733003: Update defaults for InstantExtended. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test exclusion. Created 7 years, 2 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
Index: chrome/browser/ui/browser_focus_uitest.cc
diff --git a/chrome/browser/ui/browser_focus_uitest.cc b/chrome/browser/ui/browser_focus_uitest.cc
index 869f43d047f072213f23b9753afb5369278761b6..8d22032b6aa1a504328aa9ba1d693ace11bb547e 100644
--- a/chrome/browser/ui/browser_focus_uitest.cc
+++ b/chrome/browser/ui/browser_focus_uitest.cc
@@ -162,6 +162,16 @@ class BrowserFocusTest : public InProcessBrowserTest {
content::RunMessageLoop();
return IsViewFocused(vid);
}
+
+ protected:
+ virtual void SetUpOnMainThread() OVERRIDE {
+ InProcessBrowserTest::SetUpOnMainThread();
+ // Wait for the InstantNTP prerendered contents to load.
+ content::WindowedNotificationObserver observer(
+ content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllSources());
+ observer.Wait();
+ }
};
class TestInterstitialPage : public content::InterstitialPageDelegate {
@@ -911,7 +921,9 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusOnNavigate) {
// Needed on Mac.
ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
// Load the NTP.
- ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUINewTabURL));
+ ui_test_utils::NavigateToURLWithDisposition(
+ browser(), GURL(chrome::kChromeUINewTabURL), CURRENT_TAB,
+ ui_test_utils::BROWSER_TEST_NONE);
EXPECT_TRUE(IsViewFocused(VIEW_ID_OMNIBOX));
// Navigate to another page.
@@ -931,7 +943,10 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusOnNavigate) {
back_nav_observer.Wait();
}
+ // This is broken on Linux and ChromeOS. See http://crbug.com/304865.
+#if !defined(OS_LINUX)
EXPECT_TRUE(IsViewFocused(VIEW_ID_OMNIBOX));
+#endif
// Navigate forward. Shouldn't focus the location bar.
ClickOnView(VIEW_ID_TAB_CONTAINER);

Powered by Google App Engine
This is Rietveld 408576698