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

Side by Side Diff: chrome/browser/apps/guest_view/web_view_browsertest.cc

Issue 1690543004: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <queue> 5 #include <queue>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 2971 matching lines...) Expand 10 before | Expand all | Expand 10 after
2982 EXPECT_TRUE(widget->GetRootView()); 2982 EXPECT_TRUE(widget->GetRootView());
2983 // We only expect a single views::webview in the view hierarchy. 2983 // We only expect a single views::webview in the view hierarchy.
2984 views::View* aura_webview = FindWebView(widget->GetRootView()); 2984 views::View* aura_webview = FindWebView(widget->GetRootView());
2985 ASSERT_TRUE(aura_webview); 2985 ASSERT_TRUE(aura_webview);
2986 gfx::Rect bounds(aura_webview->bounds()); 2986 gfx::Rect bounds(aura_webview->bounds());
2987 EXPECT_TRUE(aura_webview->IsFocusable()); 2987 EXPECT_TRUE(aura_webview->IsFocusable());
2988 2988
2989 views::View* other_focusable_view = new views::View(); 2989 views::View* other_focusable_view = new views::View();
2990 other_focusable_view->SetBounds(bounds.x() + bounds.width(), bounds.y(), 100, 2990 other_focusable_view->SetBounds(bounds.x() + bounds.width(), bounds.y(), 100,
2991 100); 2991 100);
2992 other_focusable_view->SetFocusable(true); 2992 other_focusable_view->SetFocusBehavior(views::View::FocusBehavior::ALWAYS);
2993 aura_webview->parent()->AddChildView(other_focusable_view); 2993 aura_webview->parent()->AddChildView(other_focusable_view);
2994 other_focusable_view->SetPosition(gfx::Point(bounds.x() + bounds.width(), 0)); 2994 other_focusable_view->SetPosition(gfx::Point(bounds.x() + bounds.width(), 0));
2995 2995
2996 // Sync changes to compositor. 2996 // Sync changes to compositor.
2997 ForceCompositorFrame(); 2997 ForceCompositorFrame();
2998 2998
2999 aura_webview->RequestFocus(); 2999 aura_webview->RequestFocus();
3000 // Verify that other_focusable_view can steal focus from aura_webview. 3000 // Verify that other_focusable_view can steal focus from aura_webview.
3001 EXPECT_TRUE(aura_webview->HasFocus()); 3001 EXPECT_TRUE(aura_webview->HasFocus());
3002 other_focusable_view->RequestFocus(); 3002 other_focusable_view->RequestFocus();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
3101 // 4 tasks expected. The order is arbitrary. 3101 // 4 tasks expected. The order is arbitrary.
3102 // Tab: about:blank, 3102 // Tab: about:blank,
3103 // Background Page: <webview> task manager test, 3103 // Background Page: <webview> task manager test,
3104 // App: <webview> task manager test, 3104 // App: <webview> task manager test,
3105 // Webview: WebViewed test content. 3105 // Webview: WebViewed test content.
3106 EXPECT_EQ(4U, task_manager.tasks().size()); 3106 EXPECT_EQ(4U, task_manager.tasks().size());
3107 EXPECT_TRUE(HasExpectedGuestTask(task_manager, guest_contents)); 3107 EXPECT_TRUE(HasExpectedGuestTask(task_manager, guest_contents));
3108 } 3108 }
3109 3109
3110 #endif // defined(ENABLE_TASK_MANAGER) 3110 #endif // defined(ENABLE_TASK_MANAGER)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698