#include <map>
+#include "base/command_line.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/notifications/sync_notifier/synced_notification.h"
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_pref_service_syncable.h"
#include "chrome/test/base/testing_profile.h"
// Methods from testing::Test.
virtual void SetUp() {
+ // These tests rely on synced notifications being active. Some testers
+ // report the channel as STABLE so we need to manually enable it.
+ // See crbug.com/338426 for details.
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kEnableSyncSyncedNotifications);
+
// Prevent test code from trying to go to the network.
ChromeNotifierService::set_avoid_bitmap_fetching_for_test(true);
notification_manager_.reset(new StubNotificationUIManager(GURL(
}
-TEST_F(ChromeNotifierServiceTest, AddNewSendingServicesTest) {
+// http://crbug.com/341326
+#if defined(TOOLKIT_GTK)
+#define MAYBE_AddNewSendingServicesTest DISABLED_AddNewSendingServicesTest
+#else
+#define MAYBE_AddNewSendingServicesTest AddNewSendingServicesTest
+#endif
+TEST_F(ChromeNotifierServiceTest, MAYBE_AddNewSendingServicesTest) {
// This test will see if we get a new sending service after the first
// notification for that service.
ChromeNotifierService notifier(profile_.get(), notification_manager());