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

Unified Diff: chrome/browser/browser_focus_uitest.cc

Issue 8821005: Revert 113110 - backing out 113015 didn't fix the interactive test bot. Restoring the CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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/test/base/ui_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_focus_uitest.cc
===================================================================
--- chrome/browser/browser_focus_uitest.cc (revision 113117)
+++ chrome/browser/browser_focus_uitest.cc (working copy)
@@ -26,7 +26,6 @@
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/view_messages.h"
#include "content/public/browser/notification_service.h"
#include "net/test/test_server.h"
@@ -64,9 +63,9 @@
#define MAYBE_TabsRememberFocusFindInPage FAILS_TabsRememberFocusFindInPage
#elif defined(OS_WIN)
// Disabled, http://crbug.com/62543.
-#define MAYBE_FocusTraversal DISABLED_FocusTraversal
+#define MAYBE_FocusTraversal FocusTraversal
// Disabled, http://crbug.com/62544.
-#define MAYBE_FocusTraversalOnInterstitial DISABLED_FocusTraversalOnInterstitial
+#define MAYBE_FocusTraversalOnInterstitial FocusTraversalOnInterstitial
// Flaky, http://crbug.com/62537.
#define MAYBE_TabsRememberFocusFindInPage FLAKY_TabsRememberFocusFindInPage
#endif
@@ -173,23 +172,6 @@
return render_view_host()->view()->HasFocus();
}
- protected:
- bool OnMessageReceived(const IPC::Message& message) {
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(TestInterstitialPage, message)
- IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged)
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
- return handled;
- }
-
- void OnFocusedNodeChanged(bool is_editable_node) {
- content::NotificationService::current()->Notify(
- content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
- content::Source<TabContents>(tab()),
- content::Details<const bool>(&is_editable_node));
- }
-
private:
std::string html_contents_;
};
@@ -511,8 +493,8 @@
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWaitWithDetails(
browser(), ui::VKEY_TAB, false, false, false, false,
content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
- content::NotificationSource(content::Source<TabContents>(
- browser()->GetSelectedTabContents())),
+ content::NotificationSource(content::Source<RenderViewHost>(
+ browser()->GetSelectedTabContents()->render_view_host())),
details));
} else {
// On the last tab key press, the focus returns to the browser.
@@ -554,8 +536,8 @@
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWaitWithDetails(
browser(), ui::VKEY_TAB, false, true, false, false,
content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
- content::NotificationSource(content::Source<TabContents>(
- browser()->GetSelectedTabContents())),
+ content::NotificationSource(content::Source<RenderViewHost>(
+ browser()->GetSelectedTabContents()->render_view_host())),
details));
} else {
// On the last tab key press, the focus returns to the browser.
@@ -638,8 +620,8 @@
content::NotificationService::AllSources();
if (j < arraysize(kExpElementIDs) - 1) {
notification_type = content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE;
- notification_source = content::Source<TabContents>(
- interstitial_page->tab());
+ notification_source = content::Source<RenderViewHost>(
+ interstitial_page->render_view_host());
} else {
// On the last tab key press, the focus returns to the browser.
notification_type = chrome::NOTIFICATION_FOCUS_RETURNED_TO_BROWSER;
@@ -673,8 +655,8 @@
content::NotificationService::AllSources();
if (j < arraysize(kExpElementIDs) - 1) {
notification_type = content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE;
- notification_source = content::Source<TabContents>(
- interstitial_page->tab());
+ notification_source = content::Source<RenderViewHost>(
+ interstitial_page->render_view_host());
} else {
// On the last tab key press, the focus returns to the browser.
notification_type = chrome::NOTIFICATION_FOCUS_RETURNED_TO_BROWSER;
« no previous file with comments | « no previous file | chrome/test/base/ui_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698