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

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: 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
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 2348792f115cdf298a3e63c97b1ea157566113fb..cda16f74c91d2fc5a3e0c9a7c94c95f77ef7aff8 100644
--- a/chrome/browser/extensions/api/gcm/gcm_apitest.cc
+++ b/chrome/browser/extensions/api/gcm/gcm_apitest.cc
@@ -31,7 +31,6 @@ class GcmApiTest : public ExtensionApiTest {
const Extension* LoadTestExtension(const std::string& extension_path,
const std::string& page_name);
-
gcm::FakeGCMProfileService* service() const;
private:
@@ -167,4 +166,16 @@ IN_PROC_BROWSER_TEST_F(GcmApiTest, OnSendError) {
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
}
+IN_PROC_BROWSER_TEST_F(GcmApiTest, Incognito) {
+ 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

Powered by Google App Engine
This is Rietveld 408576698