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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_TabsRememberFocusFindInPage) { | 388 IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_TabsRememberFocusFindInPage) { |
389 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 389 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
390 ASSERT_TRUE(test_server()->Start()); | 390 ASSERT_TRUE(test_server()->Start()); |
391 | 391 |
392 // First we navigate to our test page. | 392 // First we navigate to our test page. |
393 GURL url = test_server()->GetURL(kSimplePage); | 393 GURL url = test_server()->GetURL(kSimplePage); |
394 ui_test_utils::NavigateToURL(browser(), url); | 394 ui_test_utils::NavigateToURL(browser(), url); |
395 | 395 |
396 chrome::Find(browser()); | 396 chrome::Find(browser()); |
397 ui_test_utils::FindInPage(chrome::GetActiveTabContents(browser()), | 397 ui_test_utils::FindInPage(chrome::GetActiveTabContents(browser()), |
398 ASCIIToUTF16("a"), true, false, NULL); | 398 ASCIIToUTF16("a"), true, false, NULL, NULL); |
399 ASSERT_TRUE(IsViewFocused(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD)); | 399 ASSERT_TRUE(IsViewFocused(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD)); |
400 | 400 |
401 // Focus the location bar. | 401 // Focus the location bar. |
402 chrome::FocusLocationBar(browser()); | 402 chrome::FocusLocationBar(browser()); |
403 | 403 |
404 // Create a 2nd tab. | 404 // Create a 2nd tab. |
405 chrome::AddSelectedTabWithURL(browser(), url, content::PAGE_TRANSITION_TYPED); | 405 chrome::AddSelectedTabWithURL(browser(), url, content::PAGE_TRANSITION_TYPED); |
406 | 406 |
407 // Focus should be on the recently opened tab page. | 407 // Focus should be on the recently opened tab page. |
408 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); | 408 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 chrome::Reload(browser(), CURRENT_TAB); | 925 chrome::Reload(browser(), CURRENT_TAB); |
926 observer.Wait(); | 926 observer.Wait(); |
927 } | 927 } |
928 | 928 |
929 // Focus should now be on the tab contents. | 929 // Focus should now be on the tab contents. |
930 chrome::ShowDownloads(browser()); | 930 chrome::ShowDownloads(browser()); |
931 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); | 931 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); |
932 } | 932 } |
933 | 933 |
934 } // namespace | 934 } // namespace |
OLD | NEW |