summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ash/ash_switches.cc3
-rw-r--r--ash/ash_switches.h1
-rw-r--r--ash/wm/window_animations.cc7
-rw-r--r--chrome/browser/mouseleave_interactive_uitest.cc2
-rw-r--r--chrome/test/base/in_process_browser_test.cc13
-rw-r--r--chrome/test/base/test_launcher_utils.cc13
6 files changed, 23 insertions, 16 deletions
diff --git a/ash/ash_switches.cc b/ash/ash_switches.cc
index 068e173..44e1737 100644
--- a/ash/ash_switches.cc
+++ b/ash/ash_switches.cc
@@ -31,6 +31,9 @@ const char kAuraNoShadows[] = "aura-no-shadows";
// Use Aura-style translucent window frame.
const char kAuraTranslucentFrames[] = "aura-translucent-frames";
+// If present animations are disabled.
+const char kAuraWindowAnimationsDisabled[] = "aura-window-animations-disabled";
+
// Use a custom window style, e.g. --aura-window-mode=compact.
// When this flag is not passed we default to "overlapping" mode.
const char kAuraWindowMode[] = "aura-window-mode";
diff --git a/ash/ash_switches.h b/ash/ash_switches.h
index 2fa7780..3759607 100644
--- a/ash/ash_switches.h
+++ b/ash/ash_switches.h
@@ -17,6 +17,7 @@ ASH_EXPORT extern const char kAuraGoogleDialogFrames[];
ASH_EXPORT extern const char kAuraLegacyPowerButton[];
ASH_EXPORT extern const char kAuraNoShadows[];
ASH_EXPORT extern const char kAuraTranslucentFrames[];
+ASH_EXPORT extern const char kAuraWindowAnimationsDisabled[];
ASH_EXPORT extern const char kAuraWindowMode[];
ASH_EXPORT extern const char kAuraWindowModeCompact[];
ASH_EXPORT extern const char kAuraWindowModeManaged[];
diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc
index 5c4c3a4..c2deef2 100644
--- a/ash/wm/window_animations.cc
+++ b/ash/wm/window_animations.cc
@@ -4,6 +4,8 @@
#include "ash/wm/window_animations.h"
+#include "ash/ash_switches.h"
+#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/message_loop.h"
@@ -273,8 +275,11 @@ bool AnimateHideWindow(aura::Window* window) {
// WindowAnimation, public:
bool AnimateOnChildWindowVisibilityChanged(aura::Window* window, bool visible) {
- if (window->GetIntProperty(aura::client::kAnimationsDisabledKey) == 1)
+ if (window->GetIntProperty(aura::client::kAnimationsDisabledKey) == 1 ||
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAuraWindowAnimationsDisabled)) {
return false;
+ }
if (visible) {
return AnimateShowWindow(window);
} else {
diff --git a/chrome/browser/mouseleave_interactive_uitest.cc b/chrome/browser/mouseleave_interactive_uitest.cc
index f0c6761..7d2fee8 100644
--- a/chrome/browser/mouseleave_interactive_uitest.cc
+++ b/chrome/browser/mouseleave_interactive_uitest.cc
@@ -26,7 +26,7 @@ class MouseLeaveTest : public UITest {
DISALLOW_COPY_AND_ASSIGN(MouseLeaveTest);
};
-#if defined(OS_MACOSX) || (defined(OS_CHROMEOS) && defined(USE_AURA))
+#if defined(OS_MACOSX)
// Missing automation provider support: http://crbug.com/45892
// Failing on Chrome OS Aura: http://crbug.com/111086
#define MAYBE_TestOnMouseOut DISABLED_TestOnMouseOut
diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
index f5ef96f..89d0e56 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -44,11 +44,6 @@
#include "base/mac/scoped_nsautorelease_pool.h"
#endif
-#if defined(USE_AURA)
-#include "ui/aura/root_window.h"
-#include "ui/views/widget/widget.h"
-#endif
-
namespace {
// Passed as value of kTestType.
@@ -254,14 +249,6 @@ void InProcessBrowserTest::AddBlankTabAndShow(Browser* browser) {
GURL(chrome::kAboutBlankURL), content::PAGE_TRANSITION_START_PAGE);
observer.Wait();
-#if defined(USE_AURA)
- // Disable animations on aura, otherwise any code that gets the bounds may get
- // the wrong thing.
- views::Widget* widget = views::Widget::GetWidgetForNativeView(
- browser->window()->GetNativeHandle());
- widget->SetVisibilityChangedAnimationsEnabled(false);
-#endif
-
browser->window()->Show();
}
diff --git a/chrome/test/base/test_launcher_utils.cc b/chrome/test/base/test_launcher_utils.cc
index 1560966..d675767 100644
--- a/chrome/test/base/test_launcher_utils.cc
+++ b/chrome/test/base/test_launcher_utils.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -14,6 +14,10 @@
#include "chrome/common/chrome_switches.h"
#include "ui/gfx/gl/gl_switches.h"
+#if defined(USE_AURA)
+#include "ash/ash_switches.h"
+#endif
+
namespace test_launcher_utils {
void PrepareBrowserCommandLineForTests(CommandLine* command_line) {
@@ -48,6 +52,13 @@ void PrepareBrowserCommandLineForTests(CommandLine* command_line) {
// The tests assume that file:// URIs can freely access other file:// URIs.
command_line->AppendSwitch(switches::kAllowFileAccessFromFiles);
+ // TODO(beng): USE_ASH.
+#if defined(USE_AURA)
+ // Disable window animations under aura as the animations effect the
+ // coordinates returned and result in flake.
+ command_line->AppendSwitch(ash::switches::kAuraWindowAnimationsDisabled);
+#endif
+
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
// Don't use the native password stores on Linux since they may
// prompt for additional UI during tests and cause test failures or