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

Side by Side Diff: chrome/browser/ui/panels/panel_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: Cleaned up log msgs. Add fix to new tests. 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/bind.h" 5 #include "base/bind.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/download/download_service.h" 7 #include "chrome/browser/download/download_service.h"
8 #include "chrome/browser/download/download_service_factory.h" 8 #include "chrome/browser/download/download_service_factory.h"
9 #include "chrome/browser/net/url_request_mock_util.h" 9 #include "chrome/browser/net/url_request_mock_util.h"
10 #include "chrome/browser/prefs/browser_prefs.h" 10 #include "chrome/browser/prefs/browser_prefs.h"
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 EXPECT_EQ(Panel::MINIMIZED, panel->expansion_state()); 965 EXPECT_EQ(Panel::MINIMIZED, panel->expansion_state());
966 966
967 panel->Close(); 967 panel->Close();
968 } 968 }
969 969
970 IN_PROC_BROWSER_TEST_F(PanelBrowserTest, DrawAttentionWhileMinimized) { 970 IN_PROC_BROWSER_TEST_F(PanelBrowserTest, DrawAttentionWhileMinimized) {
971 // We'll simulate mouse movements for test. 971 // We'll simulate mouse movements for test.
972 PanelMouseWatcher* mouse_watcher = new TestPanelMouseWatcher(); 972 PanelMouseWatcher* mouse_watcher = new TestPanelMouseWatcher();
973 PanelManager::GetInstance()->SetMouseWatcherForTesting(mouse_watcher); 973 PanelManager::GetInstance()->SetMouseWatcherForTesting(mouse_watcher);
974 974
975 // Create 2 panels so we end up with an inactive panel that can 975 // Create 2 panels so we end up with an inactive panel that can
dcheng 2012/07/03 23:04:25 Hmm. "Create 2 panels"... =)
976 // be made to draw attention. 976 // be made to draw attention.
977 Panel* panel = CreatePanel("test panel1"); 977 Panel* panel = CreatePanel("test panel1");
978 Panel* panel2 = CreatePanel("test panel2"); 978 Panel* panel2 = CreatePanel("test panel2");
979 Panel* panel3 = CreatePanel("test panel2"); 979 Panel* panel3 = CreatePanel("test panel3");
980 980
981 scoped_ptr<NativePanelTesting> native_panel_testing( 981 scoped_ptr<NativePanelTesting> native_panel_testing(
982 CreateNativePanelTesting(panel)); 982 CreateNativePanelTesting(panel));
983 983
984 // Test that the attention is drawn and the title-bar is brought up when the 984 // Test that the attention is drawn and the title-bar is brought up when the
985 // minimized panel is drawing attention. 985 // minimized panel is drawing attention.
986 panel->Minimize(); 986 panel->Minimize();
987 WaitForExpansionStateChanged(panel, Panel::MINIMIZED); 987 WaitForExpansionStateChanged(panel, Panel::MINIMIZED);
988 panel->FlashFrame(true); 988 panel->FlashFrame(true);
989 EXPECT_TRUE(panel->IsDrawingAttention()); 989 EXPECT_TRUE(panel->IsDrawingAttention());
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1485 EXPECT_GT(old_full_size.width(), panel->full_size().width()); 1485 EXPECT_GT(old_full_size.width(), panel->full_size().width());
1486 EXPECT_GT(old_full_size.height(), panel->full_size().height()); 1486 EXPECT_GT(old_full_size.height(), panel->full_size().height());
1487 EXPECT_GE(panel->max_size().width(), panel->full_size().width()); 1487 EXPECT_GE(panel->max_size().width(), panel->full_size().width());
1488 EXPECT_GE(panel->max_size().height(), panel->full_size().height()); 1488 EXPECT_GE(panel->max_size().height(), panel->full_size().height());
1489 EXPECT_EQ(smaller_work_area_size.height(), panel->full_size().height()); 1489 EXPECT_EQ(smaller_work_area_size.height(), panel->full_size().height());
1490 1490
1491 panel->Close(); 1491 panel->Close();
1492 } 1492 }
1493 1493
1494 #endif // OS_MACOSX 1494 #endif // OS_MACOSX
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698