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

Side by Side Diff: ash/tooltips/tooltip_controller_unittest.cc

Issue 297503003: Revert: [Refactor] Consolidate the logic for whether a widget can be activated. This is a first ste (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « ash/sticky_keys/sticky_keys_overlay.cc ('k') | ash/touch/touch_observer_hud.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 "ash/shell.h" 5 #include "ash/shell.h"
6 #include "ash/test/ash_test_base.h" 6 #include "ash/test/ash_test_base.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/aura/env.h" 8 #include "ui/aura/env.h"
9 #include "ui/aura/test/event_generator.h" 9 #include "ui/aura/test/event_generator.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 21 matching lines...) Expand all
32 namespace { 32 namespace {
33 33
34 views::Widget* CreateNewWidgetWithBoundsOn(int display, 34 views::Widget* CreateNewWidgetWithBoundsOn(int display,
35 const gfx::Rect& bounds) { 35 const gfx::Rect& bounds) {
36 views::Widget* widget = new views::Widget; 36 views::Widget* widget = new views::Widget;
37 views::Widget::InitParams params; 37 views::Widget::InitParams params;
38 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS; 38 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS;
39 params.accept_events = true; 39 params.accept_events = true;
40 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 40 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
41 params.context = Shell::GetAllRootWindows().at(display); 41 params.context = Shell::GetAllRootWindows().at(display);
42 params.child = true;
42 params.bounds = bounds; 43 params.bounds = bounds;
43 widget->Init(params); 44 widget->Init(params);
44 widget->Show(); 45 widget->Show();
45 return widget; 46 return widget;
46 } 47 }
47 48
48 views::Widget* CreateNewWidgetOn(int display) { 49 views::Widget* CreateNewWidgetOn(int display) {
49 return CreateNewWidgetWithBoundsOn(display, gfx::Rect()); 50 return CreateNewWidgetWithBoundsOn(display, gfx::Rect());
50 } 51 }
51 52
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // be able to show tooltips on the primary display. 170 // be able to show tooltips on the primary display.
170 aura::test::EventGenerator generator1(root_windows[0]); 171 aura::test::EventGenerator generator1(root_windows[0]);
171 generator1.MoveMouseRelativeTo(widget1->GetNativeView(), 172 generator1.MoveMouseRelativeTo(widget1->GetNativeView(),
172 view1->bounds().CenterPoint()); 173 view1->bounds().CenterPoint());
173 helper_->FireTooltipTimer(); 174 helper_->FireTooltipTimer();
174 EXPECT_TRUE(helper_->IsTooltipVisible()); 175 EXPECT_TRUE(helper_->IsTooltipVisible());
175 } 176 }
176 177
177 } // namespace test 178 } // namespace test
178 } // namespace ash 179 } // namespace ash
OLDNEW
« no previous file with comments | « ash/sticky_keys/sticky_keys_overlay.cc ('k') | ash/touch/touch_observer_hud.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698