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

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

Issue 132293003: [GCM] Disable some GCM API tests on offical window bots (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
« 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/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..b37208952023425e8ecb65cae18fa3360b2a542d 100644
--- a/chrome/browser/extensions/api/gcm/gcm_apitest.cc
+++ b/chrome/browser/extensions/api/gcm/gcm_apitest.cc
@@ -24,7 +24,6 @@ class GcmApiTest : public ExtensionApiTest {
GcmApiTest() : fake_gcm_profile_service_(NULL) {}
protected:
- virtual void SetUp() OVERRIDE;
virtual void SetUpOnMainThread() OVERRIDE;
void StartCollecting();
@@ -33,18 +32,12 @@ class GcmApiTest : public ExtensionApiTest {
const std::string& page_name);
gcm::FakeGCMProfileService* service() const;
+ bool ShouldSkipTest() const;
private:
gcm::FakeGCMProfileService* fake_gcm_profile_service_;
};
-void GcmApiTest::SetUp() {
- // TODO(jianli): Once the GCM API enters stable, remove |channel|.
- ScopedCurrentChannel channel(chrome::VersionInfo::CHANNEL_UNKNOWN);
-
- ExtensionApiTest::SetUp();
-}
-
void GcmApiTest::SetUpOnMainThread() {
gcm::GCMProfileServiceFactory::GetInstance()->SetTestingFactory(
browser()->profile(), &gcm::FakeGCMProfileService::Build);
@@ -65,6 +58,9 @@ gcm::FakeGCMProfileService* GcmApiTest::service() const {
const Extension* GcmApiTest::LoadTestExtension(
const std::string& extension_path,
const std::string& page_name) {
+ // TODO(jianli): Once the GCM API enters stable, remove |channel|.
+ ScopedCurrentChannel channel(chrome::VersionInfo::CHANNEL_UNKNOWN);
+
const Extension* extension =
LoadExtension(test_data_dir_.AppendASCII(extension_path));
if (extension) {
@@ -74,11 +70,27 @@ const Extension* GcmApiTest::LoadTestExtension(
return extension;
}
+bool GcmApiTest::ShouldSkipTest() const {
+ // TODO(jianli): Remove this once the GCM API enters stable.
+#if defined(OS_WIN)
+ return chrome::VersionInfo::GetChannel() ==
+ chrome::VersionInfo::CHANNEL_STABLE;
+#else
+ return false;
+#endif
+}
+
IN_PROC_BROWSER_TEST_F(GcmApiTest, RegisterValidation) {
+ if (ShouldSkipTest())
+ return;
+
ASSERT_TRUE(RunExtensionTest("gcm/functions/register_validation"));
}
IN_PROC_BROWSER_TEST_F(GcmApiTest, Register) {
+ if (ShouldSkipTest())
+ return;
+
StartCollecting();
ASSERT_TRUE(RunExtensionTest("gcm/functions/register"));
@@ -94,10 +106,16 @@ IN_PROC_BROWSER_TEST_F(GcmApiTest, Register) {
}
IN_PROC_BROWSER_TEST_F(GcmApiTest, SendValidation) {
+ if (ShouldSkipTest())
+ return;
+
ASSERT_TRUE(RunExtensionTest("gcm/functions/send"));
}
IN_PROC_BROWSER_TEST_F(GcmApiTest, SendMessageData) {
+ if (ShouldSkipTest())
+ return;
+
StartCollecting();
ASSERT_TRUE(RunExtensionTest("gcm/functions/send_message_data"));
« 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