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

Side by Side Diff: ui/views/widget/widget_unittest.cc

Issue 11885030: Enable the FocusController on DesktopAura too. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_root_window_host_win.cc ('k') | no next file » | 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/base/events/event_utils.h" 10 #include "ui/base/events/event_utils.h"
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 #if !defined(OS_CHROMEOS) 1177 #if !defined(OS_CHROMEOS)
1178 init_params.native_widget = new DesktopNativeWidgetAura(&widget); 1178 init_params.native_widget = new DesktopNativeWidgetAura(&widget);
1179 #endif 1179 #endif
1180 widget.Init(init_params); 1180 widget.Init(init_params);
1181 widget.SetContentsView(contents_view); 1181 widget.SetContentsView(contents_view);
1182 widget.Show(); 1182 widget.Show();
1183 widget.Activate(); 1183 widget.Activate();
1184 contents_view->RequestFocus(); 1184 contents_view->RequestFocus();
1185 EXPECT_TRUE(contents_view->HasFocus()); 1185 EXPECT_TRUE(contents_view->HasFocus());
1186 1186
1187 // Show a buble. 1187 // Show a bubble.
1188 BubbleDelegateView* bubble_delegate_view = 1188 BubbleDelegateView* bubble_delegate_view =
1189 new BubbleDelegateView(contents_view, BubbleBorder::TOP_LEFT); 1189 new BubbleDelegateView(contents_view, BubbleBorder::TOP_LEFT);
1190 bubble_delegate_view->set_focusable(true); 1190 bubble_delegate_view->set_focusable(true);
1191 Widget* bubble_widget = 1191 Widget* bubble_widget =
1192 BubbleDelegateView::CreateBubble(bubble_delegate_view); 1192 BubbleDelegateView::CreateBubble(bubble_delegate_view);
1193 bubble_delegate_view->Show(); 1193 bubble_delegate_view->Show();
1194 bubble_delegate_view->RequestFocus(); 1194 bubble_delegate_view->RequestFocus();
1195 1195
1196 // |contents_view_| should no longer have focus. 1196 // |contents_view_| should no longer have focus.
1197 EXPECT_FALSE(contents_view->HasFocus()); 1197 EXPECT_FALSE(contents_view->HasFocus());
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1405 EXPECT_EQ(1, scroll_view->GetEventCount(ui::ET_GESTURE_SCROLL_BEGIN)); 1405 EXPECT_EQ(1, scroll_view->GetEventCount(ui::ET_GESTURE_SCROLL_BEGIN));
1406 EXPECT_EQ(1, scroll_view->GetEventCount(ui::ET_GESTURE_SCROLL_UPDATE)); 1406 EXPECT_EQ(1, scroll_view->GetEventCount(ui::ET_GESTURE_SCROLL_UPDATE));
1407 EXPECT_EQ(1, scroll_view->GetEventCount(ui::ET_GESTURE_SCROLL_END)); 1407 EXPECT_EQ(1, scroll_view->GetEventCount(ui::ET_GESTURE_SCROLL_END));
1408 } 1408 }
1409 1409
1410 widget->CloseNow(); 1410 widget->CloseNow();
1411 } 1411 }
1412 1412
1413 } // namespace 1413 } // namespace
1414 } // namespace views 1414 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_root_window_host_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698