| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "base/file_path.h" | 5 #include "base/file_path.h" |
| 6 #include "chrome/common/chrome_switches.h" | 6 #include "chrome/common/chrome_switches.h" |
| 7 #include "chrome/test/automation/browser_proxy.h" | 7 #include "chrome/test/automation/browser_proxy.h" |
| 8 #include "chrome/test/automation/tab_proxy.h" | 8 #include "chrome/test/automation/tab_proxy.h" |
| 9 #include "chrome/test/ui/ui_test.h" | 9 #include "chrome/test/ui/ui_test.h" |
| 10 #include "net/base/net_util.h" | 10 #include "net/base/net_util.h" |
| 11 #include "net/url_request/url_request_unittest.h" | 11 #include "net/url_request/url_request_unittest.h" |
| 12 | 12 |
| 13 class NotificationsPermissionTest : public UITest { | 13 class NotificationsPermissionTest : public UITest { |
| 14 public: | 14 public: |
| 15 NotificationsPermissionTest() { | 15 NotificationsPermissionTest() { |
| 16 launch_arguments_.AppendSwitch(switches::kEnableDesktopNotifications); | |
| 17 dom_automation_enabled_ = true; | 16 dom_automation_enabled_ = true; |
| 18 show_window_ = true; | 17 show_window_ = true; |
| 19 } | 18 } |
| 20 }; | 19 }; |
| 21 | 20 |
| 22 #if defined(OS_WIN) | 21 #if defined(OS_WIN) |
| 23 TEST_F(NotificationsPermissionTest, FLAKY_TestUserGestureInfobar) { | 22 TEST_F(NotificationsPermissionTest, FLAKY_TestUserGestureInfobar) { |
| 24 const wchar_t kDocRoot[] = L"chrome/test/data"; | 23 const wchar_t kDocRoot[] = L"chrome/test/data"; |
| 25 scoped_refptr<HTTPTestServer> server = | 24 scoped_refptr<HTTPTestServer> server = |
| 26 HTTPTestServer::CreateServer(kDocRoot, NULL); | 25 HTTPTestServer::CreateServer(kDocRoot, NULL); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 56 // in no infobar. | 55 // in no infobar. |
| 57 tab->NavigateToURL(server->TestServerPageW( | 56 tab->NavigateToURL(server->TestServerPageW( |
| 58 L"files/notifications/notifications_request_inline.html")); | 57 L"files/notifications/notifications_request_inline.html")); |
| 59 WaitUntilTabCount(1); | 58 WaitUntilTabCount(1); |
| 60 | 59 |
| 61 int info_bar_count; | 60 int info_bar_count; |
| 62 tab->GetInfoBarCount(&info_bar_count); | 61 tab->GetInfoBarCount(&info_bar_count); |
| 63 EXPECT_EQ(0, info_bar_count); | 62 EXPECT_EQ(0, info_bar_count); |
| 64 } | 63 } |
| 65 #endif // OS_WIN | 64 #endif // OS_WIN |
| OLD | NEW |