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

Unified Diff: chrome/browser/extensions/extension_crash_recovery_browsertest.cc

Issue 8774027: Fix ExtensionCrashRecoveryTest.TwoExtensionsIgnoreFirst. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ^w Created 9 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_crash_recovery_browsertest.cc
diff --git a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
index bca31e4c01085be964ad7e85c4fd59a932d8de7c..6ee66af649e0be4a428952828a371dbcac79607a 100644
--- a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
+++ b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
@@ -51,7 +51,7 @@ class ExtensionCrashRecoveryTest : public ExtensionBrowserTest {
Balloon* balloon = GetNotificationDelegate(index);
NotificationUIManager* manager =
g_browser_process->notification_ui_manager();
- manager->CancelById(balloon->notification().notification_id());
+ ASSERT_TRUE(manager->CancelById(balloon->notification().notification_id()));
}
size_t CountBalloons() {
@@ -355,14 +355,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest,
ASSERT_EQ(size_before, GetExtensionService()->extensions()->size());
}
-// Flaky on mac&&linux due to http://crbug.com/89078.
-#if defined(OS_LINUX) || defined(OS_MACOSX)
-#define MAYBE_TwoExtensionsIgnoreFirst FLAKY_TwoExtensionsIgnoreFirst
-#else
-#define MAYBE_TwoExtensionsIgnoreFirst TwoExtensionsIgnoreFirst
-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest,
- MAYBE_TwoExtensionsIgnoreFirst) {
+ TwoExtensionsIgnoreFirst) {
const size_t size_before = GetExtensionService()->extensions()->size();
LoadTestExtension();
LoadSecondExtension();
@@ -371,13 +365,16 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest,
CrashExtension(size_before);
ASSERT_EQ(size_before, GetExtensionService()->extensions()->size());
+ // Accept notification 1 before canceling notification 0.
+ // Otherwise, on Linux and Windows, there is a race here, in which
+ // canceled notifications do not immediately go away.
+ AcceptNotification(1);
CancelNotification(0);
- // Cancelling the balloon at 0 will close the balloon, and the balloon in
- // index 1 will move into index 0.
- AcceptNotification(0);
SCOPED_TRACE("balloons done");
ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size());
+ EXPECT_EQ(second_extension_id_,
+ GetExtensionService()->extensions()->at(size_before)->id());
CheckExtensionConsistency(size_before);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698