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

Unified Diff: ui/views/mus/views_aura_mus_test_suite.cc

Issue 2562633004: Wires up SimulateNativeDestroy for views-aura-mus (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/views_aura_mus_test_suite.cc
diff --git a/ui/views/mus/views_aura_mus_test_suite.cc b/ui/views/mus/views_aura_mus_test_suite.cc
index 2278b949d03d5c01ac0cb820a43679ee71df8148..19fc23864976b6748638ac7ddcf4e685da0d3435 100644
--- a/ui/views/mus/views_aura_mus_test_suite.cc
+++ b/ui/views/mus/views_aura_mus_test_suite.cc
@@ -19,7 +19,9 @@
#include "services/service_manager/public/cpp/service_context.h"
#include "services/ui/common/switches.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/aura/mus/window_tree_host_mus.h"
#include "ui/aura/test/env_test_helper.h"
+#include "ui/aura/window.h"
#include "ui/views/mus/desktop_window_tree_host_mus.h"
#include "ui/views/mus/mus_client.h"
#include "ui/views/mus/test_utils.h"
@@ -71,9 +73,11 @@ class PlatformTestHelperMus : public PlatformTestHelper {
mus_client_->window_tree_client());
}
void SimulateNativeDestroy(Widget* widget) override {
- // TODO: this should call through to a WindowTreeClientDelegate
- // function that destroys the WindowTreeHost. http://crbug.com/663868.
- widget->CloseNow();
+ aura::WindowTreeHostMus* window_tree_host =
+ static_cast<aura::WindowTreeHostMus*>(
+ widget->GetNativeView()->GetHost());
+ static_cast<aura::WindowTreeClientDelegate*>(mus_client_.get())
msw 2016/12/08 20:16:38 Unfortunate that we need to cast; hopefully that's
+ ->OnEmbedRootDestroyed(window_tree_host);
}
private:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698