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

Unified Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc

Issue 280483003: wm: Change the DispatcherClient interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self-nit 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc
index 30dc551f913c58cbebb587f6aa7df8dad3635e9a..4469364e159551b6c79298f9d55f86f176c6a446 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc
@@ -189,8 +189,8 @@ TEST_F(DesktopNativeWidgetAuraTest, DontAccessContentWindowDuringDestruction) {
}
void QuitNestedLoopAndCloseWidget(scoped_ptr<Widget> widget,
- aura::client::DispatcherClient* client) {
- client->QuitNestedMessageLoop();
+ base::Closure* quit_runloop) {
+ quit_runloop->Run();
}
// Verifies that a widget can be destroyed when running a nested message-loop.
@@ -211,9 +211,13 @@ TEST_F(DesktopNativeWidgetAuraTest, WidgetCanBeDestroyedFromNestedLoop) {
// Post a task that terminates the nested loop and destroyes the widget. This
// task will be executed from the nested loop initiated with the call to
// |RunWithDispatcher()| below.
+ aura::client::DispatcherRunLoop run_loop(client, NULL);
+ base::Closure quit_runloop = run_loop.QuitClosure();
message_loop()->PostTask(FROM_HERE,
- base::Bind(&QuitNestedLoopAndCloseWidget, base::Passed(&widget), client));
- client->RunWithDispatcher(NULL);
+ base::Bind(&QuitNestedLoopAndCloseWidget,
+ base::Passed(&widget),
+ base::Unretained(&quit_runloop)));
+ run_loop.Run();
}
} // namespace views

Powered by Google App Engine
This is Rietveld 408576698