| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |