From 17a00eba8e19d37e7e94891551a2bea85deebcab Mon Sep 17 00:00:00 2001 From: "kkania@chromium.org" Date: Wed, 15 Dec 2010 18:14:50 +0000 Subject: Fix notification pyauto tests. Wait for the notification processes to be created before sending back their info. BUG=65408,66072 TEST=none Review URL: http://codereview.chromium.org/5718002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69280 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/test/functional/PYAUTO_TESTS | 5 ----- chrome/test/functional/notifications.py | 8 +++++--- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'chrome/test') diff --git a/chrome/test/functional/PYAUTO_TESTS b/chrome/test/functional/PYAUTO_TESTS index 8db5f34..4280c39 100644 --- a/chrome/test/functional/PYAUTO_TESTS +++ b/chrome/test/functional/PYAUTO_TESTS @@ -43,11 +43,6 @@ 'infobars', 'navigation', 'notifications', - # Sometimes notification process hasn't been created yet, crbug.com/65408 - '-notifications.NotificationsTest.testKillNotificationProcess', - # crbug.com/66072 - '-notifications.NotificationsTest.testNotificationReplacement', - '-notifications.NotificationsTest.testNotificationOrderAfterClosingOne', 'ntp', 'omnibox', 'passwords', diff --git a/chrome/test/functional/notifications.py b/chrome/test/functional/notifications.py index 29bf31b..b15fbb2 100644 --- a/chrome/test/functional/notifications.py +++ b/chrome/test/functional/notifications.py @@ -527,12 +527,14 @@ class NotificationsTest(pyauto.PyUITest): """Test that we can replace a notification using the replaceId.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) - self._CreateHTMLNotification(self.NO_SUCH_URL, 'chat') + self._CreateSimpleNotification('', 'Title2', '', 'chat') self.WaitForNotificationCount(1) - self._CreateHTMLNotification(self.NO_SUCH_URL2, 'chat') + # Since this notification has the same replaceId, 'chat', it should replace + # the first notification. + self._CreateHTMLNotification(self.NO_SUCH_URL, 'chat') notifications = self.GetActiveNotifications() self.assertEquals(1, len(notifications)) - self.assertEquals(self.NO_SUCH_URL2, notifications[0]['content_url']) + self.assertEquals(self.NO_SUCH_URL, notifications[0]['content_url']) if __name__ == '__main__': -- cgit v1.1