#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "extensions/test/result_catcher.h"
+
+using extensions::ResultCatcher;
namespace {
service()->last_sent_message();
gcm::GCMClient::MessageData::const_iterator iter;
- EXPECT_EQ(2419200, message.time_to_live);
+ EXPECT_EQ(gcm::GCMClient::OutgoingMessage::kMaximumTTL, message.time_to_live);
}
IN_PROC_BROWSER_TEST_F(GcmApiTest, OnMessagesDeleted) {
ResultCatcher catcher;
- catcher.RestrictToProfile(profile());
+ catcher.RestrictToBrowserContext(profile());
const extensions::Extension* extension =
LoadTestExtension(kEventsExtension, "on_messages_deleted.html");
IN_PROC_BROWSER_TEST_F(GcmApiTest, OnMessage) {
ResultCatcher catcher;
- catcher.RestrictToProfile(profile());
+ catcher.RestrictToBrowserContext(profile());
const extensions::Extension* extension =
LoadTestExtension(kEventsExtension, "on_message.html");
IN_PROC_BROWSER_TEST_F(GcmApiTest, OnSendError) {
ResultCatcher catcher;
- catcher.RestrictToProfile(profile());
+ catcher.RestrictToBrowserContext(profile());
const extensions::Extension* extension =
LoadTestExtension(kEventsExtension, "on_send_error.html");
IN_PROC_BROWSER_TEST_F(GcmApiTest, Incognito) {
ResultCatcher catcher;
- catcher.RestrictToProfile(profile());
+ catcher.RestrictToBrowserContext(profile());
ResultCatcher incognito_catcher;
- incognito_catcher.RestrictToProfile(profile()->GetOffTheRecordProfile());
+ incognito_catcher.RestrictToBrowserContext(
+ profile()->GetOffTheRecordProfile());
ASSERT_TRUE(RunExtensionTestIncognito("gcm/functions/incognito"));