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

Unified Diff: ui/views/test/platform_test_helper.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/test/platform_test_helper.h ('k') | ui/views/test/platform_test_helper_cocoa.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..488a9e58fd36bd58e0ccdc38cef2fcebee57fbd6 100644
--- a/ui/views/test/platform_test_helper.cc
+++ b/ui/views/test/platform_test_helper.cc
@@ -7,20 +7,15 @@
#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 {
-class DefaultPlatformTestHelper : public PlatformTestHelper {
- public:
- DefaultPlatformTestHelper() {}
-
- ~DefaultPlatformTestHelper() override {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DefaultPlatformTestHelper);
-};
-
PlatformTestHelper::Factory test_helper_factory;
bool is_mus = false;
bool is_aura_mus_client = false;
@@ -36,7 +31,7 @@ void PlatformTestHelper::set_factory(const Factory& factory) {
std::unique_ptr<PlatformTestHelper> PlatformTestHelper::Create() {
return !test_helper_factory.is_null()
? test_helper_factory.Run()
- : base::WrapUnique(new DefaultPlatformTestHelper);
+ : base::WrapUnique(new PlatformTestHelper);
}
// static
@@ -59,4 +54,10 @@ bool PlatformTestHelper::IsAuraMusClient() {
return is_aura_mus_client;
}
+#if defined(USE_AURA)
+void PlatformTestHelper::SimulateNativeDestroy(Widget* widget) {
+ delete widget->GetNativeView();
+}
+#endif
+
} // namespace views
« no previous file with comments | « ui/views/test/platform_test_helper.h ('k') | ui/views/test/platform_test_helper_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698