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

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

Issue 2488393003: Changes views_aura_mus_unittests to create DesktopNativeWidgetAura (Closed)
Patch Set: remove this and fix mac Created 4 years, 1 month 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/mus/mus_client.cc ('k') | ui/views/mus/views_mus_test_suite.cc » ('j') | 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 4128945662e942f6fefd37c279332cc9c621159d..eb9410011cf5f4c558335286ee27237aa7aa0f02 100644
--- a/ui/views/mus/views_aura_mus_test_suite.cc
+++ b/ui/views/mus/views_aura_mus_test_suite.cc
@@ -19,11 +19,13 @@
#include "services/service_manager/public/cpp/service_context.h"
#include "services/ui/common/switches.h"
#include "testing/gtest/include/gtest/gtest.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"
#include "ui/views/test/platform_test_helper.h"
#include "ui/views/test/views_test_helper_aura.h"
#include "ui/views/views_delegate.h"
+#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
namespace views {
namespace {
@@ -64,6 +66,11 @@ class PlatformTestHelperMus : public PlatformTestHelper {
static_cast<ViewsTestHelperAura*>(helper)->EnableMusWithWindowTreeClient(
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();
+ }
private:
std::unique_ptr<MusClient> mus_client_;
@@ -152,7 +159,8 @@ class ServiceManagerConnection {
wait->Signal();
}
- // Returns the name of the test executable, e.g. "exe:views_mus_unittests".
+ // Returns the name of the test executable, e.g.
+ // "exe:views_aura_mus_unittests".
std::string GetTestName() {
base::FilePath executable = base::CommandLine::ForCurrentProcess()
->GetProgram()
« no previous file with comments | « ui/views/mus/mus_client.cc ('k') | ui/views/mus/views_mus_test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698