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

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

Issue 10823392: Let ui_test_utils::FindInPage optionally return the selection rect. This will be used in a future c… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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
« no previous file with comments | « no previous file | chrome/browser/history/history_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/history/history_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698