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

Side by Side Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 1396083003: Don't use base::MessageLoop::{Quit,QuitClosure} in ash/, chromeos/, device/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « ash/drag_drop/drag_drop_interactive_uitest.cc ('k') | ash/shell/shell_delegate_impl.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/shelf/shelf_layout_manager.h" 5 #include "ash/shelf/shelf_layout_manager.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/accelerators/accelerator_table.h" 8 #include "ash/accelerators/accelerator_table.h"
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 // views::WidgetObserver override. 109 // views::WidgetObserver override.
110 void OnWidgetBoundsChanged(views::Widget* widget, 110 void OnWidgetBoundsChanged(views::Widget* widget,
111 const gfx::Rect& new_bounds) override { 111 const gfx::Rect& new_bounds) override {
112 if (done_waiting_) 112 if (done_waiting_)
113 return; 113 return;
114 114
115 ++animation_steps_; 115 ++animation_steps_;
116 if (IsDoneAnimating()) { 116 if (IsDoneAnimating()) {
117 done_waiting_ = true; 117 done_waiting_ = true;
118 base::MessageLoop::current()->Quit(); 118 base::MessageLoop::current()->QuitWhenIdle();
119 } 119 }
120 } 120 }
121 121
122 gfx::Rect target_bounds_; 122 gfx::Rect target_bounds_;
123 int animation_steps_; 123 int animation_steps_;
124 bool done_waiting_; 124 bool done_waiting_;
125 125
126 DISALLOW_COPY_AND_ASSIGN(ShelfAnimationWaiter); 126 DISALLOW_COPY_AND_ASSIGN(ShelfAnimationWaiter);
127 }; 127 };
128 128
(...skipping 2227 matching lines...) Expand 10 before | Expand all | Expand 10 after
2356 StatusAreaWidget* status_area_widget = 2356 StatusAreaWidget* status_area_widget =
2357 Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget(); 2357 Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget();
2358 EXPECT_TRUE(status_area_widget->IsVisible()); 2358 EXPECT_TRUE(status_area_widget->IsVisible());
2359 // Shelf should be in the first display's area. 2359 // Shelf should be in the first display's area.
2360 // TODO: make this test more robust against changes in font, font size. 2360 // TODO: make this test more robust against changes in font, font size.
2361 EXPECT_EQ("353,453 147x47", 2361 EXPECT_EQ("353,453 147x47",
2362 status_area_widget->GetWindowBoundsInScreen().ToString()); 2362 status_area_widget->GetWindowBoundsInScreen().ToString());
2363 } 2363 }
2364 2364
2365 } // namespace ash 2365 } // namespace ash
OLDNEW
« no previous file with comments | « ash/drag_drop/drag_drop_interactive_uitest.cc ('k') | ash/shell/shell_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698