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

Unified Diff: ash/wm/ash_native_cursor_manager_interactive_uitest.cc

Issue 2400553002: ash: Remove broken display notification suppression when settings is open (Closed)
Patch Set: fix tests Created 4 years, 2 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 | « ash/test/test_system_tray_delegate.cc ('k') | chrome/browser/ui/ash/system_tray_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/ash_native_cursor_manager_interactive_uitest.cc
diff --git a/ash/wm/ash_native_cursor_manager_interactive_uitest.cc b/ash/wm/ash_native_cursor_manager_interactive_uitest.cc
index cfdf03d1f89a41c632528941d3a98806fa5f1eac..cc4c85d74438eca886908db71c54a4f9f7c968bb 100644
--- a/ash/wm/ash_native_cursor_manager_interactive_uitest.cc
+++ b/ash/wm/ash_native_cursor_manager_interactive_uitest.cc
@@ -1,6 +1,7 @@
// Copyright 2013 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.
+
#include "ash/wm/ash_native_cursor_manager.h"
#include "ash/display/display_manager.h"
@@ -13,6 +14,10 @@
#include "ui/base/test/ui_controls.h"
#include "ui/display/manager/managed_display_info.h"
+#if defined(OS_CHROMEOS)
+#include "ash/system/chromeos/screen_layout_observer.h"
+#endif
+
#if defined(USE_X11)
#include <X11/Xlib.h>
@@ -25,6 +30,21 @@ using AshNativeCursorManagerTest = test::AshInteractiveUITestBase;
namespace {
+#if defined(OS_CHROMEOS)
+class ScopedSuppressNotifications {
+ public:
+ ScopedSuppressNotifications() {
+ ScreenLayoutObserver::SuppressNotificationsForTesting(true);
+ }
+ ~ScopedSuppressNotifications() {
+ ScreenLayoutObserver::SuppressNotificationsForTesting(false);
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ScopedSuppressNotifications);
+};
+#endif // defined(OS_CHROMEOS)
+
display::ManagedDisplayInfo CreateDisplayInfo(int64_t id,
const gfx::Rect& bounds,
float device_scale_factor) {
@@ -56,6 +76,12 @@ void MoveMouseSync(aura::Window* window, int x, int y) {
#endif
TEST_F(AshNativeCursorManagerTest, MAYBE_CursorChangeOnEnterNotify) {
+#if defined(OS_CHROMEOS)
+ // Showing notifications causes crashes in Skia due to discardable memory
+ // allocator problems. It's not clear why.
+ ScopedSuppressNotifications suppress_notifications;
oshima 2016/10/11 17:19:00 can you file a bug with a stack?
James Cook 2016/10/11 18:01:04 Added link to bug.
+#endif
+
::wm::CursorManager* cursor_manager = Shell::GetInstance()->cursor_manager();
test::CursorManagerTestApi test_api(cursor_manager);
« no previous file with comments | « ash/test/test_system_tray_delegate.cc ('k') | chrome/browser/ui/ash/system_tray_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698