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

Unified Diff: chrome/browser/ui/browser_focus_uitest.cc

Issue 642143004: [Cocoa] Make TabContentsContainerView more testable for interactive_ui_tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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
Index: chrome/browser/ui/browser_focus_uitest.cc
diff --git a/chrome/browser/ui/browser_focus_uitest.cc b/chrome/browser/ui/browser_focus_uitest.cc
index 40f349a8257d9ffe670ff74d8cd6326cd147c64e..cdc1f4da9d55d31494d174395bc7bca65e124122 100644
--- a/chrome/browser/ui/browser_focus_uitest.cc
+++ b/chrome/browser/ui/browser_focus_uitest.cc
@@ -97,9 +97,22 @@ class BrowserFocusTest : public InProcessBrowserTest {
for (size_t i = 0; i < 2; ++i) {
SCOPED_TRACE(base::StringPrintf("focus outer loop: %" PRIuS, i));
ASSERT_TRUE(IsViewFocused(VIEW_ID_OMNIBOX));
+
// Mac requires an extra Tab key press to traverse the app menu button
- // iff "Full Keyboard Access" is enabled. This test code should probably
- // check the setting via NSApplication's isFullKeyboardAccessEnabled.
+ // iff "Full Keyboard Access" is enabled. In reverse, four Tab key presses
+ // are required to traverse the back/forward buttons and the tab strip.
+#if defined(OS_MACOSX)
+ if (ui_controls::IsFullKeyboardAccessEnabled()) {
+ ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
+ browser(), key, false, reverse, false, false));
+ if (reverse) {
+ for (int j = 0; j < 3; ++j) {
+ ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
+ browser(), key, false, reverse, false, false));
+ }
+ }
+ }
+#endif
for (size_t j = 0; j < arraysize(kExpectedIDs); ++j) {
SCOPED_TRACE(base::StringPrintf("focus inner loop %" PRIuS, j));

Powered by Google App Engine
This is Rietveld 408576698