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

Unified Diff: ui/views/test/widget_test.cc

Issue 2871073002: cros: Bind hangup red button on remote controller to close web dialog (Closed)
Patch Set: nits Created 3 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
« no previous file with comments | « ui/views/test/widget_test.h ('k') | ui/web_dialogs/web_dialog_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/widget_test.cc
diff --git a/ui/views/test/widget_test.cc b/ui/views/test/widget_test.cc
index a96a9db970a7e626486ba275afa1d43365fe2a1d..ec451068cd913fdf8cfdf95f42e56844a76f6000 100644
--- a/ui/views/test/widget_test.cc
+++ b/ui/views/test/widget_test.cc
@@ -186,10 +186,17 @@ WidgetClosingObserver::~WidgetClosingObserver() {
widget_->RemoveObserver(this);
}
+void WidgetClosingObserver::Wait() {
+ if (widget_)
+ run_loop_.Run();
+}
+
void WidgetClosingObserver::OnWidgetClosing(Widget* widget) {
DCHECK_EQ(widget_, widget);
widget_->RemoveObserver(this);
widget_ = nullptr;
+ if (run_loop_.running())
+ run_loop_.Quit();
}
} // namespace test
« no previous file with comments | « ui/views/test/widget_test.h ('k') | ui/web_dialogs/web_dialog_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698