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

Side by Side Diff: ui/views/bubble/bubble_delegate_unittest.cc

Issue 103493005: Rename View::set_focusable and View::set_accessibility_focusable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a few missing files Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/message_center/views/padded_button.cc ('k') | ui/views/color_chooser/color_chooser_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/run_loop.h" 5 #include "base/run_loop.h"
6 #include "ui/base/hit_test.h" 6 #include "ui/base/hit_test.h"
7 #include "ui/views/bubble/bubble_delegate.h" 7 #include "ui/views/bubble/bubble_delegate.h"
8 #include "ui/views/bubble/bubble_frame_view.h" 8 #include "ui/views/bubble/bubble_frame_view.h"
9 #include "ui/views/test/test_widget_observer.h" 9 #include "ui/views/test/test_widget_observer.h"
10 #include "ui/views/test/views_test_base.h" 10 #include "ui/views/test/views_test_base.h"
11 #include "ui/views/widget/widget.h" 11 #include "ui/views/widget/widget.h"
12 #include "ui/views/widget/widget_observer.h" 12 #include "ui/views/widget/widget_observer.h"
13 13
14 #if defined(USE_AURA) 14 #if defined(USE_AURA)
15 #include "ui/aura/env.h" 15 #include "ui/aura/env.h"
16 #endif 16 #endif
17 17
18 namespace views { 18 namespace views {
19 19
20 namespace { 20 namespace {
21 21
22 class TestBubbleDelegateView : public BubbleDelegateView { 22 class TestBubbleDelegateView : public BubbleDelegateView {
23 public: 23 public:
24 TestBubbleDelegateView(View* anchor_view) 24 TestBubbleDelegateView(View* anchor_view)
25 : BubbleDelegateView(anchor_view, BubbleBorder::TOP_LEFT), 25 : BubbleDelegateView(anchor_view, BubbleBorder::TOP_LEFT),
26 view_(new View()) { 26 view_(new View()) {
27 view_->set_focusable(true); 27 view_->SetFocusable(true);
28 AddChildView(view_); 28 AddChildView(view_);
29 } 29 }
30 virtual ~TestBubbleDelegateView() {} 30 virtual ~TestBubbleDelegateView() {}
31 31
32 void SetAnchorRectForTest(gfx::Rect rect) { 32 void SetAnchorRectForTest(gfx::Rect rect) {
33 SetAnchorRect(rect); 33 SetAnchorRect(rect);
34 } 34 }
35 35
36 void SetAnchorViewForTest(View* view) { 36 void SetAnchorViewForTest(View* view) {
37 SetAnchorView(view); 37 SetAnchorView(view);
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 bubble_widget->GetFocusManager()->GetFocusedView()); 311 bubble_widget->GetFocusManager()->GetFocusedView());
312 312
313 Observe(bubble_widget); 313 Observe(bubble_widget);
314 314
315 bubble_delegate->StartFade(false); 315 bubble_delegate->StartFade(false);
316 RunNestedLoop(); 316 RunNestedLoop();
317 EXPECT_TRUE(bubble_destroyed()); 317 EXPECT_TRUE(bubble_destroyed());
318 } 318 }
319 319
320 } // namespace views 320 } // namespace views
OLDNEW
« no previous file with comments | « ui/message_center/views/padded_button.cc ('k') | ui/views/color_chooser/color_chooser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698