Home | History | Annotate | Download | only in browser

Lines Matching refs:Browser

14 #include "chrome/browser/tabs/tab_strip_model.h"
15 #include "chrome/browser/ui/browser.h"
16 #include "chrome/browser/ui/browser_window.h"
17 #include "chrome/browser/ui/view_ids.h"
22 #include "content/browser/renderer_host/render_view_host.h"
23 #include "content/browser/renderer_host/render_widget_host_view.h"
24 #include "content/browser/tab_contents/interstitial_page.h"
25 #include "content/browser/tab_contents/tab_contents.h"
26 #include "content/browser/tab_contents/tab_contents_view.h"
36 #include "chrome/browser/ui/views/frame/browser_view.h"
37 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
38 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h"
42 #include "chrome/browser/ui/gtk/view_id_util.h"
132 return ui_test_utils::IsViewFocused(browser(), vid);
136 ui_test_utils::ClickOnView(browser(), vid);
184 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
205 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
210 ui_test_utils::NavigateToURL(browser(), url);
212 gfx::NativeWindow window = browser()->window()->GetNativeHandle();
221 browser()->FocusLocationBar();
231 // Open a new browser window.
232 Browser* browser2 = Browser::Create(browser()->profile());
248 // Switch to the 1st browser window, focus should still be on the location
249 // bar and the second browser should have nothing focused.
250 browser()->window()->Activate();
254 // Switch back to the second browser, focus should still be on the page.
258 browser()->window()->GetNativeHandle())->GetFocusedView());
262 // Close the 2nd browser to avoid a DCHECK().
270 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
275 ui_test_utils::NavigateToURL(browser(), url);
279 browser()->AddSelectedTabWithURL(url, PageTransition::TYPED);
291 browser()->ActivateTabAt(j, true);
295 browser()->GetTabContentsAt(j)->view()->Focus();
297 browser()->FocusLocationBar();
304 browser()->ActivateTabAt(j, true);
311 browser()->ActivateTabAt(0, true);
320 browser(), ui::VKEY_TAB, true, false, false, false));
324 browser()->ActivateTabAt(4, true);
331 browser(), ui::VKEY_TAB, true, true, false, false));
338 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
343 ui_test_utils::NavigateToURL(browser(), url);
345 browser()->Find();
346 ui_test_utils::FindInPage(browser()->GetSelectedTabContentsWrapper(),
351 browser()->FocusLocationBar();
354 browser()->AddSelectedTabWithURL(url, PageTransition::TYPED);
361 browser()->ActivateTabAt(0, true);
366 browser()->Find();
368 browser()->ActivateTabAt(1, true);
370 browser()->ActivateTabAt(0, true);
378 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
381 // Open a new browser window.
382 Browser* browser2 = Browser::Create(browser()->profile());
387 Browser* focused_browser = NULL;
388 Browser* unfocused_browser = NULL;
391 // to figure out which browser does have focus.
394 unfocused_browser = browser();
395 } else if (browser()->window()->IsActive()) {
396 focused_browser = browser();
399 FAIL() << "Could not determine which browser has focus";
402 focused_browser = browser();
407 unfocused_browser = browser();
413 // Activate the first browser.
420 // Make sure the first browser is still active.
426 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
431 ui_test_utils::NavigateToURL(browser(), url);
433 browser()->FocusLocationBar();
436 browser()->GetSelectedTabContents()->render_view_host(), L"",
449 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
454 ui_test_utils::NavigateToURL(browser(), url);
456 browser()->FocusLocationBar();
474 browser(), ui::VKEY_END, false, false, false, false));
482 browser()->GetSelectedTabContents()->render_view_host(),
496 browser(), ui::VKEY_TAB, false, false, false, false,
499 browser()->GetSelectedTabContents())),
502 // On the last tab key press, the focus returns to the browser.
504 browser(), ui::VKEY_TAB, false, false, false, false,
506 NotificationSource(Source<Browser>(browser()))));
524 browser(), ui::VKEY_END, false, false, false, false));
539 browser(), ui::VKEY_TAB, false, true, false, false,
542 browser()->GetSelectedTabContents())),
545 // On the last tab key press, the focus returns to the browser.
547 browser(), ui::VKEY_TAB, false, true, false, false,
549 NotificationSource(Source<Browser>(browser()))));
555 browser()->GetSelectedTabContents()->render_view_host(),
571 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
576 ui_test_utils::NavigateToURL(browser(), url);
583 new TestInterstitialPage(browser()->GetSelectedTabContents(),
592 browser()->FocusLocationBar();
608 browser(), ui::VKEY_END, false, false, false, false));
628 // On the last tab key press, the focus returns to the browser.
630 notification_source = Source<Browser>(browser());
634 browser(), ui::VKEY_TAB, false, false, false, false,
651 browser(), ui::VKEY_END, false, false, false, false));
663 // On the last tab key press, the focus returns to the browser.
665 notification_source = Source<Browser>(browser());
669 browser(), ui::VKEY_TAB, false, true, false, false,
690 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
695 ui_test_utils::NavigateToURL(browser(), url);
699 EXPECT_TRUE(browser()->GetSelectedTabContents()->render_view_host()->view()->
704 new TestInterstitialPage(browser()->GetSelectedTabContents(),
726 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
731 ui_test_utils::NavigateToURL(browser(), url);
738 browser(), ui::VKEY_F, false, false, false, true));
742 browser(), ui::VKEY_F, true, false, false, false));
756 browser()->FocusLocationBar();
762 browser(), ui::VKEY_F, false, false, false, true));
765 browser(), ui::VKEY_F, true, false, false, false));
776 browser(), ui::VKEY_F, false, false, false, true));
779 browser(), ui::VKEY_F, true, false, false, false));
793 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
796 browser()->ShowHistoryTab();
798 browser()->GetSelectedTabContents()));
802 browser()->NewTab();
804 browser()->GetSelectedTabContents()));
808 browser()->ShowDownloadsTab();
810 browser()->GetSelectedTabContents()));
814 browser()->AddSelectedTabWithURL(GURL(chrome::kAboutBlankURL),
817 browser()->GetSelectedTabContents()));
823 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
827 browser()->NewTab();
830 browser()->Reload(CURRENT_TAB);
831 ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser()));
836 ui_test_utils::NavigateToURL(browser(), test_server()->GetURL(kSimplePage));
837 browser()->FocusLocationBar();
839 browser()->Reload(CURRENT_TAB);
840 ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser()));
843 browser()->ShowDownloadsTab();
849 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
853 ui_test_utils::NavigateToURL(browser(), test_server()->GetURL(kSimplePage));
854 ui_test_utils::CrashTab(browser()->GetSelectedTabContents());
855 browser()->Reload(CURRENT_TAB);
856 ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser()));
859 browser()->ShowDownloadsTab();