| Index: ui/views/test/platform_test_helper.cc
|
| diff --git a/ui/views/test/platform_test_helper.cc b/ui/views/test/platform_test_helper.cc
|
| index b6626189fa390b2141ef70e1ff3704344714770f..fc461f531429d2a68f495fdf107410c1574cff9f 100644
|
| --- a/ui/views/test/platform_test_helper.cc
|
| +++ b/ui/views/test/platform_test_helper.cc
|
| @@ -7,19 +7,30 @@
|
| #include "base/callback.h"
|
| #include "base/logging.h"
|
| #include "base/memory/ptr_util.h"
|
| +#include "ui/views/widget/widget.h"
|
| +
|
| +#if defined(USE_AURA)
|
| +#include "ui/aura/window.h"
|
| +#endif
|
|
|
| namespace views {
|
| namespace {
|
|
|
| +#if defined(USE_AURA)
|
| class DefaultPlatformTestHelper : public PlatformTestHelper {
|
| public:
|
| DefaultPlatformTestHelper() {}
|
| -
|
| ~DefaultPlatformTestHelper() override {}
|
|
|
| + // PlatformTestHelper:
|
| + void SimulateNativeDestroy(Widget* widget) override {
|
| + delete widget->GetNativeView();
|
| + }
|
| +
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(DefaultPlatformTestHelper);
|
| };
|
| +#endif
|
|
|
| PlatformTestHelper::Factory test_helper_factory;
|
| bool is_mus = false;
|
| @@ -32,12 +43,14 @@ void PlatformTestHelper::set_factory(const Factory& factory) {
|
| test_helper_factory = factory;
|
| }
|
|
|
| +#if defined(USE_AURA)
|
| // static
|
| std::unique_ptr<PlatformTestHelper> PlatformTestHelper::Create() {
|
| return !test_helper_factory.is_null()
|
| ? test_helper_factory.Run()
|
| : base::WrapUnique(new DefaultPlatformTestHelper);
|
| }
|
| +#endif
|
|
|
| // static
|
| void PlatformTestHelper::SetIsMus() {
|
|
|