| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |