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

Unified Diff: chrome/browser/notifications/notifications_interactive_uitest.cc

Issue 10383191: Convert the notifications interactive ui_test to use InProcessBrowserTest, and run it in inside bro… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/notifications/notification_browsertest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/notifications_interactive_uitest.cc
===================================================================
--- chrome/browser/notifications/notifications_interactive_uitest.cc (revision 137144)
+++ chrome/browser/notifications/notifications_interactive_uitest.cc (working copy)
@@ -1,70 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/test/automation/automation_proxy.h"
-#include "chrome/test/automation/browser_proxy.h"
-#include "chrome/test/automation/tab_proxy.h"
-#include "chrome/test/ui/ui_test.h"
-#include "net/base/net_util.h"
-#include "net/test/test_server.h"
-
-class NotificationsPermissionTest : public UITest {
- public:
- NotificationsPermissionTest() {
- dom_automation_enabled_ = true;
- show_window_ = true;
- }
-};
-
-// Flaky, http://crbug.com/62311 and http://crbug.com/74428.
-TEST_F(NotificationsPermissionTest, DISABLED_TestUserGestureInfobar) {
- net::TestServer test_server(net::TestServer::TYPE_HTTP,
- net::TestServer::kLocalhost,
- FilePath(FILE_PATH_LITERAL("chrome/test/data")));
- ASSERT_TRUE(test_server.Start());
-
- scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
- ASSERT_TRUE(browser.get());
- scoped_refptr<TabProxy> tab(browser->GetActiveTab());
- ASSERT_TRUE(tab.get());
- ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
- tab->NavigateToURL(test_server.GetURL(
- "files/notifications/notifications_request_function.html")));
- WaitUntilTabCount(1);
-
- // Request permission by calling request() while eval'ing an inline script;
- // That's considered a user gesture to webkit, and should produce an infobar.
- bool result;
- ASSERT_TRUE(tab->ExecuteAndExtractBool(
- L"",
- L"window.domAutomationController.send(request());",
- &result));
- EXPECT_TRUE(result);
-
- EXPECT_TRUE(tab->WaitForInfoBarCount(1));
-}
-
-// Flaky, http://crbug.com/62311.
-TEST_F(NotificationsPermissionTest, DISABLED_TestNoUserGestureInfobar) {
- net::TestServer test_server(net::TestServer::TYPE_HTTP,
- net::TestServer::kLocalhost,
- FilePath(FILE_PATH_LITERAL("chrome/test/data")));
- ASSERT_TRUE(test_server.Start());
-
- scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
- ASSERT_TRUE(browser.get());
- scoped_refptr<TabProxy> tab(browser->GetActiveTab());
- ASSERT_TRUE(tab.get());
-
- // Load a page which just does a request; no user gesture should result
- // in no infobar.
- ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
- tab->NavigateToURL(test_server.GetURL(
- "files/notifications/notifications_request_inline.html")));
- WaitUntilTabCount(1);
-
- size_t info_bar_count;
- ASSERT_TRUE(tab->GetInfoBarCount(&info_bar_count));
- EXPECT_EQ(0U, info_bar_count);
-}
« no previous file with comments | « chrome/browser/notifications/notification_browsertest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698