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

Side by Side Diff: chrome/browser/ui/panels/old_panel_and_desktop_notification_browsertest.cc

Issue 10689082: Fix flaky linux panel tests related to active state checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove log msg Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "chrome/browser/browser_process.h" 6 #include "chrome/browser/browser_process.h"
7 #include "chrome/browser/notifications/balloon.h" 7 #include "chrome/browser/notifications/balloon.h"
8 #include "chrome/browser/notifications/balloon_collection_impl.h" 8 #include "chrome/browser/notifications/balloon_collection_impl.h"
9 #include "chrome/browser/notifications/desktop_notification_service.h" 9 #include "chrome/browser/notifications/desktop_notification_service.h"
10 #include "chrome/browser/notifications/notification.h" 10 #include "chrome/browser/notifications/notification.h"
11 #include "chrome/browser/notifications/notification_ui_manager.h" 11 #include "chrome/browser/notifications/notification_ui_manager.h"
12 #include "chrome/browser/prefs/pref_service.h" 12 #include "chrome/browser/prefs/pref_service.h"
13 #include "chrome/browser/ui/browser.h" 13 #include "chrome/browser/ui/browser.h"
14 #include "chrome/browser/ui/panels/old_base_panel_browser_test.h" 14 #include "chrome/browser/ui/panels/old_base_panel_browser_test.h"
15 #include "chrome/browser/ui/panels/panel.h" 15 #include "chrome/browser/ui/panels/panel.h"
16 #include "chrome/browser/ui/panels/panel_manager.h" 16 #include "chrome/browser/ui/panels/panel_manager.h"
17 #include "chrome/browser/ui/panels/test_panel_mouse_watcher.h" 17 #include "chrome/browser/ui/panels/test_panel_mouse_watcher.h"
18 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
19 #include "content/public/common/show_desktop_notification_params.h" 19 #include "content/public/common/show_desktop_notification_params.h"
20 #include "ui/gfx/screen.h" 20 #include "ui/gfx/screen.h"
21 21
22 // Panel tests are flaking on linux CQ. http://crbug.com/135377
23 #if !defined(OS_LINUX)
24
25 // Desktop notification code subscribes to various panel change notifications 22 // Desktop notification code subscribes to various panel change notifications
26 // so that it knows when to adjusts balloon positions. In order to give 23 // so that it knows when to adjusts balloon positions. In order to give
27 // desktop notification code a chance to process the change notifications, 24 // desktop notification code a chance to process the change notifications,
28 // we call MessageLoopForUI::current()->RunAllPending() after any panel change 25 // we call MessageLoopForUI::current()->RunAllPending() after any panel change
29 // has been made. 26 // has been made.
30 class OldPanelAndDesktopNotificationTest : public OldBasePanelBrowserTest { 27 class OldPanelAndDesktopNotificationTest : public OldBasePanelBrowserTest {
31 public: 28 public:
32 OldPanelAndDesktopNotificationTest() : OldBasePanelBrowserTest() { 29 OldPanelAndDesktopNotificationTest() : OldBasePanelBrowserTest() {
33 } 30 }
34 31
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 MessageLoopForUI::current()->RunAllPending(); 415 MessageLoopForUI::current()->RunAllPending();
419 EXPECT_EQ(balloon_bottom_after_short_panel_created, 416 EXPECT_EQ(balloon_bottom_after_short_panel_created,
420 GetBalloonBottomPosition(balloon)); 417 GetBalloonBottomPosition(balloon));
421 418
422 // Close short panel. Expect that the notification balloo moves back to its 419 // Close short panel. Expect that the notification balloo moves back to its
423 // original position. 420 // original position.
424 short_panel->Close(); 421 short_panel->Close();
425 MessageLoopForUI::current()->RunAllPending(); 422 MessageLoopForUI::current()->RunAllPending();
426 EXPECT_EQ(original_balloon_bottom, GetBalloonBottomPosition(balloon)); 423 EXPECT_EQ(original_balloon_bottom, GetBalloonBottomPosition(balloon));
427 } 424 }
428
429 #endif // !OS_LINUX
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/old_docked_panel_browsertest.cc ('k') | chrome/browser/ui/panels/old_panel_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698