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

Unified Diff: chrome/browser/extensions/api/gcm/gcm_apitest.cc

Issue 130473002: [GCM] Make GCM API not work in incognito mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land Created 6 years, 11 months 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 | « chrome/browser/extensions/api/gcm/gcm_api.cc ('k') | chrome/browser/services/gcm/gcm_profile_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/gcm/gcm_apitest.cc
diff --git a/chrome/browser/extensions/api/gcm/gcm_apitest.cc b/chrome/browser/extensions/api/gcm/gcm_apitest.cc
index b37208952023425e8ecb65cae18fa3360b2a542d..5f3e5c4351d39a5569a4fa85e19252929a3234cb 100644
--- a/chrome/browser/extensions/api/gcm/gcm_apitest.cc
+++ b/chrome/browser/extensions/api/gcm/gcm_apitest.cc
@@ -30,7 +30,6 @@ class GcmApiTest : public ExtensionApiTest {
const Extension* LoadTestExtension(const std::string& extension_path,
const std::string& page_name);
-
gcm::FakeGCMProfileService* service() const;
bool ShouldSkipTest() const;
@@ -185,4 +184,19 @@ IN_PROC_BROWSER_TEST_F(GcmApiTest, OnSendError) {
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
}
+IN_PROC_BROWSER_TEST_F(GcmApiTest, Incognito) {
+ if (ShouldSkipTest())
+ return;
+
+ ResultCatcher catcher;
+ catcher.RestrictToProfile(profile());
+ ResultCatcher incognito_catcher;
+ incognito_catcher.RestrictToProfile(profile()->GetOffTheRecordProfile());
+
+ ASSERT_TRUE(RunExtensionTestIncognito("gcm/functions/incognito"));
+
+ EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
+ EXPECT_TRUE(incognito_catcher.GetNextResult()) << incognito_catcher.message();
+}
+
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/api/gcm/gcm_api.cc ('k') | chrome/browser/services/gcm/gcm_profile_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698