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

Unified Diff: chrome/browser/browser_focus_uitest.cc

Issue 6277020: keyboard: Update the visibility after tab-switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 9 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_focus_uitest.cc
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index 246ccad4e33fa1715d7b4dd14cdf1286dfde3112..9bd27da34a013cb49d6b4b9dc16d70f00f124eba 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -154,12 +154,16 @@ class TestInterstitialPage : public InterstitialPage {
return html_contents_;
}
- // Exposing render_view_host() to be public; it is declared as protected in
- // the superclass.
+ // Exposing render_view_host() and tab() to be public; they are declared as
+ // protected in the superclass.
virtual RenderViewHost* render_view_host() {
return InterstitialPage::render_view_host();
}
+ virtual TabContents* tab() {
+ return InterstitialPage::tab();
+ }
+
bool HasFocus() {
return render_view_host()->view()->HasFocus();
}
@@ -168,7 +172,7 @@ class TestInterstitialPage : public InterstitialPage {
virtual void FocusedNodeChanged(bool is_editable_node) {
NotificationService::current()->Notify(
NotificationType::FOCUS_CHANGED_IN_PAGE,
- Source<RenderViewHost>(render_view_host()),
+ Source<TabContents>(tab()),
Details<const bool>(&is_editable_node));
}
@@ -487,8 +491,8 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversal) {
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWaitWithDetails(
browser(), ui::VKEY_TAB, false, false, false, false,
NotificationType::FOCUS_CHANGED_IN_PAGE,
- NotificationSource(Source<RenderViewHost>(
- browser()->GetSelectedTabContents()->render_view_host())),
+ NotificationSource(Source<TabContents>(
+ browser()->GetSelectedTabContents())),
details));
} else {
// On the last tab key press, the focus returns to the browser.
@@ -526,8 +530,8 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversal) {
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWaitWithDetails(
browser(), ui::VKEY_TAB, false, true, false, false,
NotificationType::FOCUS_CHANGED_IN_PAGE,
- NotificationSource(Source<RenderViewHost>(
- browser()->GetSelectedTabContents()->render_view_host())),
+ NotificationSource(Source<TabContents>(
+ browser()->GetSelectedTabContents())),
details));
} else {
// On the last tab key press, the focus returns to the browser.
@@ -606,8 +610,8 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversalOnInterstitial) {
NotificationService::AllSources();
if (j < arraysize(kExpElementIDs) - 1) {
notification_type = NotificationType::FOCUS_CHANGED_IN_PAGE;
- notification_source = Source<RenderViewHost>(
- interstitial_page->render_view_host());
+ notification_source = Source<TabContents>(
+ interstitial_page->tab());
} else {
// On the last tab key press, the focus returns to the browser.
notification_type = NotificationType::FOCUS_RETURNED_TO_BROWSER;
@@ -637,8 +641,8 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversalOnInterstitial) {
NotificationService::AllSources();
if (j < arraysize(kExpElementIDs) - 1) {
notification_type = NotificationType::FOCUS_CHANGED_IN_PAGE;
- notification_source = Source<RenderViewHost>(
- interstitial_page->render_view_host());
+ notification_source = Source<TabContents>(
+ interstitial_page->tab());
} else {
// On the last tab key press, the focus returns to the browser.
notification_type = NotificationType::FOCUS_RETURNED_TO_BROWSER;
« no previous file with comments | « no previous file | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698