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

Side by Side Diff: chrome/browser/notifications/notification_interactive_uitest.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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
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 <deque> 5 #include <deque>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 TestCrashRendererNotificationRemain 689 TestCrashRendererNotificationRemain
690 #endif 690 #endif
691 691
692 IN_PROC_BROWSER_TEST_F(NotificationsTest, 692 IN_PROC_BROWSER_TEST_F(NotificationsTest,
693 MAYBE_TestCrashRendererNotificationRemain) { 693 MAYBE_TestCrashRendererNotificationRemain) {
694 ASSERT_TRUE(embedded_test_server()->Start()); 694 ASSERT_TRUE(embedded_test_server()->Start());
695 695
696 // Test crashing renderer does not close or crash notification. 696 // Test crashing renderer does not close or crash notification.
697 AllowAllOrigins(); 697 AllowAllOrigins();
698 ui_test_utils::NavigateToURLWithDisposition( 698 ui_test_utils::NavigateToURLWithDisposition(
699 browser(), 699 browser(), GURL("about:blank"), WindowOpenDisposition::NEW_BACKGROUND_TAB,
700 GURL("about:blank"),
701 NEW_BACKGROUND_TAB,
702 ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB); 700 ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB);
703 browser()->tab_strip_model()->ActivateTabAt(0, true); 701 browser()->tab_strip_model()->ActivateTabAt(0, true);
704 ui_test_utils::NavigateToURL(browser(), GetTestPageURL()); 702 ui_test_utils::NavigateToURL(browser(), GetTestPageURL());
705 CreateSimpleNotification(browser(), true); 703 CreateSimpleNotification(browser(), true);
706 ASSERT_EQ(1, GetNotificationCount()); 704 ASSERT_EQ(1, GetNotificationCount());
707 CrashTab(browser(), 0); 705 CrashTab(browser(), 0);
708 ASSERT_EQ(1, GetNotificationCount()); 706 ASSERT_EQ(1, GetNotificationCount());
709 } 707 }
710 708
711 IN_PROC_BROWSER_TEST_F(NotificationsTest, TestNotificationReplacement) { 709 IN_PROC_BROWSER_TEST_F(NotificationsTest, TestNotificationReplacement) {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 true); // by_user 874 true); // by_user
877 875
878 ASSERT_EQ(0, GetNotificationCount()); 876 ASSERT_EQ(0, GetNotificationCount());
879 877
880 // Calling WebContents::IsCrashed() will return FALSE here, even if the WC did 878 // Calling WebContents::IsCrashed() will return FALSE here, even if the WC did
881 // crash. Work around this timing issue by creating another notification, 879 // crash. Work around this timing issue by creating another notification,
882 // which requires interaction with the renderer process. 880 // which requires interaction with the renderer process.
883 result = CreateNotification(browser(), true, "", "Title1", "Body1", "chat"); 881 result = CreateNotification(browser(), true, "", "Title1", "Body1", "chat");
884 EXPECT_NE("-1", result); 882 EXPECT_NE("-1", result);
885 } 883 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698