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

Unified Diff: ui/views/test/views_test_helper_mac.mm

Issue 378663002: MacViews: Disable animations when running views_unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Create ViewsTestHelperMac Created 6 years, 5 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/views_test_helper_mac.h ('k') | ui/views/views.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/views_test_helper_mac.mm
diff --git a/ui/views/test/views_test_helper.cc b/ui/views/test/views_test_helper_mac.mm
similarity index 51%
copy from ui/views/test/views_test_helper.cc
copy to ui/views/test/views_test_helper_mac.mm
index c0268f4402752a32e11a85c9dcb2ac4c2ec57df6..b0eb85aadd2468741ffe64e8fd0c85461a2f50e4 100644
--- a/ui/views/test/views_test_helper.cc
+++ b/ui/views/test/views_test_helper_mac.mm
@@ -2,32 +2,24 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/views/test/views_test_helper.h"
+#include "ui/views/test/views_test_helper_mac.h"
+
+#include "ui/compositor/scoped_animation_duration_scale_mode.h"
namespace views {
-#if !defined(USE_AURA)
// static
ViewsTestHelper* ViewsTestHelper::Create(base::MessageLoopForUI* message_loop,
ui::ContextFactory* context_factory) {
- return new ViewsTestHelper;
-}
-#endif
-
-ViewsTestHelper::ViewsTestHelper() {
-}
-
-ViewsTestHelper::~ViewsTestHelper() {
-}
-
-void ViewsTestHelper::SetUp() {
+ return new ViewsTestHelperMac;
}
-void ViewsTestHelper::TearDown() {
+ViewsTestHelperMac::ViewsTestHelperMac()
+ : zero_duration_mode_(new ui::ScopedAnimationDurationScaleMode(
+ ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)) {
}
-gfx::NativeView ViewsTestHelper::GetContext() {
- return NULL;
+ViewsTestHelperMac::~ViewsTestHelperMac() {
}
} // namespace views
« no previous file with comments | « ui/views/test/views_test_helper_mac.h ('k') | ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698