summaryrefslogtreecommitdiffstats
path: root/chrome/browser/notifications
diff options
context:
space:
mode:
authorjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-23 22:08:00 +0000
committerjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-23 22:08:00 +0000
commitb1943bc45d25a66d2415f4fed747cf0b22d75899 (patch)
treefc9f801b504aec84d855ba0c3193e2c69b49258c /chrome/browser/notifications
parentbdd7d85448e3835b45a1c4665463cf2780d00016 (diff)
downloadchromium_src-b1943bc45d25a66d2415f4fed747cf0b22d75899.zip
chromium_src-b1943bc45d25a66d2415f4fed747cf0b22d75899.tar.gz
chromium_src-b1943bc45d25a66d2415f4fed747cf0b22d75899.tar.bz2
Run the notifications info bar tests as interactive ui tests rather than just ui tests.
BUG=32807 TEST=included Review URL: http://codereview.chromium.org/1699007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45498 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications')
-rw-r--r--chrome/browser/notifications/notifications_interactive_uitest.cc (renamed from chrome/browser/notifications/notifications_uitest.cc)19
1 files changed, 10 insertions, 9 deletions
diff --git a/chrome/browser/notifications/notifications_uitest.cc b/chrome/browser/notifications/notifications_interactive_uitest.cc
index 66f35dc..7bc5478 100644
--- a/chrome/browser/notifications/notifications_uitest.cc
+++ b/chrome/browser/notifications/notifications_interactive_uitest.cc
@@ -18,7 +18,6 @@ class NotificationsPermissionTest : public UITest {
}
};
-#if defined(OS_WIN)
TEST_F(NotificationsPermissionTest, FLAKY_TestUserGestureInfobar) {
const wchar_t kDocRoot[] = L"chrome/test/data";
scoped_refptr<HTTPTestServer> server =
@@ -29,16 +28,18 @@ TEST_F(NotificationsPermissionTest, FLAKY_TestUserGestureInfobar) {
ASSERT_TRUE(browser.get());
scoped_refptr<TabProxy> tab(browser->GetActiveTab());
ASSERT_TRUE(tab.get());
- tab->NavigateToURL(server->TestServerPageW(
- L"files/notifications/notifications_request_function.html"));
+ ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
+ tab->NavigateToURL(server->TestServerPageW(
+ L"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;
- tab->ExecuteAndExtractBool(L"",
+ ASSERT_TRUE(tab->ExecuteAndExtractBool(
+ L"",
L"window.domAutomationController.send(request());",
- &result);
+ &result));
EXPECT_TRUE(result);
EXPECT_TRUE(tab->WaitForInfoBarCount(1, action_max_timeout_ms()));
@@ -57,12 +58,12 @@ TEST_F(NotificationsPermissionTest, TestNoUserGestureInfobar) {
// Load a page which just does a request; no user gesture should result
// in no infobar.
- tab->NavigateToURL(server->TestServerPageW(
- L"files/notifications/notifications_request_inline.html"));
+ ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
+ tab->NavigateToURL(server->TestServerPageW(
+ L"files/notifications/notifications_request_inline.html")));
WaitUntilTabCount(1);
int info_bar_count;
- tab->GetInfoBarCount(&info_bar_count);
+ ASSERT_TRUE(tab->GetInfoBarCount(&info_bar_count));
EXPECT_EQ(0, info_bar_count);
}
-#endif // OS_WIN