diff options
3 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/extensions/notifications_apitest.cc b/chrome/browser/extensions/notifications_apitest.cc index 22eea07..61b4be9 100644 --- a/chrome/browser/extensions/notifications_apitest.cc +++ b/chrome/browser/extensions/notifications_apitest.cc @@ -9,8 +9,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" -// Flaky, http://crbug.com/42314. -IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FLAKY_Notifications) { +IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Notifications) { #if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) // Notifications not supported on linux/views yet. #else diff --git a/chrome/test/data/extensions/api_test/notifications/has_permission_prefs/background.html b/chrome/test/data/extensions/api_test/notifications/has_permission_prefs/background.html index d784355..e58b14b 100644 --- a/chrome/test/data/extensions/api_test/notifications/has_permission_prefs/background.html +++ b/chrome/test/data/extensions/api_test/notifications/has_permission_prefs/background.html @@ -12,11 +12,13 @@ function showNotification(url) { } // Called by the notification when it is done with its tests. -function onNotificationDone() { +function onNotificationDone(notificationWindow) { var views = chrome.extension.getViews(); chrome.test.assertEq(2, views.length); + notificationWindow.onunload = function() { + chrome.test.succeed(); + } notification.cancel(); - chrome.test.succeed(); } chrome.test.runTests([ diff --git a/chrome/test/data/extensions/api_test/notifications/has_permission_prefs/notification.html b/chrome/test/data/extensions/api_test/notifications/has_permission_prefs/notification.html index 8a78703..ec96455 100644 --- a/chrome/test/data/extensions/api_test/notifications/has_permission_prefs/notification.html +++ b/chrome/test/data/extensions/api_test/notifications/has_permission_prefs/notification.html @@ -5,7 +5,7 @@ // permissions error. chrome.windows.getAll(null, function() { chrome.test.assertNoLastError(); - chrome.extension.getBackgroundPage().onNotificationDone(); + chrome.extension.getBackgroundPage().onNotificationDone(window); }); </script> Why hello there. |