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

Side by Side Diff: trunk/src/ash/system/tray/system_tray_unittest.cc

Issue 269893004: Revert 268203 "There are many ways to get it wrong." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | trunk/src/ash/system/web_notification/web_notification_tray_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/system/tray/system_tray.h" 5 #include "ash/system/tray/system_tray.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/accessibility_delegate.h" 9 #include "ash/accessibility_delegate.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 // Ensure a notification view is created. 306 // Ensure a notification view is created.
307 tray->ShowNotificationView(test_item); 307 tray->ShowNotificationView(test_item);
308 ASSERT_TRUE(test_item->notification_view() != NULL); 308 ASSERT_TRUE(test_item->notification_view() != NULL);
309 309
310 // Show the default view, notification view should remain. 310 // Show the default view, notification view should remain.
311 tray->ShowDefaultView(BUBBLE_CREATE_NEW); 311 tray->ShowDefaultView(BUBBLE_CREATE_NEW);
312 RunAllPendingInMessageLoop(); 312 RunAllPendingInMessageLoop();
313 ASSERT_TRUE(test_item->notification_view() != NULL); 313 ASSERT_TRUE(test_item->notification_view() != NULL);
314 314
315 // Show the detailed view, ensure the notification view remains. 315 // Show the detailed view, ensure the notificaiton view remains.
316 tray->ShowDetailedView(detailed_item, 0, false, BUBBLE_CREATE_NEW); 316 tray->ShowDetailedView(detailed_item, 0, false, BUBBLE_CREATE_NEW);
317 RunAllPendingInMessageLoop(); 317 RunAllPendingInMessageLoop();
318 ASSERT_TRUE(detailed_item->detailed_view() != NULL); 318 ASSERT_TRUE(detailed_item->detailed_view() != NULL);
319 ASSERT_TRUE(test_item->notification_view() != NULL); 319 ASSERT_TRUE(test_item->notification_view() != NULL);
320 320
321 // Hide the detailed view, ensure the notification view still exists. 321 // Hide the detailed view, ensure the notification view still exists.
322 ASSERT_TRUE(tray->CloseSystemBubble()); 322 ASSERT_TRUE(tray->CloseSystemBubble());
323 RunAllPendingInMessageLoop(); 323 RunAllPendingInMessageLoop();
324 ASSERT_TRUE(detailed_item->detailed_view() == NULL); 324 ASSERT_TRUE(detailed_item->detailed_view() == NULL);
325 ASSERT_TRUE(test_item->notification_view() != NULL); 325 ASSERT_TRUE(test_item->notification_view() != NULL);
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 478
479 const views::View* settings = 479 const views::View* settings =
480 tray->GetSystemBubble()->bubble_view()->GetViewByID( 480 tray->GetSystemBubble()->bubble_view()->GetViewByID(
481 test::kSettingsTrayItemViewId); 481 test::kSettingsTrayItemViewId);
482 ASSERT_TRUE(settings); 482 ASSERT_TRUE(settings);
483 EXPECT_TRUE(settings->visible()); 483 EXPECT_TRUE(settings->visible());
484 } 484 }
485 485
486 } // namespace test 486 } // namespace test
487 } // namespace ash 487 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | trunk/src/ash/system/web_notification/web_notification_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698