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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 ContentSettingsPattern::FromURLNoWildcard(origin); | 380 ContentSettingsPattern::FromURLNoWildcard(origin); |
381 for (ContentSettingsForOneType::const_iterator it = settings.begin(); | 381 for (ContentSettingsForOneType::const_iterator it = settings.begin(); |
382 it != settings.end(); ++it) { | 382 it != settings.end(); ++it) { |
383 if (it->primary_pattern == pattern) | 383 if (it->primary_pattern == pattern) |
384 return true; | 384 return true; |
385 } | 385 } |
386 return false; | 386 return false; |
387 } | 387 } |
388 | 388 |
389 void NotificationsTest::DropOriginPreference(const GURL& origin) { | 389 void NotificationsTest::DropOriginPreference(const GURL& origin) { |
390 DesktopNotificationProfileUtil::ClearSetting(browser()->profile(), | 390 DesktopNotificationProfileUtil::ClearSetting(browser()->profile(), origin); |
391 ContentSettingsPattern::FromURLNoWildcard(origin)); | |
392 } | 391 } |
393 | 392 |
394 // Flaky on Windows, Mac, Linux: http://crbug.com/437414. | 393 // Flaky on Windows, Mac, Linux: http://crbug.com/437414. |
395 IN_PROC_BROWSER_TEST_F(NotificationsTest, DISABLED_TestUserGestureInfobar) { | 394 IN_PROC_BROWSER_TEST_F(NotificationsTest, DISABLED_TestUserGestureInfobar) { |
396 ASSERT_TRUE(embedded_test_server()->Start()); | 395 ASSERT_TRUE(embedded_test_server()->Start()); |
397 | 396 |
398 ui_test_utils::NavigateToURL( | 397 ui_test_utils::NavigateToURL( |
399 browser(), | 398 browser(), |
400 embedded_test_server()->GetURL( | 399 embedded_test_server()->GetURL( |
401 "/notifications/notifications_request_function.html")); | 400 "/notifications/notifications_request_function.html")); |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
876 true); // by_user | 875 true); // by_user |
877 | 876 |
878 ASSERT_EQ(0, GetNotificationCount()); | 877 ASSERT_EQ(0, GetNotificationCount()); |
879 | 878 |
880 // Calling WebContents::IsCrashed() will return FALSE here, even if the WC did | 879 // Calling WebContents::IsCrashed() will return FALSE here, even if the WC did |
881 // crash. Work around this timing issue by creating another notification, | 880 // crash. Work around this timing issue by creating another notification, |
882 // which requires interaction with the renderer process. | 881 // which requires interaction with the renderer process. |
883 result = CreateNotification(browser(), true, "", "Title1", "Body1", "chat"); | 882 result = CreateNotification(browser(), true, "", "Title1", "Body1", "chat"); |
884 EXPECT_NE("-1", result); | 883 EXPECT_NE("-1", result); |
885 } | 884 } |
OLD | NEW |