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

Side by Side Diff: chrome/browser/ui/views/constrained_window_views_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <memory> 5 #include <memory>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
(...skipping 14 matching lines...) Expand all
25 #include "ui/views/widget/widget.h" 25 #include "ui/views/widget/widget.h"
26 26
27 #if defined(OS_WIN) 27 #if defined(OS_WIN)
28 #include "base/win/windows_version.h" 28 #include "base/win/windows_version.h"
29 #endif 29 #endif
30 30
31 namespace { 31 namespace {
32 32
33 class TestDialog : public views::DialogDelegateView { 33 class TestDialog : public views::DialogDelegateView {
34 public: 34 public:
35 TestDialog() { SetFocusable(true); } 35 TestDialog() { SetFocusBehavior(views::View::FocusBehavior::ALWAYS); }
36 ~TestDialog() override {} 36 ~TestDialog() override {}
37 37
38 views::View* GetInitiallyFocusedView() override { return this; } 38 views::View* GetInitiallyFocusedView() override { return this; }
39 // Don't delete the delegate yet. Keep it around for inspection later. 39 // Don't delete the delegate yet. Keep it around for inspection later.
40 void DeleteDelegate() override {} 40 void DeleteDelegate() override {}
41 41
42 ui::ModalType GetModalType() const override { return ui::MODAL_TYPE_CHILD; } 42 ui::ModalType GetModalType() const override { return ui::MODAL_TYPE_CHILD; }
43 43
44 private: 44 private:
45 DISALLOW_COPY_AND_ASSIGN(TestDialog); 45 DISALLOW_COPY_AND_ASSIGN(TestDialog);
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 #endif 203 #endif
204 204
205 std::unique_ptr<TestDialog> dialog = 205 std::unique_ptr<TestDialog> dialog =
206 ShowModalDialog(browser()->tab_strip_model()->GetActiveWebContents()); 206 ShowModalDialog(browser()->tab_strip_model()->GetActiveWebContents());
207 EXPECT_TRUE(dialog->GetWidget()->IsVisible()); 207 EXPECT_TRUE(dialog->GetWidget()->IsVisible());
208 EXPECT_TRUE(ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_ESCAPE, 208 EXPECT_TRUE(ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_ESCAPE,
209 false, false, false, false)); 209 false, false, false, false));
210 content::RunAllPendingInMessageLoop(); 210 content::RunAllPendingInMessageLoop();
211 EXPECT_EQ(NULL, dialog->GetWidget()); 211 EXPECT_EQ(NULL, dialog->GetWidget());
212 } 212 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698