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

Unified Diff: ash/root_window_controller_unittest.cc

Issue 11795004: Continue threading context through unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/extended_desktop_unittest.cc ('k') | ash/screen_ash_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller_unittest.cc
diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc
index 793e03c22f82b5d0ec7fa894fa811c26368ee569..8dac9d32d66c0b0ba1d2efb87cb820280d7f6a76 100644
--- a/ash/root_window_controller_unittest.cc
+++ b/ash/root_window_controller_unittest.cc
@@ -76,41 +76,42 @@ class DeleteOnBlurDelegate : public aura::test::TestWindowDelegate,
DISALLOW_COPY_AND_ASSIGN(DeleteOnBlurDelegate);
};
-views::Widget* CreateTestWidget(const gfx::Rect& bounds) {
- views::Widget* widget =
- views::Widget::CreateWindowWithBounds(NULL, bounds);
- widget->Show();
- return widget;
-}
-
-views::Widget* CreateModalWidget(const gfx::Rect& bounds) {
- views::Widget* widget =
- views::Widget::CreateWindowWithBounds(new TestDelegate(true), bounds);
- widget->Show();
- return widget;
-}
+} // namespace
-views::Widget* CreateModalWidgetWithParent(const gfx::Rect& bounds,
- gfx::NativeWindow parent) {
- views::Widget* widget =
- views::Widget::CreateWindowWithParentAndBounds(new TestDelegate(true),
- parent,
- bounds);
- widget->Show();
- return widget;
-}
+namespace test {
-aura::Window* GetModalContainer(aura::RootWindow* root_window) {
- return Shell::GetContainer(
- root_window,
- ash::internal::kShellWindowId_SystemModalContainer);
-}
+class RootWindowControllerTest : public test::AshTestBase {
+ public:
+ views::Widget* CreateTestWidget(const gfx::Rect& bounds) {
+ views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds(
+ NULL, CurrentContext(), bounds);
+ widget->Show();
+ return widget;
+ }
-} // namespace
+ views::Widget* CreateModalWidget(const gfx::Rect& bounds) {
+ views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds(
+ new TestDelegate(true), CurrentContext(), bounds);
+ widget->Show();
+ return widget;
+ }
-namespace test {
+ views::Widget* CreateModalWidgetWithParent(const gfx::Rect& bounds,
+ gfx::NativeWindow parent) {
+ views::Widget* widget =
+ views::Widget::CreateWindowWithParentAndBounds(new TestDelegate(true),
+ parent,
+ bounds);
+ widget->Show();
+ return widget;
+ }
-typedef test::AshTestBase RootWindowControllerTest;
+ aura::Window* GetModalContainer(aura::RootWindow* root_window) {
+ return Shell::GetContainer(
+ root_window,
+ ash::internal::kShellWindowId_SystemModalContainer);
+ }
+};
TEST_F(RootWindowControllerTest, MoveWindows_Basic) {
UpdateDisplay("600x600,500x500");
« no previous file with comments | « ash/extended_desktop_unittest.cc ('k') | ash/screen_ash_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698