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

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

Issue 1136543004: Remove two notification browsertests related to infobars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | 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 <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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 ui_test_utils::NavigateToURL(incognito, GetTestPageURL()); 629 ui_test_utils::NavigateToURL(incognito, GetTestPageURL());
630 ASSERT_TRUE(RequestPermissionAndWait(incognito)); 630 ASSERT_TRUE(RequestPermissionAndWait(incognito));
631 631
632 ContentSettingsForOneType settings; 632 ContentSettingsForOneType settings;
633 GetPrefsByContentSetting(CONTENT_SETTING_BLOCK, &settings); 633 GetPrefsByContentSetting(CONTENT_SETTING_BLOCK, &settings);
634 EXPECT_EQ(0U, settings.size()); 634 EXPECT_EQ(0U, settings.size());
635 GetPrefsByContentSetting(CONTENT_SETTING_ALLOW, &settings); 635 GetPrefsByContentSetting(CONTENT_SETTING_ALLOW, &settings);
636 EXPECT_EQ(0U, settings.size()); 636 EXPECT_EQ(0U, settings.size());
637 } 637 }
638 638
639 IN_PROC_BROWSER_TEST_F(NotificationsTest, TestExitBrowserWithInfobar) {
640 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
641
642 // Exit the browser window, when the infobar appears.
643 ui_test_utils::NavigateToURL(browser(), GetTestPageURL());
644 ASSERT_TRUE(RequestPermissionAndWait(browser()));
645 }
646
647 // Times out. http://crbug.com/168976
648 IN_PROC_BROWSER_TEST_F(NotificationsTest,
649 DISABLED_TestCrashTabWithPermissionInfobar) {
650 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
651
652 // Test crashing the tab with permission infobar doesn't crash Chrome.
653 ui_test_utils::NavigateToURLWithDisposition(
654 browser(),
655 embedded_test_server()->GetURL("/empty.html"),
656 NEW_BACKGROUND_TAB,
657 ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB);
658 browser()->tab_strip_model()->ActivateTabAt(0, true);
659 ui_test_utils::NavigateToURL(browser(), GetTestPageURL());
660 ASSERT_TRUE(RequestPermissionAndWait(browser()));
661 CrashTab(browser(), 0);
662 }
663
664 IN_PROC_BROWSER_TEST_F(NotificationsTest, TestIncognitoNotification) { 639 IN_PROC_BROWSER_TEST_F(NotificationsTest, TestIncognitoNotification) {
665 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 640 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
666 641
667 // Test notifications in incognito window. 642 // Test notifications in incognito window.
668 Browser* browser = CreateIncognitoBrowser(); 643 Browser* browser = CreateIncognitoBrowser();
669 ui_test_utils::NavigateToURL(browser, GetTestPageURL()); 644 ui_test_utils::NavigateToURL(browser, GetTestPageURL());
670 browser->tab_strip_model()->ActivateTabAt(0, true); 645 browser->tab_strip_model()->ActivateTabAt(0, true);
671 ASSERT_TRUE(RequestPermissionAndWait(browser)); 646 ASSERT_TRUE(RequestPermissionAndWait(browser));
672 PerformActionOnInfoBar(browser, ALLOW, 0, 0); 647 PerformActionOnInfoBar(browser, ALLOW, 0, 0);
673 CreateSimpleNotification(browser, true); 648 CreateSimpleNotification(browser, true);
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 true); // by_user 882 true); // by_user
908 883
909 ASSERT_EQ(0, GetNotificationCount()); 884 ASSERT_EQ(0, GetNotificationCount());
910 885
911 // Calling WebContents::IsCrashed() will return FALSE here, even if the WC did 886 // Calling WebContents::IsCrashed() will return FALSE here, even if the WC did
912 // crash. Work around this timing issue by creating another notification, 887 // crash. Work around this timing issue by creating another notification,
913 // which requires interaction with the renderer process. 888 // which requires interaction with the renderer process.
914 result = CreateNotification(browser(), true, "", "Title1", "Body1", "chat"); 889 result = CreateNotification(browser(), true, "", "Title1", "Body1", "chat");
915 EXPECT_NE("-1", result); 890 EXPECT_NE("-1", result);
916 } 891 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698